twitter-bootstrap-turbo 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +266 -0
- data/Rakefile +14 -0
- data/app/helpers/bootstrap_flash_helper.rb +14 -0
- data/app/helpers/flash_block_helper.rb +17 -0
- data/app/helpers/glyph_helper.rb +12 -0
- data/app/helpers/modal_helper.rb +42 -0
- data/app/helpers/twitter_breadcrumbs_helper.rb +5 -0
- data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +14 -0
- data/lib/generators/bootstrap/install/install_generator.rb +53 -0
- data/lib/generators/bootstrap/install/templates/application.css +7 -0
- data/lib/generators/bootstrap/install/templates/application.js +10 -0
- data/lib/generators/bootstrap/install/templates/bootstrap.coffee +9 -0
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +28 -0
- data/lib/generators/bootstrap/layout/layout_generator.rb +23 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +108 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +68 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +68 -0
- data/lib/generators/bootstrap/partial/partial_generator.rb +20 -0
- data/lib/generators/bootstrap/partial/templates/_login.html.erb +29 -0
- data/lib/generators/bootstrap/partial/templates/_navbar.html.erb +13 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.erb +16 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.erb +6 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.haml +4 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.slim +4 -0
- data/lib/generators/bootstrap/themed/templates/index.html.erb +40 -0
- data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
- data/lib/generators/bootstrap/themed/templates/index.html.slim +27 -0
- data/lib/generators/bootstrap/themed/templates/new.html.erb +6 -0
- data/lib/generators/bootstrap/themed/templates/new.html.haml +4 -0
- data/lib/generators/bootstrap/themed/templates/new.html.slim +4 -0
- data/lib/generators/bootstrap/themed/templates/show.html.erb +23 -0
- data/lib/generators/bootstrap/themed/templates/show.html.haml +15 -0
- data/lib/generators/bootstrap/themed/templates/show.html.slim +17 -0
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +14 -0
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +11 -0
- data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +12 -0
- data/lib/generators/bootstrap/themed/themed_generator.rb +99 -0
- data/lib/twitter-bootstrap-turbo.rb +10 -0
- data/lib/twitter/bootstrap/rails/bootstrap.rb +2 -0
- data/lib/twitter/bootstrap/rails/engine.rb +29 -0
- data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +30 -0
- data/lib/twitter/bootstrap/rails/version.rb +7 -0
- data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.svg +255 -0
- data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/twitter/bootstrap.js +13 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +105 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +92 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +98 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +178 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +159 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +151 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +241 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +103 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +152 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +137 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +275 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +60 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +302 -0
- data/vendor/assets/javascripts/twitter/bootstrap_ujs.js +11 -0
- data/vendor/toolkit/font-awesome-ie7.less +245 -0
- data/vendor/toolkit/fontawesome.less +327 -0
- data/vendor/toolkit/twitter/bootstrap/accordion.less +34 -0
- data/vendor/toolkit/twitter/bootstrap/alerts.less +65 -0
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +62 -0
- data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +24 -0
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +245 -0
- data/vendor/toolkit/twitter/bootstrap/buttons.less +231 -0
- data/vendor/toolkit/twitter/bootstrap/carousel.less +131 -0
- data/vendor/toolkit/twitter/bootstrap/close.less +31 -0
- data/vendor/toolkit/twitter/bootstrap/code.less +58 -0
- data/vendor/toolkit/twitter/bootstrap/component-animations.less +22 -0
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +210 -0
- data/vendor/toolkit/twitter/bootstrap/forms.less +650 -0
- data/vendor/toolkit/twitter/bootstrap/grid.less +21 -0
- data/vendor/toolkit/twitter/bootstrap/hero-unit.less +24 -0
- data/vendor/toolkit/twitter/bootstrap/labels-badges.less +72 -0
- data/vendor/toolkit/twitter/bootstrap/layouts.less +16 -0
- data/vendor/toolkit/twitter/bootstrap/mixins.less +681 -0
- data/vendor/toolkit/twitter/bootstrap/modals.less +98 -0
- data/vendor/toolkit/twitter/bootstrap/navbar.less +475 -0
- data/vendor/toolkit/twitter/bootstrap/navs.less +384 -0
- data/vendor/toolkit/twitter/bootstrap/pager.less +40 -0
- data/vendor/toolkit/twitter/bootstrap/pagination.less +64 -0
- data/vendor/toolkit/twitter/bootstrap/popovers.less +117 -0
- data/vendor/toolkit/twitter/bootstrap/progress-bars.less +122 -0
- data/vendor/toolkit/twitter/bootstrap/reset.less +137 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +28 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +174 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +19 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +177 -0
- data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +43 -0
- data/vendor/toolkit/twitter/bootstrap/responsive.less +48 -0
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +52 -0
- data/vendor/toolkit/twitter/bootstrap/sprites.less +193 -0
- data/vendor/toolkit/twitter/bootstrap/tables.less +245 -0
- data/vendor/toolkit/twitter/bootstrap/thumbnails.less +52 -0
- data/vendor/toolkit/twitter/bootstrap/tooltip.less +70 -0
- data/vendor/toolkit/twitter/bootstrap/type.less +221 -0
- data/vendor/toolkit/twitter/bootstrap/utilities.less +30 -0
- data/vendor/toolkit/twitter/bootstrap/variables.less +279 -0
- data/vendor/toolkit/twitter/bootstrap/wells.less +29 -0
- data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
- metadata +235 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
//
|
2
|
+
// Breadcrumbs
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
.breadcrumb {
|
7
|
+
padding: 8px 15px;
|
8
|
+
margin: 0 0 @baseLineHeight;
|
9
|
+
list-style: none;
|
10
|
+
background-color: #f5f5f5;
|
11
|
+
.border-radius(4px);
|
12
|
+
li {
|
13
|
+
display: inline-block;
|
14
|
+
.ie7-inline-block();
|
15
|
+
text-shadow: 0 1px 0 @white;
|
16
|
+
}
|
17
|
+
.divider {
|
18
|
+
padding: 0 5px;
|
19
|
+
color: #ccc;
|
20
|
+
}
|
21
|
+
.active {
|
22
|
+
color: @grayLight;
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,245 @@
|
|
1
|
+
//
|
2
|
+
// Button groups
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Make the div behave like a button
|
7
|
+
.btn-group {
|
8
|
+
position: relative;
|
9
|
+
font-size: 0; // remove as part 1 of font-size inline-block hack
|
10
|
+
vertical-align: middle; // match .btn alignment given font-size hack above
|
11
|
+
white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
|
12
|
+
.ie7-restore-left-whitespace();
|
13
|
+
}
|
14
|
+
|
15
|
+
// Space out series of button groups
|
16
|
+
.btn-group + .btn-group {
|
17
|
+
margin-left: 5px;
|
18
|
+
}
|
19
|
+
|
20
|
+
// Optional: Group multiple button groups together for a toolbar
|
21
|
+
.btn-toolbar {
|
22
|
+
font-size: 0; // Hack to remove whitespace that results from using inline-block
|
23
|
+
margin-top: @baseLineHeight / 2;
|
24
|
+
margin-bottom: @baseLineHeight / 2;
|
25
|
+
.btn-group {
|
26
|
+
display: inline-block;
|
27
|
+
.ie7-inline-block();
|
28
|
+
}
|
29
|
+
.btn + .btn,
|
30
|
+
.btn-group + .btn,
|
31
|
+
.btn + .btn-group {
|
32
|
+
margin-left: 5px;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
// Float them, remove border radius, then re-add to first and last elements
|
37
|
+
.btn-group > .btn {
|
38
|
+
position: relative;
|
39
|
+
.border-radius(0);
|
40
|
+
}
|
41
|
+
.btn-group > .btn + .btn {
|
42
|
+
margin-left: -1px;
|
43
|
+
}
|
44
|
+
.btn-group > .btn,
|
45
|
+
.btn-group > .dropdown-menu {
|
46
|
+
font-size: @baseFontSize; // redeclare as part 2 of font-size inline-block hack
|
47
|
+
}
|
48
|
+
|
49
|
+
// Reset fonts for other sizes
|
50
|
+
.btn-group > .btn-mini {
|
51
|
+
font-size: 11px;
|
52
|
+
}
|
53
|
+
.btn-group > .btn-small {
|
54
|
+
font-size: 12px;
|
55
|
+
}
|
56
|
+
.btn-group > .btn-large {
|
57
|
+
font-size: 16px;
|
58
|
+
}
|
59
|
+
|
60
|
+
// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
|
61
|
+
.btn-group > .btn:first-child {
|
62
|
+
margin-left: 0;
|
63
|
+
-webkit-border-top-left-radius: 4px;
|
64
|
+
-moz-border-radius-topleft: 4px;
|
65
|
+
border-top-left-radius: 4px;
|
66
|
+
-webkit-border-bottom-left-radius: 4px;
|
67
|
+
-moz-border-radius-bottomleft: 4px;
|
68
|
+
border-bottom-left-radius: 4px;
|
69
|
+
}
|
70
|
+
// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
|
71
|
+
.btn-group > .btn:last-child,
|
72
|
+
.btn-group > .dropdown-toggle {
|
73
|
+
-webkit-border-top-right-radius: 4px;
|
74
|
+
-moz-border-radius-topright: 4px;
|
75
|
+
border-top-right-radius: 4px;
|
76
|
+
-webkit-border-bottom-right-radius: 4px;
|
77
|
+
-moz-border-radius-bottomright: 4px;
|
78
|
+
border-bottom-right-radius: 4px;
|
79
|
+
}
|
80
|
+
// Reset corners for large buttons
|
81
|
+
.btn-group > .btn.large:first-child {
|
82
|
+
margin-left: 0;
|
83
|
+
-webkit-border-top-left-radius: 6px;
|
84
|
+
-moz-border-radius-topleft: 6px;
|
85
|
+
border-top-left-radius: 6px;
|
86
|
+
-webkit-border-bottom-left-radius: 6px;
|
87
|
+
-moz-border-radius-bottomleft: 6px;
|
88
|
+
border-bottom-left-radius: 6px;
|
89
|
+
}
|
90
|
+
.btn-group > .btn.large:last-child,
|
91
|
+
.btn-group > .large.dropdown-toggle {
|
92
|
+
-webkit-border-top-right-radius: 6px;
|
93
|
+
-moz-border-radius-topright: 6px;
|
94
|
+
border-top-right-radius: 6px;
|
95
|
+
-webkit-border-bottom-right-radius: 6px;
|
96
|
+
-moz-border-radius-bottomright: 6px;
|
97
|
+
border-bottom-right-radius: 6px;
|
98
|
+
}
|
99
|
+
|
100
|
+
// On hover/focus/active, bring the proper btn to front
|
101
|
+
.btn-group > .btn:hover,
|
102
|
+
.btn-group > .btn:focus,
|
103
|
+
.btn-group > .btn:active,
|
104
|
+
.btn-group > .btn.active {
|
105
|
+
z-index: 2;
|
106
|
+
}
|
107
|
+
|
108
|
+
// On active and open, don't show outline
|
109
|
+
.btn-group .dropdown-toggle:active,
|
110
|
+
.btn-group.open .dropdown-toggle {
|
111
|
+
outline: 0;
|
112
|
+
}
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
// Split button dropdowns
|
117
|
+
// ----------------------
|
118
|
+
|
119
|
+
// Give the line between buttons some depth
|
120
|
+
.btn-group > .btn + .dropdown-toggle {
|
121
|
+
padding-left: 8px;
|
122
|
+
padding-right: 8px;
|
123
|
+
.box-shadow(inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05));
|
124
|
+
*padding-top: 5px;
|
125
|
+
*padding-bottom: 5px;
|
126
|
+
}
|
127
|
+
.btn-group > .btn-mini + .dropdown-toggle {
|
128
|
+
padding-left: 5px;
|
129
|
+
padding-right: 5px;
|
130
|
+
*padding-top: 2px;
|
131
|
+
*padding-bottom: 2px;
|
132
|
+
}
|
133
|
+
.btn-group > .btn-small + .dropdown-toggle {
|
134
|
+
*padding-top: 5px;
|
135
|
+
*padding-bottom: 4px;
|
136
|
+
}
|
137
|
+
.btn-group > .btn-large + .dropdown-toggle {
|
138
|
+
padding-left: 12px;
|
139
|
+
padding-right: 12px;
|
140
|
+
*padding-top: 7px;
|
141
|
+
*padding-bottom: 7px;
|
142
|
+
}
|
143
|
+
|
144
|
+
.btn-group.open {
|
145
|
+
|
146
|
+
// The clickable button for toggling the menu
|
147
|
+
// Remove the gradient and set the same inset shadow as the :active state
|
148
|
+
.dropdown-toggle {
|
149
|
+
background-image: none;
|
150
|
+
.box-shadow(inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05));
|
151
|
+
}
|
152
|
+
|
153
|
+
// Keep the hover's background when dropdown is open
|
154
|
+
.btn.dropdown-toggle {
|
155
|
+
background-color: @btnBackgroundHighlight;
|
156
|
+
}
|
157
|
+
.btn-primary.dropdown-toggle {
|
158
|
+
background-color: @btnPrimaryBackgroundHighlight;
|
159
|
+
}
|
160
|
+
.btn-warning.dropdown-toggle {
|
161
|
+
background-color: @btnWarningBackgroundHighlight;
|
162
|
+
}
|
163
|
+
.btn-danger.dropdown-toggle {
|
164
|
+
background-color: @btnDangerBackgroundHighlight;
|
165
|
+
}
|
166
|
+
.btn-success.dropdown-toggle {
|
167
|
+
background-color: @btnSuccessBackgroundHighlight;
|
168
|
+
}
|
169
|
+
.btn-info.dropdown-toggle {
|
170
|
+
background-color: @btnInfoBackgroundHighlight;
|
171
|
+
}
|
172
|
+
.btn-inverse.dropdown-toggle {
|
173
|
+
background-color: @btnInverseBackgroundHighlight;
|
174
|
+
}
|
175
|
+
}
|
176
|
+
|
177
|
+
|
178
|
+
// Reposition the caret
|
179
|
+
.btn .caret {
|
180
|
+
margin-top: 8px;
|
181
|
+
margin-left: 0;
|
182
|
+
}
|
183
|
+
// Carets in other button sizes
|
184
|
+
.btn-mini .caret,
|
185
|
+
.btn-small .caret,
|
186
|
+
.btn-large .caret {
|
187
|
+
margin-top: 6px;
|
188
|
+
}
|
189
|
+
.btn-large .caret {
|
190
|
+
border-left-width: 5px;
|
191
|
+
border-right-width: 5px;
|
192
|
+
border-top-width: 5px;
|
193
|
+
}
|
194
|
+
// Upside down carets for .dropup
|
195
|
+
.dropup .btn-large .caret {
|
196
|
+
border-bottom: 5px solid @black;
|
197
|
+
border-top: 0;
|
198
|
+
}
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
// Account for other colors
|
203
|
+
.btn-primary,
|
204
|
+
.btn-warning,
|
205
|
+
.btn-danger,
|
206
|
+
.btn-info,
|
207
|
+
.btn-success,
|
208
|
+
.btn-inverse {
|
209
|
+
.caret {
|
210
|
+
border-top-color: @white;
|
211
|
+
border-bottom-color: @white;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
// Vertical button groups
|
218
|
+
// ----------------------
|
219
|
+
|
220
|
+
.btn-group-vertical {
|
221
|
+
display: inline-block; // makes buttons only take up the width they need
|
222
|
+
.ie7-inline-block();
|
223
|
+
}
|
224
|
+
.btn-group-vertical .btn {
|
225
|
+
display: block;
|
226
|
+
float: none;
|
227
|
+
width: 100%;
|
228
|
+
.border-radius(0);
|
229
|
+
}
|
230
|
+
.btn-group-vertical .btn + .btn {
|
231
|
+
margin-left: 0;
|
232
|
+
margin-top: -1px;
|
233
|
+
}
|
234
|
+
.btn-group-vertical .btn:first-child {
|
235
|
+
.border-radius(4px 4px 0 0);
|
236
|
+
}
|
237
|
+
.btn-group-vertical .btn:last-child {
|
238
|
+
.border-radius(0 0 4px 4px);
|
239
|
+
}
|
240
|
+
.btn-group-vertical .btn-large:first-child {
|
241
|
+
.border-radius(6px 6px 0 0);
|
242
|
+
}
|
243
|
+
.btn-group-vertical .btn-large:last-child {
|
244
|
+
.border-radius(0 0 6px 6px);
|
245
|
+
}
|
@@ -0,0 +1,231 @@
|
|
1
|
+
//
|
2
|
+
// Buttons
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
// Base styles
|
7
|
+
// --------------------------------------------------
|
8
|
+
|
9
|
+
// Core
|
10
|
+
.btn {
|
11
|
+
display: inline-block;
|
12
|
+
.ie7-inline-block();
|
13
|
+
padding: 4px 14px;
|
14
|
+
margin-bottom: 0; // For input.btn
|
15
|
+
font-size: @baseFontSize;
|
16
|
+
line-height: @baseLineHeight;
|
17
|
+
*line-height: @baseLineHeight;
|
18
|
+
text-align: center;
|
19
|
+
vertical-align: middle;
|
20
|
+
cursor: pointer;
|
21
|
+
.buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75));
|
22
|
+
border: 1px solid @btnBorder;
|
23
|
+
*border: 0; // Remove the border to prevent IE7's black border on input:focus
|
24
|
+
border-bottom-color: darken(@btnBorder, 10%);
|
25
|
+
.border-radius(4px);
|
26
|
+
.ie7-restore-left-whitespace(); // Give IE7 some love
|
27
|
+
.box-shadow(inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05));
|
28
|
+
|
29
|
+
// Hover state
|
30
|
+
&:hover {
|
31
|
+
color: @grayDark;
|
32
|
+
text-decoration: none;
|
33
|
+
background-color: darken(@white, 10%);
|
34
|
+
*background-color: darken(@white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
|
35
|
+
background-position: 0 -15px;
|
36
|
+
|
37
|
+
// transition is only when going to hover, otherwise the background
|
38
|
+
// behind the gradient (there for IE<=9 fallback) gets mismatched
|
39
|
+
.transition(background-position .1s linear);
|
40
|
+
}
|
41
|
+
|
42
|
+
// Focus state for keyboard and accessibility
|
43
|
+
&:focus {
|
44
|
+
.tab-focus();
|
45
|
+
}
|
46
|
+
|
47
|
+
// Active state
|
48
|
+
&.active,
|
49
|
+
&:active {
|
50
|
+
background-color: darken(@white, 10%);
|
51
|
+
background-color: darken(@white, 15%) e("\9");
|
52
|
+
background-image: none;
|
53
|
+
outline: 0;
|
54
|
+
.box-shadow(inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05));
|
55
|
+
}
|
56
|
+
|
57
|
+
// Disabled state
|
58
|
+
&.disabled,
|
59
|
+
&[disabled] {
|
60
|
+
cursor: default;
|
61
|
+
background-color: darken(@white, 10%);
|
62
|
+
background-image: none;
|
63
|
+
.opacity(65);
|
64
|
+
.box-shadow(none);
|
65
|
+
}
|
66
|
+
|
67
|
+
}
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
// Button Sizes
|
72
|
+
// --------------------------------------------------
|
73
|
+
|
74
|
+
// Large
|
75
|
+
.btn-large {
|
76
|
+
padding: 9px 14px;
|
77
|
+
font-size: @baseFontSize + 2px;
|
78
|
+
line-height: normal;
|
79
|
+
.border-radius(5px);
|
80
|
+
}
|
81
|
+
.btn-large [class^="icon-"] {
|
82
|
+
margin-top: 2px;
|
83
|
+
}
|
84
|
+
|
85
|
+
// Small
|
86
|
+
.btn-small {
|
87
|
+
padding: 3px 9px;
|
88
|
+
font-size: @baseFontSize - 2px;
|
89
|
+
line-height: @baseLineHeight - 2px;
|
90
|
+
}
|
91
|
+
.btn-small [class^="icon-"] {
|
92
|
+
margin-top: 0;
|
93
|
+
}
|
94
|
+
|
95
|
+
// Mini
|
96
|
+
.btn-mini {
|
97
|
+
padding: 2px 6px;
|
98
|
+
font-size: @baseFontSize - 3px;
|
99
|
+
line-height: @baseLineHeight - 3px;
|
100
|
+
}
|
101
|
+
|
102
|
+
|
103
|
+
// Block button
|
104
|
+
// -------------------------
|
105
|
+
|
106
|
+
.btn-block {
|
107
|
+
display: block;
|
108
|
+
width: 100%;
|
109
|
+
padding-left: 0;
|
110
|
+
padding-right: 0;
|
111
|
+
.box-sizing(border-box);
|
112
|
+
}
|
113
|
+
|
114
|
+
// Vertically space out multiple block buttons
|
115
|
+
.btn-block + .btn-block {
|
116
|
+
margin-top: 5px;
|
117
|
+
}
|
118
|
+
|
119
|
+
// Specificity overrides
|
120
|
+
input[type="submit"],
|
121
|
+
input[type="reset"],
|
122
|
+
input[type="button"] {
|
123
|
+
&.btn-block {
|
124
|
+
width: 100%;
|
125
|
+
}
|
126
|
+
}
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
// Alternate buttons
|
131
|
+
// --------------------------------------------------
|
132
|
+
|
133
|
+
// Provide *some* extra contrast for those who can get it
|
134
|
+
.btn-primary.active,
|
135
|
+
.btn-warning.active,
|
136
|
+
.btn-danger.active,
|
137
|
+
.btn-success.active,
|
138
|
+
.btn-info.active,
|
139
|
+
.btn-inverse.active {
|
140
|
+
color: rgba(255,255,255,.75);
|
141
|
+
}
|
142
|
+
|
143
|
+
// Set the backgrounds
|
144
|
+
// -------------------------
|
145
|
+
.btn {
|
146
|
+
// reset here as of 2.0.3 due to Recess property order
|
147
|
+
border-color: #c5c5c5;
|
148
|
+
border-color: rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25);
|
149
|
+
}
|
150
|
+
.btn-primary {
|
151
|
+
.buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
|
152
|
+
}
|
153
|
+
// Warning appears are orange
|
154
|
+
.btn-warning {
|
155
|
+
.buttonBackground(@btnWarningBackground, @btnWarningBackgroundHighlight);
|
156
|
+
}
|
157
|
+
// Danger and error appear as red
|
158
|
+
.btn-danger {
|
159
|
+
.buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight);
|
160
|
+
}
|
161
|
+
// Success appears as green
|
162
|
+
.btn-success {
|
163
|
+
.buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight);
|
164
|
+
}
|
165
|
+
// Info appears as a neutral blue
|
166
|
+
.btn-info {
|
167
|
+
.buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight);
|
168
|
+
}
|
169
|
+
// Inverse appears as dark gray
|
170
|
+
.btn-inverse {
|
171
|
+
.buttonBackground(@btnInverseBackground, @btnInverseBackgroundHighlight);
|
172
|
+
}
|
173
|
+
|
174
|
+
|
175
|
+
// Cross-browser Jank
|
176
|
+
// --------------------------------------------------
|
177
|
+
|
178
|
+
button.btn,
|
179
|
+
input[type="submit"].btn {
|
180
|
+
|
181
|
+
// Firefox 3.6 only I believe
|
182
|
+
&::-moz-focus-inner {
|
183
|
+
padding: 0;
|
184
|
+
border: 0;
|
185
|
+
}
|
186
|
+
|
187
|
+
// IE7 has some default padding on button controls
|
188
|
+
*padding-top: 3px;
|
189
|
+
*padding-bottom: 3px;
|
190
|
+
|
191
|
+
&.btn-large {
|
192
|
+
*padding-top: 7px;
|
193
|
+
*padding-bottom: 7px;
|
194
|
+
}
|
195
|
+
&.btn-small {
|
196
|
+
*padding-top: 3px;
|
197
|
+
*padding-bottom: 3px;
|
198
|
+
}
|
199
|
+
&.btn-mini {
|
200
|
+
*padding-top: 1px;
|
201
|
+
*padding-bottom: 1px;
|
202
|
+
}
|
203
|
+
}
|
204
|
+
|
205
|
+
|
206
|
+
// Link buttons
|
207
|
+
// --------------------------------------------------
|
208
|
+
|
209
|
+
// Make a button look and behave like a link
|
210
|
+
.btn-link,
|
211
|
+
.btn-link:active,
|
212
|
+
.btn-link[disabled] {
|
213
|
+
background-color: transparent;
|
214
|
+
background-image: none;
|
215
|
+
.box-shadow(none);
|
216
|
+
}
|
217
|
+
.btn-link {
|
218
|
+
border-color: transparent;
|
219
|
+
cursor: pointer;
|
220
|
+
color: @linkColor;
|
221
|
+
.border-radius(0);
|
222
|
+
}
|
223
|
+
.btn-link:hover {
|
224
|
+
color: @linkColorHover;
|
225
|
+
text-decoration: underline;
|
226
|
+
background-color: transparent;
|
227
|
+
}
|
228
|
+
.btn-link[disabled]:hover {
|
229
|
+
color: @grayDark;
|
230
|
+
text-decoration: none;
|
231
|
+
}
|