twitter-bootstrap-rails 2.0 → 2.0.1

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.

Files changed (69) hide show
  1. data/README.md +27 -27
  2. data/Rakefile +1 -1
  3. data/lib/generators/bootstrap/install/install_generator.rb +1 -1
  4. data/lib/generators/bootstrap/install/templates/bootstrap.coffee +5 -15
  5. data/lib/generators/bootstrap/install/templates/bootstrap.less +4 -3
  6. data/lib/generators/bootstrap/layout/layout_generator.rb +14 -4
  7. data/lib/generators/bootstrap/layout/templates/layout.html.erb +112 -49
  8. data/lib/generators/bootstrap/layout/templates/layout.html.haml +90 -0
  9. data/lib/generators/bootstrap/layout/templates/layout.html.slim +77 -0
  10. data/lib/generators/bootstrap/themed/templates/_form.html.erb +1 -1
  11. data/lib/generators/bootstrap/themed/templates/_form.html.haml +11 -0
  12. data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -0
  13. data/lib/generators/bootstrap/themed/templates/edit.html.haml +3 -0
  14. data/lib/generators/bootstrap/themed/templates/edit.html.slim +3 -0
  15. data/lib/generators/bootstrap/themed/templates/index.html.erb +2 -2
  16. data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
  17. data/lib/generators/bootstrap/themed/templates/index.html.slim +25 -0
  18. data/lib/generators/bootstrap/themed/templates/new.html.haml +2 -0
  19. data/lib/generators/bootstrap/themed/templates/new.html.slim +2 -0
  20. data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -4
  21. data/lib/generators/bootstrap/themed/templates/show.html.haml +9 -0
  22. data/lib/generators/bootstrap/themed/templates/show.html.slim +9 -0
  23. data/lib/generators/bootstrap/themed/themed_generator.rb +13 -13
  24. data/lib/twitter/bootstrap/rails/version.rb +1 -1
  25. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  26. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  27. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +9 -3
  28. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +1 -1
  29. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +3 -3
  30. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +6 -4
  31. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +15 -6
  32. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +7 -3
  33. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +3 -3
  34. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +3 -2
  35. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +10 -5
  36. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +1 -1
  37. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +39 -20
  38. data/vendor/toolkit/twitter/bootstrap/accordion.less +5 -4
  39. data/vendor/toolkit/twitter/bootstrap/alerts.less +1 -0
  40. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +10 -8
  41. data/vendor/toolkit/twitter/bootstrap/button-groups.less +48 -18
  42. data/vendor/toolkit/twitter/bootstrap/buttons.less +137 -88
  43. data/vendor/toolkit/twitter/bootstrap/carousel.less +12 -5
  44. data/vendor/toolkit/twitter/bootstrap/code.less +44 -0
  45. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +23 -2
  46. data/vendor/toolkit/twitter/bootstrap/forms.less +83 -64
  47. data/vendor/toolkit/twitter/bootstrap/grid.less +8 -0
  48. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +20 -0
  49. data/vendor/toolkit/twitter/bootstrap/labels.less +4 -4
  50. data/vendor/toolkit/twitter/bootstrap/layouts.less +17 -0
  51. data/vendor/toolkit/twitter/bootstrap/mixins.less +202 -38
  52. data/vendor/toolkit/twitter/bootstrap/modals.less +9 -2
  53. data/vendor/toolkit/twitter/bootstrap/navbar.less +70 -29
  54. data/vendor/toolkit/twitter/bootstrap/navs.less +70 -64
  55. data/vendor/toolkit/twitter/bootstrap/pager.less +7 -2
  56. data/vendor/toolkit/twitter/bootstrap/pagination.less +1 -0
  57. data/vendor/toolkit/twitter/bootstrap/popovers.less +25 -25
  58. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +14 -18
  59. data/vendor/toolkit/twitter/bootstrap/reset.less +2 -3
  60. data/vendor/toolkit/twitter/bootstrap/responsive.less +219 -164
  61. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +6 -89
  62. data/vendor/toolkit/twitter/bootstrap/sprites.less +137 -99
  63. data/vendor/toolkit/twitter/bootstrap/tables.less +1 -54
  64. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +2 -0
  65. data/vendor/toolkit/twitter/bootstrap/type.less +12 -42
  66. data/vendor/toolkit/twitter/bootstrap/variables.less +23 -14
  67. metadata +34 -18
  68. data/vendor/toolkit/twitter/bootstrap/patterns.less +0 -30
  69. data/vendor/toolkit/twitter/bootstrap/print.less +0 -18
