Debian Codegraph @

debian/missing-sources/wyrm/sass/wyrm_core/_button.sass

raw
1 // Buttons
2 //
3 // Located in `wyrm_core/_button.sass`. You can also add font icons to any
4 // button as shown in the third example. Wyrm by default uses the FontAwesome
5 // library, but any icon set can be substituted.
6 //
7 // Markup:
8 // <a href="#" class="btn {$modifiers}"> Link</a>
9 // <button class="btn {$modifiers}"> Button</button>
10 // <input type="submit" class="btn {$modifiers}">
11 // <button class="btn fa fa-check-circle {$modifiers}"> With icon</button>
12 //
13 // :hover - Highlight the button when hovered.
14 // :visited - Visited link
15 // :disabled - For disabled buttons.
16 // .btn-disabled - Class version of disabled.
17 // :active - Press the button down.
18 // :focus - Focus
19 // .btn-neutral - Neutral looking button.
20 // .btn-info - For imformative, or alternate actions.
21 // .btn-success - For positive actions.
22 // .btn-danger - Usually used for delete actions.
23 // .btn-warning - Beware, you might not want to click me.
24 // .btn-invert - Dark button to contrast the background.
25 // .btn-link - Unstyled, link looking button. Useful for secondary actions next to another button.
26 // .btn-small - Smaller button.
27 //
28 // Styleguide 1
29
30 button
31 font-size: 100%
32 margin: 0
33 vertical-align: baseline
34 *vertical-align: middle
35 cursor: pointer
36 line-height: normal
37 -webkit-appearance: button
38 *overflow: visible
39 button::-moz-focus-inner, input::-moz-focus-inner
40 border: 0
41 padding: 0
42 button[disabled]
43 cursor: default
44
45 .btn
46 /* Structure
47 display: inline-block
48 border-radius: 2px
49 line-height: normal
50 white-space: nowrap
51 text-align: center
52 cursor: pointer
53 font-size: 100%
54 padding: $base-line-height / 4 $base-line-height / 2 ($base-line-height / 4 + 2) $base-line-height / 2
55 color: $white
56 border: 1px solid rgba(0,0,0,0.1)
57 background-color: $button-background-color
58 text-decoration: none
59 font-weight: normal
60 font-family: $base-font-family
61 box-shadow: 0px 1px 2px -1px rgba(255, 255, 255, .5) inset, 0px -2px 0px 0px rgba(0,0,0,.1) inset
62 outline-none: false
63 vertical-align: middle
64 *display: inline
65 zoom: 1
66 -webkit-user-drag: none
67 +user-select(none)
68 +font-smooth
69 +transition(all 0.1s linear)
70
71 .btn-hover
72 background: lighten($link-color, 5%)
73 color: $white
74
75 .btn
76 &:hover
77 background: lighten($button-background-color, 5%)
78 color: $white
79 &:focus
80 background: lighten($button-background-color, 5%)
81 outline: 0
82 &:active
83 box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, .05) inset, 0px 2px 0px 0px rgba(0,0,0,.1) inset
84 padding: ($base-line-height / 4 + 2) $base-line-height / 2 $base-line-height / 4 $base-line-height / 2
85 &:visited
86 color: $white
87 &:disabled
88 background-image: none
89 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false)
90 filter: alpha(opacity = 40)
91 opacity: 0.4
92 cursor: not-allowed
93 box-shadow: none
94
95 .btn-disabled
96 background-image: none
97 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false)
98 filter: alpha(opacity = 40)
99 opacity: 0.4
100 cursor: not-allowed
101 box-shadow: none
102 &:hover, &:focus, &:active
103 background-image: none
104 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false)
105 filter: alpha(opacity = 40)
106 opacity: 0.40
107 cursor: not-allowed
108 box-shadow: none
109
110 // Firefox: Get rid of the inner focus border
111 .btn::-moz-focus-inner
112 padding: 0
113 border: 0
114
115 .btn-small
116 font-size: 80%
117
118 .btn-info
119 background-color: $blue !important
120 &:hover
121 background-color: lighten($blue, 5%) !important
122
123 .btn-neutral
124 background-color: $button-neutral-background-color !important
125 color: $text-color !important
126 &:hover
127 background-color: darken($button-neutral-background-color, 5%) !important
128 color: $text-color
129 &:visited
130 color: $text-color !important
131
132 .btn-success
133 background-color: $green !important
134 &:hover
135 background-color: darken($green, 5%) !important
136
137 .btn-danger
138 background-color: $red !important
139 &:hover
140 background-color: lighten($red, 5%) !important
141
142 .btn-warning
143 background-color: $orange !important
144 &:hover
145 background-color: lighten($orange, 5%) !important
146 .btn-invert
147 background-color: $gray-darker
148 &:hover
149 background-color: lighten($gray-darker, 5%) !important
150
151 .btn-link
152 background-color: transparent !important
153 color: $link-color
154 box-shadow: none
155 border-color: transparent !important
156 &:hover
157 background-color: transparent !important
158 color: lighten($link-color, 10%) !important
159 box-shadow: none
160 &:active
161 background-color: transparent !important
162 color: lighten($link-color, 10%) !important
163 box-shadow: none
164 &:visited
165 color: $link-color-visited
166
167 .wy-btn-group .btn, .wy-control .btn
168 vertical-align: middle
169
170 .wy-btn-group
171 margin-bottom: $base-line-height
172 +clearfix