twitter-bootstrap-rails 2.0 → 2.0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of twitter-bootstrap-rails might be problematic. Click here for more details.
- data/README.md +31 -37
- data/Rakefile +11 -0
- data/lib/generators/bootstrap/install/install_generator.rb +37 -13
- data/lib/generators/bootstrap/install/templates/application.css +0 -1
- data/lib/generators/bootstrap/install/templates/bootstrap.coffee +6 -15
- data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +13 -0
- data/lib/generators/bootstrap/layout/layout_generator.rb +4 -4
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +96 -49
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +76 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +77 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.erb +5 -4
- data/lib/generators/bootstrap/themed/templates/_form.html.haml +11 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.erb +1 -2
- data/lib/generators/bootstrap/themed/templates/edit.html.haml +3 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.slim +3 -0
- data/lib/generators/bootstrap/themed/templates/index.html.erb +27 -28
- data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
- data/lib/generators/bootstrap/themed/templates/index.html.slim +25 -0
- data/lib/generators/bootstrap/themed/templates/new.html.haml +2 -0
- data/lib/generators/bootstrap/themed/templates/new.html.slim +2 -0
- data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -4
- data/lib/generators/bootstrap/themed/templates/show.html.haml +9 -0
- data/lib/generators/bootstrap/themed/templates/show.html.slim +9 -0
- data/lib/generators/bootstrap/themed/themed_generator.rb +13 -13
- data/lib/twitter/bootstrap/rails/version.rb +1 -1
- 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/bootstrap-alert.js +16 -7
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +3 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +7 -4
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +7 -5
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +16 -7
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +12 -7
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +5 -5
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +4 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +11 -6
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +2 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +3 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +40 -21
- data/vendor/toolkit/twitter/bootstrap/accordion.less +5 -4
- data/vendor/toolkit/twitter/bootstrap/alerts.less +1 -0
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +10 -8
- data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +1 -1
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +49 -17
- data/vendor/toolkit/twitter/bootstrap/buttons.less +156 -89
- data/vendor/toolkit/twitter/bootstrap/carousel.less +12 -5
- data/vendor/toolkit/twitter/bootstrap/code.less +57 -0
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +24 -4
- data/vendor/toolkit/twitter/bootstrap/forms.less +117 -91
- data/vendor/toolkit/twitter/bootstrap/grid.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/hero-unit.less +20 -0
- data/vendor/toolkit/twitter/bootstrap/labels.less +23 -7
- data/vendor/toolkit/twitter/bootstrap/layouts.less +17 -0
- data/vendor/toolkit/twitter/bootstrap/mixins.less +253 -36
- data/vendor/toolkit/twitter/bootstrap/modals.less +20 -2
- data/vendor/toolkit/twitter/bootstrap/navbar.less +82 -34
- data/vendor/toolkit/twitter/bootstrap/navs.less +87 -72
- data/vendor/toolkit/twitter/bootstrap/pager.less +7 -2
- data/vendor/toolkit/twitter/bootstrap/pagination.less +1 -0
- data/vendor/toolkit/twitter/bootstrap/popovers.less +25 -25
- data/vendor/toolkit/twitter/bootstrap/progress-bars.less +14 -18
- data/vendor/toolkit/twitter/bootstrap/reset.less +3 -4
- data/vendor/toolkit/twitter/bootstrap/responsive.less +224 -165
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +6 -89
- data/vendor/toolkit/twitter/bootstrap/sprites.less +139 -99
- data/vendor/toolkit/twitter/bootstrap/tables.less +15 -57
- data/vendor/toolkit/twitter/bootstrap/thumbnails.less +4 -2
- data/vendor/toolkit/twitter/bootstrap/type.less +15 -44
- data/vendor/toolkit/twitter/bootstrap/variables.less +38 -21
- data/vendor/toolkit/twitter/bootstrap_base.less +2 -0
- metadata +36 -21
- data/lib/generators/bootstrap/install/templates/bootstrap.less +0 -5
- data/vendor/assets/stylesheets/twitter/bootstrap.css.less +0 -1
- data/vendor/toolkit/twitter/bootstrap.less +0 -1
- data/vendor/toolkit/twitter/bootstrap/patterns.less +0 -30
- data/vendor/toolkit/twitter/bootstrap/print.less +0 -18
@@ -0,0 +1,20 @@
|
|
1
|
+
// HERO UNIT
|
2
|
+
// ---------
|
3
|
+
|
4
|
+
.hero-unit {
|
5
|
+
padding: 60px;
|
6
|
+
margin-bottom: 30px;
|
7
|
+
background-color: #f5f5f5;
|
8
|
+
.border-radius(6px);
|
9
|
+
h1 {
|
10
|
+
margin-bottom: 0;
|
11
|
+
font-size: 60px;
|
12
|
+
line-height: 1;
|
13
|
+
letter-spacing: -1px;
|
14
|
+
}
|
15
|
+
p {
|
16
|
+
font-size: 18px;
|
17
|
+
font-weight: 200;
|
18
|
+
line-height: @baseLineHeight * 1.5;
|
19
|
+
}
|
20
|
+
}
|
@@ -1,16 +1,32 @@
|
|
1
1
|
// LABELS
|
2
2
|
// ------
|
3
3
|
|
4
|
+
// Base
|
4
5
|
.label {
|
5
|
-
padding:
|
6
|
-
font-size: @baseFontSize * .
|
6
|
+
padding: 2px 4px 3px;
|
7
|
+
font-size: @baseFontSize * .85;
|
7
8
|
font-weight: bold;
|
8
9
|
color: @white;
|
9
|
-
text-
|
10
|
+
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
10
11
|
background-color: @grayLight;
|
11
12
|
.border-radius(3px);
|
12
|
-
&.important { background-color: #c43c35; }
|
13
|
-
&.warning { background-color: @orange; }
|
14
|
-
&.success { background-color: @green; }
|
15
|
-
&.notice { background-color: lighten(@blue, 25%); }
|
16
13
|
}
|
14
|
+
|
15
|
+
// Hover state
|
16
|
+
.label:hover {
|
17
|
+
color: @white;
|
18
|
+
text-decoration: none;
|
19
|
+
}
|
20
|
+
|
21
|
+
// Colors
|
22
|
+
.label-important { background-color: @errorText; }
|
23
|
+
.label-important:hover { background-color: darken(@errorText, 10%); }
|
24
|
+
|
25
|
+
.label-warning { background-color: @orange; }
|
26
|
+
.label-warning:hover { background-color: darken(@orange, 10%); }
|
27
|
+
|
28
|
+
.label-success { background-color: @successText; }
|
29
|
+
.label-success:hover { background-color: darken(@successText, 10%); }
|
30
|
+
|
31
|
+
.label-info { background-color: @infoText; }
|
32
|
+
.label-info:hover { background-color: darken(@infoText, 10%); }
|
@@ -0,0 +1,17 @@
|
|
1
|
+
//
|
2
|
+
// Layouts
|
3
|
+
// Fixed-width and fluid (with sidebar) layouts
|
4
|
+
// --------------------------------------------
|
5
|
+
|
6
|
+
|
7
|
+
// Container (centered, fixed-width layouts)
|
8
|
+
.container {
|
9
|
+
.container-fixed();
|
10
|
+
}
|
11
|
+
|
12
|
+
// Fluid layouts (left aligned, with sidebar, min- & max-width content)
|
13
|
+
.container-fluid {
|
14
|
+
padding-left: @gridGutterWidth;
|
15
|
+
padding-right: @gridGutterWidth;
|
16
|
+
.clearfix();
|
17
|
+
}
|
@@ -7,9 +7,9 @@
|
|
7
7
|
// --------------------------------------------------
|
8
8
|
|
9
9
|
// Clearfix
|
10
|
-
//
|
10
|
+
// --------
|
11
11
|
// For clearing floats like a boss h5bp.com/q
|
12
|
-
.clearfix
|
12
|
+
.clearfix {
|
13
13
|
*zoom: 1;
|
14
14
|
&:before,
|
15
15
|
&:after {
|
@@ -21,8 +21,18 @@
|
|
21
21
|
}
|
22
22
|
}
|
23
23
|
|
24
|
+
// Webkit-style focus
|
25
|
+
// ------------------
|
26
|
+
.tab-focus() {
|
27
|
+
// Default
|
28
|
+
outline: thin dotted #333;
|
29
|
+
// Webkit
|
30
|
+
outline: 5px auto -webkit-focus-ring-color;
|
31
|
+
outline-offset: -2px;
|
32
|
+
}
|
33
|
+
|
24
34
|
// Center-align a block level element
|
25
|
-
//
|
35
|
+
// ----------------------------------
|
26
36
|
.center-block() {
|
27
37
|
display: block;
|
28
38
|
margin-left: auto;
|
@@ -30,12 +40,34 @@
|
|
30
40
|
}
|
31
41
|
|
32
42
|
// IE7 inline-block
|
33
|
-
//
|
43
|
+
// ----------------
|
34
44
|
.ie7-inline-block() {
|
35
45
|
*display: inline; /* IE7 inline-block hack */
|
36
46
|
*zoom: 1;
|
37
47
|
}
|
38
48
|
|
49
|
+
// IE7 likes to collapse whitespace on either side of the inline-block elements.
|
50
|
+
// Ems because we're attempting to match the width of a space character. Left
|
51
|
+
// version is for form buttons, which typically come after other elements, and
|
52
|
+
// right version is for icons, which come before. Applying both is ok, but it will
|
53
|
+
// mean that space between those elements will be .6em (~2 space characters) in IE7,
|
54
|
+
// instead of the 1 space in other browsers.
|
55
|
+
.ie7-restore-left-whitespace() {
|
56
|
+
*margin-left: .3em;
|
57
|
+
|
58
|
+
&:first-child {
|
59
|
+
*margin-left: 0;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
.ie7-restore-right-whitespace() {
|
64
|
+
*margin-right: .3em;
|
65
|
+
|
66
|
+
&:last-child {
|
67
|
+
*margin-left: 0;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
39
71
|
// Sizing shortcuts
|
40
72
|
// -------------------------
|
41
73
|
.size(@height: 5px, @width: 5px) {
|
@@ -57,6 +89,15 @@
|
|
57
89
|
}
|
58
90
|
}
|
59
91
|
|
92
|
+
// Text overflow
|
93
|
+
// -------------------------
|
94
|
+
// Requires inline-block or block for proper styling
|
95
|
+
.text-overflow() {
|
96
|
+
overflow: hidden;
|
97
|
+
text-overflow: ellipsis;
|
98
|
+
white-space: nowrap;
|
99
|
+
}
|
100
|
+
|
60
101
|
|
61
102
|
|
62
103
|
// FONTS
|
@@ -101,29 +142,178 @@
|
|
101
142
|
// Site container
|
102
143
|
// -------------------------
|
103
144
|
.container-fixed() {
|
104
|
-
width: @
|
145
|
+
width: @gridRowWidth;
|
105
146
|
margin-left: auto;
|
106
147
|
margin-right: auto;
|
107
148
|
.clearfix();
|
108
149
|
}
|
109
150
|
|
110
|
-
//
|
151
|
+
// Le grid system
|
111
152
|
// -------------------------
|
112
|
-
|
113
|
-
|
153
|
+
#gridSystem {
|
154
|
+
// Setup the mixins to be used
|
155
|
+
.columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @columns) {
|
156
|
+
width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
|
157
|
+
}
|
158
|
+
.offset(@gridColumnWidth, @gridGutterWidth, @columns) {
|
159
|
+
margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2);
|
160
|
+
}
|
161
|
+
.gridColumn(@gridGutterWidth) {
|
162
|
+
float: left;
|
163
|
+
margin-left: @gridGutterWidth;
|
164
|
+
}
|
165
|
+
// Take these values and mixins, and make 'em do their thang
|
166
|
+
.generate(@gridColumns, @gridColumnWidth, @gridGutterWidth) {
|
167
|
+
// Row surrounds the columns
|
168
|
+
.row {
|
169
|
+
margin-left: @gridGutterWidth * -1;
|
170
|
+
.clearfix();
|
171
|
+
}
|
172
|
+
// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
|
173
|
+
[class*="span"] {
|
174
|
+
#gridSystem > .gridColumn(@gridGutterWidth);
|
175
|
+
}
|
176
|
+
// Default columns
|
177
|
+
.span1 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); }
|
178
|
+
.span2 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 2); }
|
179
|
+
.span3 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 3); }
|
180
|
+
.span4 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 4); }
|
181
|
+
.span5 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 5); }
|
182
|
+
.span6 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 6); }
|
183
|
+
.span7 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 7); }
|
184
|
+
.span8 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 8); }
|
185
|
+
.span9 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 9); }
|
186
|
+
.span10 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 10); }
|
187
|
+
.span11 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 11); }
|
188
|
+
.span12,
|
189
|
+
.container { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 12); }
|
190
|
+
// Offset column options
|
191
|
+
.offset1 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 1); }
|
192
|
+
.offset2 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 2); }
|
193
|
+
.offset3 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 3); }
|
194
|
+
.offset4 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 4); }
|
195
|
+
.offset5 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 5); }
|
196
|
+
.offset6 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 6); }
|
197
|
+
.offset7 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 7); }
|
198
|
+
.offset8 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 8); }
|
199
|
+
.offset9 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 9); }
|
200
|
+
.offset10 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 10); }
|
201
|
+
.offset11 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 11); }
|
202
|
+
}
|
114
203
|
}
|
115
|
-
|
116
|
-
|
204
|
+
|
205
|
+
// Fluid grid system
|
206
|
+
// -------------------------
|
207
|
+
#fluidGridSystem {
|
208
|
+
// Setup the mixins to be used
|
209
|
+
.columns(@fluidGridGutterWidth, @fluidGridColumnWidth, @columns) {
|
210
|
+
width: 1% * (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
|
211
|
+
}
|
212
|
+
.gridColumn(@fluidGridGutterWidth) {
|
213
|
+
float: left;
|
214
|
+
margin-left: @fluidGridGutterWidth;
|
215
|
+
}
|
216
|
+
// Take these values and mixins, and make 'em do their thang
|
217
|
+
.generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth) {
|
218
|
+
// Row surrounds the columns
|
219
|
+
.row-fluid {
|
220
|
+
width: 100%;
|
221
|
+
.clearfix();
|
222
|
+
|
223
|
+
// Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
|
224
|
+
> [class*="span"] {
|
225
|
+
#fluidGridSystem > .gridColumn(@fluidGridGutterWidth);
|
226
|
+
}
|
227
|
+
> [class*="span"]:first-child {
|
228
|
+
margin-left: 0;
|
229
|
+
}
|
230
|
+
// Default columns
|
231
|
+
> .span1 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 1); }
|
232
|
+
> .span2 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 2); }
|
233
|
+
> .span3 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 3); }
|
234
|
+
> .span4 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 4); }
|
235
|
+
> .span5 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 5); }
|
236
|
+
> .span6 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 6); }
|
237
|
+
> .span7 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 7); }
|
238
|
+
> .span8 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 8); }
|
239
|
+
> .span9 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 9); }
|
240
|
+
> .span10 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 10); }
|
241
|
+
> .span11 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 11); }
|
242
|
+
> .span12 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 12); }
|
243
|
+
}
|
244
|
+
}
|
117
245
|
}
|
118
|
-
|
119
|
-
|
246
|
+
|
247
|
+
// Input grid system
|
248
|
+
// -------------------------
|
249
|
+
#inputGridSystem {
|
250
|
+
.inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @columns) {
|
251
|
+
width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 10;
|
252
|
+
}
|
253
|
+
.generate(@gridColumns, @gridColumnWidth, @gridGutterWidth) {
|
254
|
+
input,
|
255
|
+
textarea,
|
256
|
+
.uneditable-input {
|
257
|
+
&.span1 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); }
|
258
|
+
&.span2 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 2); }
|
259
|
+
&.span3 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 3); }
|
260
|
+
&.span4 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 4); }
|
261
|
+
&.span5 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 5); }
|
262
|
+
&.span6 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 6); }
|
263
|
+
&.span7 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 7); }
|
264
|
+
&.span8 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 8); }
|
265
|
+
&.span9 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 9); }
|
266
|
+
&.span10 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 10); }
|
267
|
+
&.span11 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 11); }
|
268
|
+
&.span12 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 12); }
|
269
|
+
}
|
270
|
+
}
|
271
|
+
}
|
272
|
+
|
273
|
+
// Make a Grid
|
274
|
+
// -------------------------
|
275
|
+
// Use .makeRow and .makeColumn to assign semantic layouts grid system behavior
|
276
|
+
.makeRow() {
|
277
|
+
margin-left: @gridGutterWidth * -1;
|
278
|
+
.clearfix();
|
279
|
+
}
|
280
|
+
.makeColumn(@columns: 1) {
|
120
281
|
float: left;
|
121
282
|
margin-left: @gridGutterWidth;
|
283
|
+
width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
|
122
284
|
}
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
// Form field states (used in forms.less)
|
289
|
+
// --------------------------------------------------
|
290
|
+
|
291
|
+
// Mixin for form field states
|
292
|
+
.formFieldState(@textColor: #555, @borderColor: #ccc, @backgroundColor: #f5f5f5) {
|
293
|
+
// Set the text color
|
294
|
+
> label,
|
295
|
+
.help-block,
|
296
|
+
.help-inline {
|
297
|
+
color: @textColor;
|
298
|
+
}
|
299
|
+
// Style inputs accordingly
|
300
|
+
input,
|
301
|
+
select,
|
302
|
+
textarea {
|
303
|
+
color: @textColor;
|
304
|
+
border-color: @borderColor;
|
305
|
+
&:focus {
|
306
|
+
border-color: darken(@borderColor, 10%);
|
307
|
+
.box-shadow(0 0 6px lighten(@borderColor, 20%));
|
308
|
+
}
|
309
|
+
}
|
310
|
+
// Give a small background color for input-prepend/-append
|
311
|
+
.input-prepend .add-on,
|
312
|
+
.input-append .add-on {
|
313
|
+
color: @textColor;
|
314
|
+
background-color: @backgroundColor;
|
315
|
+
border-color: @textColor;
|
316
|
+
}
|
127
317
|
}
|
128
318
|
|
129
319
|
|
@@ -176,9 +366,23 @@
|
|
176
366
|
-o-transform: translate(@x, @y);
|
177
367
|
transform: translate(@x, @y);
|
178
368
|
}
|
369
|
+
.skew(@x: 0, @y: 0) {
|
370
|
+
-webkit-transform: skew(@x, @y);
|
371
|
+
-moz-transform: skew(@x, @y);
|
372
|
+
-ms-transform: skew(@x, @y);
|
373
|
+
-o-transform: skew(@x, @y);
|
374
|
+
transform: skew(@x, @y);
|
375
|
+
}
|
376
|
+
.translate3d(@x: 0, @y: 0, @z: 0) {
|
377
|
+
-webkit-transform: translate(@x, @y, @z);
|
378
|
+
-moz-transform: translate(@x, @y, @z);
|
379
|
+
-ms-transform: translate(@x, @y, @z);
|
380
|
+
-o-transform: translate(@x, @y, @z);
|
381
|
+
transform: translate(@x, @y, @z);
|
382
|
+
}
|
179
383
|
|
180
384
|
// Background clipping
|
181
|
-
// Heads up: FF 3.6 and under need padding instead of padding-box
|
385
|
+
// Heads up: FF 3.6 and under need "padding" instead of "padding-box"
|
182
386
|
.background-clip(@clip) {
|
183
387
|
-webkit-background-clip: @clip;
|
184
388
|
-moz-background-clip: @clip;
|
@@ -228,9 +432,8 @@
|
|
228
432
|
|
229
433
|
// Opacity
|
230
434
|
.opacity(@opacity: 100) {
|
231
|
-
|
232
|
-
|
233
|
-
opacity: @opacity / 100;
|
435
|
+
opacity: @opacity / 100;
|
436
|
+
filter: e(%("alpha(opacity=%d)", @opacity));
|
234
437
|
}
|
235
438
|
|
236
439
|
|
@@ -245,9 +448,7 @@
|
|
245
448
|
}
|
246
449
|
.border(@color: @white, @alpha: 1) {
|
247
450
|
border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
|
248
|
-
|
249
|
-
-moz-background-clip: padding;
|
250
|
-
background-clip: padding-box;
|
451
|
+
.background-clip(padding-box);
|
251
452
|
}
|
252
453
|
}
|
253
454
|
|
@@ -262,10 +463,9 @@
|
|
262
463
|
#gradient {
|
263
464
|
.horizontal(@startColor: #555, @endColor: #333) {
|
264
465
|
background-color: @endColor;
|
265
|
-
background-image: -khtml-gradient(linear, left top, right top, from(@startColor), to(@endColor)); // Konqueror
|
266
466
|
background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
|
267
467
|
background-image: -ms-linear-gradient(left, @startColor, @endColor); // IE10
|
268
|
-
background-image: -webkit-gradient(linear,
|
468
|
+
background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
|
269
469
|
background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
|
270
470
|
background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
|
271
471
|
background-image: linear-gradient(left, @startColor, @endColor); // Le standard
|
@@ -273,16 +473,15 @@
|
|
273
473
|
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); // IE9 and down
|
274
474
|
}
|
275
475
|
.vertical(@startColor: #555, @endColor: #333) {
|
276
|
-
background-color: @endColor;
|
277
|
-
background-image: -khtml-gradient(linear, left top, left bottom, from(@startColor), to(@endColor)); // Konqueror
|
476
|
+
background-color: mix(@startColor, @endColor, 60%);
|
278
477
|
background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
|
279
478
|
background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10
|
280
|
-
background-image: -webkit-gradient(linear,
|
479
|
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
|
281
480
|
background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
|
282
481
|
background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
|
283
482
|
background-image: linear-gradient(top, @startColor, @endColor); // The standard
|
284
483
|
background-repeat: repeat-x;
|
285
|
-
|
484
|
+
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down
|
286
485
|
}
|
287
486
|
.directional(@startColor: #555, @endColor: #333, @deg: 45deg) {
|
288
487
|
background-color: @endColor;
|
@@ -294,7 +493,7 @@
|
|
294
493
|
background-image: linear-gradient(@deg, @startColor, @endColor); // The standard
|
295
494
|
}
|
296
495
|
.vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
|
297
|
-
background-color: @endColor;
|
496
|
+
background-color: mix(@midColor, @endColor, 80%);
|
298
497
|
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
|
299
498
|
background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor);
|
300
499
|
background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor);
|
@@ -305,11 +504,11 @@
|
|
305
504
|
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down, gets no color-stop at all for proper fallback
|
306
505
|
}
|
307
506
|
.radial(@innerColor: #555, @outerColor: #333) {
|
308
|
-
background-color: @
|
309
|
-
background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@
|
310
|
-
background-image: -webkit-radial-gradient(circle, @
|
311
|
-
background-image: -moz-radial-gradient(circle, @
|
312
|
-
background-image: -ms-radial-gradient(circle, @
|
507
|
+
background-color: @outerColor;
|
508
|
+
background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor));
|
509
|
+
background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor);
|
510
|
+
background-image: -moz-radial-gradient(circle, @innerColor, @outerColor);
|
511
|
+
background-image: -ms-radial-gradient(circle, @innerColor, @outerColor);
|
313
512
|
background-repeat: no-repeat;
|
314
513
|
// Opera cannot do radial gradients yet
|
315
514
|
}
|
@@ -323,13 +522,31 @@
|
|
323
522
|
background-image: linear-gradient(@angle, rgba(255,255,255,.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.15) 50%, rgba(255,255,255,.15) 75%, transparent 75%, transparent);
|
324
523
|
}
|
325
524
|
}
|
326
|
-
|
327
525
|
// Reset filters for IE
|
328
526
|
.reset-filter() {
|
329
527
|
filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
|
330
528
|
}
|
331
529
|
|
332
530
|
|
531
|
+
// Mixin for generating button backgrounds
|
532
|
+
// ---------------------------------------
|
533
|
+
.buttonBackground(@startColor, @endColor) {
|
534
|
+
// gradientBar will set the background to a pleasing blend of these, to support IE<=9
|
535
|
+
.gradientBar(@startColor, @endColor);
|
536
|
+
.reset-filter();
|
537
|
+
|
538
|
+
// in these cases the gradient won't cover the background, so we override
|
539
|
+
&:hover, &:active, &.active, &.disabled, &[disabled] {
|
540
|
+
background-color: @endColor;
|
541
|
+
}
|
542
|
+
|
543
|
+
// IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
|
544
|
+
&:active,
|
545
|
+
&.active {
|
546
|
+
background-color: darken(@endColor, 10%) e("\9");
|
547
|
+
}
|
548
|
+
}
|
549
|
+
|
333
550
|
|
334
551
|
// COMPONENT MIXINS
|
335
552
|
// --------------------------------------------------
|