@@ -0,0 +1,8 @@
1
+ // GRID SYSTEM
2
+ // -----------
3
+
4
+ // Fixed (940px)
5
+ #gridSystem > .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth);
6
+
7
+ // Fluid (940px)
8
+ #fluidGridSystem > .generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth);
@@ -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
+ }
@@ -9,8 +9,8 @@
9
9
  text-transform: uppercase;
10
10
  background-color: @grayLight;
11
11
  .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
12
  }
13
+ .label-important { background-color: @errorText; }
14
+ .label-warning { background-color: @orange; }
15
+ .label-success { background-color: @successText; }
16
+ .label-info { background-color: @infoText; }
@@ -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,7 +7,7 @@
7
7
  // --------------------------------------------------
8
8
 
9
9
  // Clearfix
10
- // -------------------------
10
+ // --------
11
11
  // For clearing floats like a boss h5bp.com/q
12
12
  .clearfix() {
13
13
  *zoom: 1;
@@ -21,8 +21,18 @@
21
21
  }
22
22
  }
23
23
 
24
+ // Webkit-style focus
25
+ // ------------------
26
+ .tab-focus() {
27
+ // Default
28
+ outline: thin dotted;
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) {
@@ -101,29 +133,134 @@
101
133
  // Site container
102
134
  // -------------------------
103
135
  .container-fixed() {
104
- width: @siteWidth;
136
+ width: @gridRowWidth;
105
137
  margin-left: auto;
106
138
  margin-right: auto;
107
139
  .clearfix();
108
140
  }
109
141
 
110
- // Columns and offseting
142
+ // Le grid system
111
143
  // -------------------------
112
- .columns(@columns: 1) {
113
- width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
114
- }
115
- .offset(@columns: 1) {
116
- margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2);
144
+ #gridSystem {
145
+ // Setup the mixins to be used
146
+ .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @columns) {
147
+ width: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1));
148
+ }
149
+ .offset(@gridColumnWidth, @gridGutterWidth, @columns) {
150
+ margin-left: (@gridColumnWidth * @columns) + (@gridGutterWidth * (@columns - 1)) + (@gridGutterWidth * 2);
151
+ }
152
+ .gridColumn(@gridGutterWidth) {
153
+ float: left;
154
+ margin-left: @gridGutterWidth;
155
+ }
156
+ // Take these values and mixins, and make 'em do their thang
157
+ .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth) {
158
+ // Row surrounds the columns
159
+ .row {
160
+ margin-left: @gridGutterWidth * -1;
161
+ .clearfix();
162
+ }
163
+ // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
164
+ [class*="span"] {
165
+ #gridSystem > .gridColumn(@gridGutterWidth);
166
+ }
167
+ // Default columns
168
+ .span1 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); }
169
+ .span2 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 2); }
170
+ .span3 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 3); }
171
+ .span4 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 4); }
172
+ .span5 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 5); }
173
+ .span6 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 6); }
174
+ .span7 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 7); }
175
+ .span8 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 8); }
176
+ .span9 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 9); }
177
+ .span10 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 10); }
178
+ .span11 { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 11); }
179
+ .span12,
180
+ .container { #gridSystem > .columns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 12); }
181
+ // Offset column options
182
+ .offset1 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 1); }
183
+ .offset2 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 2); }
184
+ .offset3 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 3); }
185
+ .offset4 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 4); }
186
+ .offset5 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 5); }
187
+ .offset6 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 6); }
188
+ .offset7 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 7); }
189
+ .offset8 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 8); }
190
+ .offset9 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 9); }
191
+ .offset10 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 10); }
192
+ .offset11 { #gridSystem > .offset(@gridColumnWidth, @gridGutterWidth, 11); }
193
+ }
117
194
  }
118
- // Necessary grid styles for every column to make them appear next to each other horizontally
119
- .gridColumn() {
120
- float: left;
121
- margin-left: @gridGutterWidth;
195
+
196
+ // Fluid grid system
197
+ // -------------------------
198
+ #fluidGridSystem {
199
+ // Setup the mixins to be used
200
+ .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, @columns) {
201
+ width: 1% * (@fluidGridColumnWidth * @columns) + (@fluidGridGutterWidth * (@columns - 1));
202
+ }
203
+ .gridColumn(@fluidGridGutterWidth) {
204
+ float: left;
205
+ margin-left: @fluidGridGutterWidth;
206
+ }
207
+ // Take these values and mixins, and make 'em do their thang
208
+ .generate(@gridColumns, @fluidGridColumnWidth, @fluidGridGutterWidth) {
209
+ // Row surrounds the columns
210
+ .row-fluid {
211
+ width: 100%;
212
+ .clearfix();
213
+
214
+ // Find all .span# classes within .row and give them the necessary properties for grid columns (supported by all browsers back to IE7, thanks @dhg)
215
+ > [class*="span"] {
216
+ #fluidGridSystem > .gridColumn(@fluidGridGutterWidth);
217
+ }
218
+ > [class*="span"]:first-child {
219
+ margin-left: 0;
220
+ }
221
+ // Default columns
222
+ .span1 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 1); }
223
+ .span2 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 2); }
224
+ .span3 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 3); }
225
+ .span4 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 4); }
226
+ .span5 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 5); }
227
+ .span6 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 6); }
228
+ .span7 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 7); }
229
+ .span8 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 8); }
230
+ .span9 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 9); }
231
+ .span10 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 10); }
232
+ .span11 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 11); }
233
+ .span12 { #fluidGridSystem > .columns(@fluidGridGutterWidth, @fluidGridColumnWidth, 12); }
234
+ }
235
+ }
122
236
  }
123
- // makeColumn can be used to mark any element (e.g., .content-primary) as a column without changing markup to .span something
124
- .makeColumn(@columnSpan: 1) {
125
- .gridColumn();
126
- .columns(@columnSpan);
237
+
238
+
239
+
240
+ // Input grid system
241
+ // -------------------------
242
+ #inputGridSystem {
243
+ .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, @columns) {
244
+ width: ((@gridColumnWidth) * @columns) + (@gridGutterWidth * (@columns - 1)) - 10;
245
+ }
246
+ .generate(@gridColumns, @gridColumnWidth, @gridGutterWidth) {
247
+ input,
248
+ textarea,
249
+ .uneditable-input {
250
+ &.span1 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 1); }
251
+ &.span2 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 2); }
252
+ &.span3 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 3); }
253
+ &.span4 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 4); }
254
+ &.span5 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 5); }
255
+ &.span6 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 6); }
256
+ &.span7 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 7); }
257
+ &.span8 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 8); }
258
+ &.span9 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 9); }
259
+ &.span10 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 10); }
260
+ &.span11 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 11); }
261
+ &.span12 { #inputGridSystem > .inputColumns(@gridGutterWidth, @gridColumnWidth, @gridRowWidth, 12); }
262
+ }
263
+ }
127
264
  }
128
265
 
129
266
 
@@ -176,9 +313,23 @@
176
313
  -o-transform: translate(@x, @y);
177
314
  transform: translate(@x, @y);
178
315
  }
316
+ .skew(@x: 0, @y: 0) {
317
+ -webkit-transform: translate(@x, @y);
318
+ -moz-transform: translate(@x, @y);
319
+ -ms-transform: translate(@x, @y);
320
+ -o-transform: translate(@x, @y);
321
+ transform: translate(@x, @y);
322
+ }
323
+ .skew(@x: 0, @y: 0) {
324
+ -webkit-transform: skew(@x, @y);
325
+ -moz-transform: skew(@x, @y);
326
+ -ms-transform: skew(@x, @y);
327
+ -o-transform: skew(@x, @y);
328
+ transform: skew(@x, @y);
329
+ }
179
330
 
180
331
  // Background clipping
181
- // Heads up: FF 3.6 and under need padding instead of padding-box
332
+ // Heads up: FF 3.6 and under need "padding" instead of "padding-box"
182
333
  .background-clip(@clip) {
183
334
  -webkit-background-clip: @clip;
184
335
  -moz-background-clip: @clip;
@@ -228,9 +379,8 @@
228
379
 
229
380
  // Opacity
230
381
  .opacity(@opacity: 100) {
231
- filter: e(%("alpha(opacity=%d)", @opacity));
232
- -moz-opacity: @opacity / 100;
233
- opacity: @opacity / 100;
382
+ opacity: @opacity / 100;
383
+ filter: e(%("alpha(opacity=%d)", @opacity));
234
384
  }
235
385
 
236
386
 
@@ -245,9 +395,7 @@
245
395
  }
246
396
  .border(@color: @white, @alpha: 1) {
247
397
  border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha);
248
- -webkit-background-clip: padding-box;
249
- -moz-background-clip: padding;
250
- background-clip: padding-box;
398
+ .background-clip(padding-box);
251
399
  }
252
400
  }
253
401
 
@@ -262,10 +410,9 @@
262
410
  #gradient {
263
411
  .horizontal(@startColor: #555, @endColor: #333) {
264
412
  background-color: @endColor;
265
- background-image: -khtml-gradient(linear, left top, right top, from(@startColor), to(@endColor)); // Konqueror
266
413
  background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
267
414
  background-image: -ms-linear-gradient(left, @startColor, @endColor); // IE10
268
- background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+
415
+ background-image: -webkit-gradient(linear, 0 0, 100% 0, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
269
416
  background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
270
417
  background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
271
418
  background-image: linear-gradient(left, @startColor, @endColor); // Le standard
@@ -273,16 +420,15 @@
273
420
  filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); // IE9 and down
274
421
  }
275
422
  .vertical(@startColor: #555, @endColor: #333) {
276
- background-color: @endColor;
277
- background-image: -khtml-gradient(linear, left top, left bottom, from(@startColor), to(@endColor)); // Konqueror
423
+ background-color: mix(@startColor, @endColor, 60%);
278
424
  background-image: -moz-linear-gradient(top, @startColor, @endColor); // FF 3.6+
279
425
  background-image: -ms-linear-gradient(top, @startColor, @endColor); // IE10
280
- background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+
426
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), to(@endColor)); // Safari 4+, Chrome 2+
281
427
  background-image: -webkit-linear-gradient(top, @startColor, @endColor); // Safari 5.1+, Chrome 10+
282
428
  background-image: -o-linear-gradient(top, @startColor, @endColor); // Opera 11.10
283
429
  background-image: linear-gradient(top, @startColor, @endColor); // The standard
284
430
  background-repeat: repeat-x;
285
- filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down
431
+ filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE9 and down
286
432
  }
287
433
  .directional(@startColor: #555, @endColor: #333, @deg: 45deg) {
288
434
  background-color: @endColor;
@@ -294,7 +440,7 @@
294
440
  background-image: linear-gradient(@deg, @startColor, @endColor); // The standard
295
441
  }
296
442
  .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
297
- background-color: @endColor;
443
+ background-color: mix(@midColor, @endColor, 80%);
298
444
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor));
299
445
  background-image: -webkit-linear-gradient(@startColor, @midColor @colorStop, @endColor);
300
446
  background-image: -moz-linear-gradient(top, @startColor, @midColor @colorStop, @endColor);
@@ -305,11 +451,11 @@
305
451
  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
452
  }
307
453
  .radial(@innerColor: #555, @outerColor: #333) {
308
- background-color: @outsideColor;
309
- background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@centerColor), to(@outsideColor));
310
- background-image: -webkit-radial-gradient(circle, @centerColor, @outsideColor);
311
- background-image: -moz-radial-gradient(circle, @centerColor, @outsideColor);
312
- background-image: -ms-radial-gradient(circle, @centerColor, @outsideColor);
454
+ background-color: @outerColor;
455
+ background-image: -webkit-gradient(radial, center center, 0, center center, 460, from(@innerColor), to(@outerColor));
456
+ background-image: -webkit-radial-gradient(circle, @innerColor, @outerColor);
457
+ background-image: -moz-radial-gradient(circle, @innerColor, @outerColor);
458
+ background-image: -ms-radial-gradient(circle, @innerColor, @outerColor);
313
459
  background-repeat: no-repeat;
314
460
  // Opera cannot do radial gradients yet
315
461
  }
@@ -323,13 +469,31 @@
323
469
  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
470
  }
325
471
  }
326
-
327
472
  // Reset filters for IE
328
473
  .reset-filter() {
329
474
  filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
330
475
  }
331
476
 
332
477
 
478
+ // Mixin for generating button backgrounds
479
+ // ---------------------------------------
480
+ .buttonBackground(@startColor, @endColor) {
481
+ // gradientBar will set the background to a pleasing blend of these, to support IE<=9
482
+ .gradientBar(@startColor, @endColor);
483
+ .reset-filter();
484
+
485
+ // in these cases the gradient won't cover the background, so we override
486
+ &:hover, &:active, &.active, &.disabled, &[disabled] {
487
+ background-color: @endColor;
488
+ }
489
+
490
+ // IE 7 + 8 can't handle box-shadow to show active, so we darken a bit ourselves
491
+ &:active,
492
+ &.active {
493
+ background-color: darken(@endColor, 10%) e("\9");
494
+ }
495
+ }
496
+
333
497
 
334
498
  // COMPONENT MIXINS
335
499
  // --------------------------------------------------
@@ -1,6 +1,13 @@
1
1
  // MODALS
2
2
  // ------
3
3
 
4
+ .modal-open {
5
+ .dropdown-menu { z-index: @zindexDropdown + @zindexModal; }
6
+ .dropdown.open { *z-index: @zindexDropdown + @zindexModal; }
7
+ .popover { z-index: @zindexPopover + @zindexModal; }
8
+ .tooltip { z-index: @zindexTooltip + @zindexModal; }
9
+ }
10
+
4
11
  .modal-backdrop {
5
12
  position: fixed;
6
13
  top: 0;
@@ -41,7 +48,7 @@
41
48
  &.fade.in { top: 50%; }
42
49
  }
43
50
  .modal-header {
44
- padding: 5px 15px;
51
+ padding: 9px 15px;
45
52
  border-bottom: 1px solid #eee;
46
53
  // Close icon
47
54
  .close { margin-top: 2px; }
@@ -60,6 +67,6 @@
60
67
  .btn {
61
68
  float: right;
62
69
  margin-left: 5px;
63
- margin-bottom: 0; // account for input[type=submit] which gets the bottom margin like all other inputs
70
+ margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
64
71
  }
65
72
  }
@@ -7,20 +7,51 @@
7
7
 
8
8
  .navbar {
9
9
  overflow: visible;
10
+ margin-bottom: @baseLineHeight;
10
11
  }
11
- // gradient is applied to it's own element because overflow visible is not honored by IE when filter is present
12
+
13
+ // Gradient is applied to it's own element because overflow visible is not honored by IE when filter is present
12
14
  .navbar-inner {
13
- background-color: @navbarBackground;
15
+ padding-left: 20px;
16
+ padding-right: 20px;
14
17
  #gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground);
18
+ .border-radius(4px);
15
19
  @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
16
20
  .box-shadow(@shadow);
17
21
  }
18
22
 
19
- // Text and links
23
+ // Navbar button for toggling navbar items in responsive layouts
24
+ .btn-navbar {
25
+ display: none;
26
+ float: right;
27
+ padding: 7px 10px;
28
+ margin-left: 5px;
29
+ margin-right: 5px;
30
+ .buttonBackground(@navbarBackgroundHighlight, @navbarBackground);
31
+ @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
32
+ .box-shadow(@shadow);
33
+ }
34
+ .btn-navbar .icon-bar {
35
+ display: block;
36
+ width: 18px;
37
+ height: 2px;
38
+ background-color: #f5f5f5;
39
+ .border-radius(1px);
40
+ .box-shadow(0 1px 0 rgba(0,0,0,.25));
41
+ }
42
+ .btn-navbar .icon-bar + .icon-bar {
43
+ margin-top: 3px;
44
+ }
45
+ // Override the default collapsed state
46
+ .nav-collapse.collapse {
47
+ height: auto;
48
+ }
49
+
50
+
51
+ // Brand, links, text, and buttons
20
52
  .navbar {
21
53
  // Hover and active states
22
54
  .brand:hover {
23
- color: @white;
24
55
  text-decoration: none;
25
56
  }
26
57
  // Website or project name
@@ -35,9 +66,10 @@
35
66
  color: @white;
36
67
  }
37
68
  // Plain text in topbar
38
- p {
39
- margin: 0;
69
+ .navbar-text {
70
+ margin-bottom: 0;
40
71
  line-height: 40px;
72
+ color: @navbarText;
41
73
  a:hover {
42
74
  color: @white;
43
75
  background-color: transparent;
@@ -56,11 +88,22 @@
56
88
  // Navbar forms
57
89
  .navbar-form {
58
90
  margin-bottom: 0; // remove default bottom margin
91
+ .clearfix();
59
92
  input,
60
93
  select {
61
94
  display: inline-block;
95
+ margin-top: 5px;
62
96
  margin-bottom: 0;
63
97
  }
98
+ .radio,
99
+ .checkbox {
100
+ margin-top: 5px;
101
+ }
102
+ input[type="image"],
103
+ input[type="checkbox"],
104
+ input[type="radio"] {
105
+ margin-top: 3px;
106
+ }
64
107
  }
65
108
 
66
109
  // Navbar search
@@ -74,7 +117,7 @@
74
117
  #font > .sans-serif(13px, normal, 1);
75
118
  color: @white;
76
119
  color: rgba(255,255,255,.75);
77
- background: #444;
120
+ background: #666;
78
121
  background: rgba(255,255,255,.3);
79
122
  border: 1px solid #111;
80
123
  @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15);
@@ -105,25 +148,21 @@
105
148
  }
106
149
 
107
150
 
108
- // Static navbar
109
- .navbar-static {
110
- margin-bottom: @baseLineHeight;
111
- }
112
- .navbar-static .navbar-inner {
113
- padding-left: 20px;
114
- padding-right: 20px;
115
- .border-radius(4px);
116
- }
151
+ // FIXED NAVBAR
152
+ // ------------
117
153
 
118
- // Fixed navbar
119
- .navbar-fixed {
154
+ .navbar-fixed-top {
120
155
  position: fixed;
121
156
  top: 0;
122
157
  right: 0;
123
158
  left: 0;
124
159
  z-index: @zindexFixedNavbar;
125
160
  }
126
-
161
+ .navbar-fixed-top .navbar-inner {
162
+ padding-left: 0;
163
+ padding-right: 0;
164
+ .border-radius(0px);
165
+ }
127
166
 
128
167
 
129
168
  // NAVIGATION
@@ -149,33 +188,34 @@
149
188
  float: none;
150
189
  padding: 10px 10px 11px;
151
190
  line-height: 19px;
152
- color: @grayLight;
191
+ color: @navbarLinkColor;
153
192
  text-decoration: none;
154
193
  text-shadow: 0 -1px 0 rgba(0,0,0,.25);
155
194
  }
156
195
  // Hover
157
196
  .navbar .nav > li > a:hover {
158
197
  background-color: transparent;
159
- color: @white;
198
+ color: @navbarLinkColorHover;
160
199
  text-decoration: none;
161
200
  }
162
201
 
163
202
  // Active nav items
164
- .navbar .nav .active > a {
165
- color: @white;
203
+ .navbar .nav .active > a,
204
+ .navbar .nav .active > a:hover {
205
+ color: @navbarLinkColorHover;
166
206
  text-decoration: none;
167
- background-color: @grayDarker;
207
+ background-color: @navbarBackground;
168
208
  background-color: rgba(0,0,0,.5);
169
209
  }
170
210
 
171
211
  // Dividers (basically a vertical hr)
172
- .navbar .vertical-divider {
173
- height: 40px;
212
+ .navbar .divider-vertical {
213
+ height: @navbarHeight;
174
214
  width: 1px;
175
- margin: 0 5px;
215
+ margin: 0 9px;
176
216
  overflow: hidden;
177
- background-color: @grayDarker;
178
- border-right: 1px solid #444;
217
+ background-color: @navbarBackground;
218
+ border-right: 1px solid @navbarBackgroundHighlight;
179
219
  }
180
220
 
181
221
  // Secondary (floated right) nav in topbar
@@ -239,6 +279,7 @@
239
279
 
240
280
  // Right aligned menus need alt position
241
281
  .navbar .nav.pull-right .dropdown-menu {
282
+ left: auto;
242
283
  right: 0;
243
284
  &:before {
244
285
  left: auto;