bootstrapped 1.0.1 → 2.0.3

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.
Files changed (60) hide show
  1. data/.gitmodules +3 -0
  2. data/README.rdoc +7 -1
  3. data/bootstrapped.gemspec +1 -1
  4. data/lib/bootstrapped/engine.rb +1 -1
  5. data/lib/bootstrapped/version.rb +2 -1
  6. data/vendor/assets/javascripts/bootstrap-alert.js +28 -29
  7. data/vendor/assets/javascripts/bootstrap-button.js +32 -34
  8. data/vendor/assets/javascripts/bootstrap-carousel.js +34 -19
  9. data/vendor/assets/javascripts/bootstrap-collapse.js +47 -26
  10. data/vendor/assets/javascripts/bootstrap-dropdown.js +18 -10
  11. data/vendor/assets/javascripts/bootstrap-modal.js +26 -18
  12. data/vendor/assets/javascripts/bootstrap-popover.js +13 -10
  13. data/vendor/assets/javascripts/bootstrap-scrollspy.js +43 -17
  14. data/vendor/assets/javascripts/bootstrap-tab.js +12 -7
  15. data/vendor/assets/javascripts/bootstrap-tooltip.js +40 -35
  16. data/vendor/assets/javascripts/bootstrap-transition.js +31 -21
  17. data/vendor/assets/javascripts/bootstrap-typeahead.js +30 -16
  18. data/vendor/assets/stylesheets/twitter/bootstrap/static/bootstrap-responsive.css +808 -0
  19. data/vendor/assets/stylesheets/twitter/bootstrap/static/bootstrap.css +2314 -850
  20. data/vendor/less/twitter/bootstrap/less/accordion.less +5 -0
  21. data/vendor/less/twitter/bootstrap/less/alerts.less +2 -14
  22. data/vendor/less/twitter/bootstrap/less/bootstrap.less +2 -2
  23. data/vendor/less/twitter/bootstrap/less/breadcrumbs.less +3 -1
  24. data/vendor/less/twitter/bootstrap/less/button-groups.less +78 -34
  25. data/vendor/less/twitter/bootstrap/less/buttons.less +53 -27
  26. data/vendor/less/twitter/bootstrap/less/carousel.less +0 -0
  27. data/vendor/less/twitter/bootstrap/less/close.less +12 -1
  28. data/vendor/less/twitter/bootstrap/less/code.less +18 -5
  29. data/vendor/less/twitter/bootstrap/less/component-animations.less +9 -7
  30. data/vendor/less/twitter/bootstrap/less/dropdowns.less +59 -47
  31. data/vendor/less/twitter/bootstrap/less/forms.less +167 -98
  32. data/vendor/less/twitter/bootstrap/less/grid.less +2 -5
  33. data/vendor/less/twitter/bootstrap/less/hero-unit.less +3 -1
  34. data/vendor/less/twitter/bootstrap/less/labels-badges.less +55 -0
  35. data/vendor/less/twitter/bootstrap/less/layouts.less +1 -1
  36. data/vendor/less/twitter/bootstrap/less/mixins.less +261 -167
  37. data/vendor/less/twitter/bootstrap/less/modals.less +22 -4
  38. data/vendor/less/twitter/bootstrap/less/navbar.less +147 -75
  39. data/vendor/less/twitter/bootstrap/less/navs.less +72 -53
  40. data/vendor/less/twitter/bootstrap/less/pager.less +6 -0
  41. data/vendor/less/twitter/bootstrap/less/pagination.less +1 -0
  42. data/vendor/less/twitter/bootstrap/less/popovers.less +0 -0
  43. data/vendor/less/twitter/bootstrap/less/progress-bars.less +27 -5
  44. data/vendor/less/twitter/bootstrap/less/reset.less +4 -4
  45. data/vendor/less/twitter/bootstrap/less/responsive-1200px-min.less +26 -0
  46. data/vendor/less/twitter/bootstrap/less/responsive-767px-max.less +149 -0
  47. data/vendor/less/twitter/bootstrap/less/responsive-768px-979px.less +17 -0
  48. data/vendor/less/twitter/bootstrap/less/responsive-navbar.less +146 -0
  49. data/vendor/less/twitter/bootstrap/less/responsive-utilities.less +41 -0
  50. data/vendor/less/twitter/bootstrap/less/responsive.less +14 -289
  51. data/vendor/less/twitter/bootstrap/less/scaffolding.less +4 -4
  52. data/vendor/less/twitter/bootstrap/less/sprites.less +47 -12
  53. data/vendor/less/twitter/bootstrap/less/tables.less +59 -22
  54. data/vendor/less/twitter/bootstrap/less/thumbnails.less +15 -3
  55. data/vendor/less/twitter/bootstrap/less/tooltip.less +0 -0
  56. data/vendor/less/twitter/bootstrap/less/type.less +30 -12
  57. data/vendor/less/twitter/bootstrap/less/utilities.less +0 -0
  58. data/vendor/less/twitter/bootstrap/less/variables.less +119 -13
  59. data/vendor/less/twitter/bootstrap/less/wells.less +10 -0
  60. metadata +30 -22
@@ -1,6 +1,7 @@
1
1
  // MODALS
2
2
  // ------
3
3
 
4
+ // Recalculate z-index where appropriate
4
5
  .modal-open {
5
6
  .dropdown-menu { z-index: @zindexDropdown + @zindexModal; }
6
7
  .dropdown.open { *z-index: @zindexDropdown + @zindexModal; }
@@ -8,6 +9,7 @@
8
9
  .tooltip { z-index: @zindexTooltip + @zindexModal; }
9
10
  }
10
11
 
12
+ // Background
11
13
  .modal-backdrop {
12
14
  position: fixed;
13
15
  top: 0;
@@ -25,12 +27,12 @@
25
27
  .opacity(80);
26
28
  }
27
29
 
30
+ // Base modal
28
31
  .modal {
29
32
  position: fixed;
30
33
  top: 50%;
31
34
  left: 50%;
32
35
  z-index: @zindexModal;
33
- max-height: 500px;
34
36
  overflow: auto;
35
37
  width: 560px;
36
38
  margin: -250px 0 0 -280px;
@@ -53,20 +55,36 @@
53
55
  // Close icon
54
56
  .close { margin-top: 2px; }
55
57
  }
58
+
59
+ // Body (where all modal content resides)
56
60
  .modal-body {
61
+ overflow-y: auto;
62
+ max-height: 400px;
57
63
  padding: 15px;
58
64
  }
65
+ // Remove bottom margin if need be
66
+ .modal-form {
67
+ margin-bottom: 0;
68
+ }
69
+
70
+ // Footer (for actions)
59
71
  .modal-footer {
60
72
  padding: 14px 15px 15px;
61
73
  margin-bottom: 0;
74
+ text-align: right; // right align buttons
62
75
  background-color: #f5f5f5;
63
76
  border-top: 1px solid #ddd;
64
77
  .border-radius(0 0 6px 6px);
65
78
  .box-shadow(inset 0 1px 0 @white);
66
- .clearfix();
67
- .btn {
68
- float: right;
79
+ .clearfix(); // clear it in case folks use .pull-* classes on buttons
80
+
81
+ // Properly space out buttons
82
+ .btn + .btn {
69
83
  margin-left: 5px;
70
84
  margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs
71
85
  }
86
+ // but override that for button groups
87
+ .btn-group .btn + .btn {
88
+ margin-left: -1px;
89
+ }
72
90
  }
@@ -6,42 +6,30 @@
6
6
  // -------------
7
7
 
8
8
  .navbar {
9
+ // Fix for IE7's bad z-indexing so dropdowns don't appear below content that follows the navbar
10
+ *position: relative;
11
+ *z-index: 2;
12
+
9
13
  overflow: visible;
10
14
  margin-bottom: @baseLineHeight;
11
15
  }
12
16
 
13
17
  // Gradient is applied to it's own element because overflow visible is not honored by IE when filter is present
14
18
  .navbar-inner {
19
+ min-height: @navbarHeight;
15
20
  padding-left: 20px;
16
21
  padding-right: 20px;
17
22
  #gradient > .vertical(@navbarBackgroundHighlight, @navbarBackground);
18
23
  .border-radius(4px);
19
- @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
20
- .box-shadow(@shadow);
24
+ .box-shadow(~"0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1)");
21
25
  }
22
26
 
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;
27
+ // Set width to auto for default container
28
+ // We then reset it for fixed navbars in the #gridSystem mixin
29
+ .navbar .container {
30
+ width: auto;
44
31
  }
32
+
45
33
  // Override the default collapsed state
46
34
  .nav-collapse.collapse {
47
35
  height: auto;
@@ -50,6 +38,7 @@
50
38
 
51
39
  // Brand, links, text, and buttons
52
40
  .navbar {
41
+ color: @navbarText;
53
42
  // Hover and active states
54
43
  .brand:hover {
55
44
  text-decoration: none;
@@ -58,30 +47,34 @@
58
47
  .brand {
59
48
  float: left;
60
49
  display: block;
61
- padding: 8px 20px 12px;
50
+ // Vertically center the text given @navbarHeight
51
+ @elementHeight: 20px;
52
+ padding: ((@navbarHeight - @elementHeight) / 2 - 2) 20px ((@navbarHeight - @elementHeight) / 2 + 2);
62
53
  margin-left: -20px; // negative indent to left-align the text down the page
63
54
  font-size: 20px;
64
55
  font-weight: 200;
65
56
  line-height: 1;
66
- color: @white;
57
+ color: @navbarBrandColor;
67
58
  }
68
59
  // Plain text in topbar
69
60
  .navbar-text {
70
61
  margin-bottom: 0;
71
- line-height: 40px;
72
- color: @navbarText;
73
- a:hover {
74
- color: @white;
75
- background-color: transparent;
62
+ line-height: @navbarHeight;
63
+ }
64
+ // Janky solution for now to account for links outside the .nav
65
+ .navbar-link {
66
+ color: @navbarLinkColor;
67
+ &:hover {
68
+ color: @navbarLinkColorHover;
76
69
  }
77
70
  }
78
71
  // Buttons in navbar
79
72
  .btn,
80
73
  .btn-group {
81
- margin-top: 5px; // make buttons vertically centered in navbar
74
+ .navbarVerticalAlign(30px); // Vertically center in navbar
82
75
  }
83
76
  .btn-group .btn {
84
- margin-top: 0;
77
+ margin: 0; // then undo the margin here so we don't accidentally double it
85
78
  }
86
79
  }
87
80
 
@@ -90,56 +83,61 @@
90
83
  margin-bottom: 0; // remove default bottom margin
91
84
  .clearfix();
92
85
  input,
86
+ select,
87
+ .radio,
88
+ .checkbox {
89
+ .navbarVerticalAlign(30px); // Vertically center in navbar
90
+ }
91
+ input,
93
92
  select {
94
93
  display: inline-block;
95
- margin-top: 5px;
96
94
  margin-bottom: 0;
97
95
  }
98
- .radio,
99
- .checkbox {
100
- margin-top: 5px;
101
- }
102
96
  input[type="image"],
103
97
  input[type="checkbox"],
104
98
  input[type="radio"] {
105
99
  margin-top: 3px;
106
100
  }
101
+ .input-append,
102
+ .input-prepend {
103
+ margin-top: 6px;
104
+ white-space: nowrap; // preven two items from separating within a .navbar-form that has .pull-left
105
+ input {
106
+ margin-top: 0; // remove the margin on top since it's on the parent
107
+ }
108
+ }
107
109
  }
108
110
 
109
111
  // Navbar search
110
112
  .navbar-search {
111
113
  position: relative;
112
114
  float: left;
113
- margin-top: 6px;
115
+ .navbarVerticalAlign(28px); // Vertically center in navbar
114
116
  margin-bottom: 0;
115
117
  .search-query {
116
118
  padding: 4px 9px;
117
119
  #font > .sans-serif(13px, normal, 1);
118
120
  color: @white;
119
- color: rgba(255,255,255,.75);
120
- background: #666;
121
- background: rgba(255,255,255,.3);
122
- border: 1px solid #111;
123
- @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15);
124
- .box-shadow(@shadow);
121
+ background-color: @navbarSearchBackground;
122
+ border: 1px solid @navbarSearchBorder;
123
+ .box-shadow(~"inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15)");
125
124
  .transition(none);
126
125
 
127
- // Placeholder text gets special styles; can't be bundled together though for some reason
128
- .placeholder(@grayLighter);
129
-
130
- // Hover states
131
- &:hover {
132
- color: @white;
133
- background-color: @grayLight;
134
- background-color: rgba(255,255,255,.5);
126
+ // Placeholder text gets special styles; can't be a grouped selector
127
+ &:-moz-placeholder {
128
+ color: @navbarSearchPlaceholderColor;
135
129
  }
136
- // Focus states (we use .focused since IE8 and down doesn't support :focus)
130
+ &::-webkit-input-placeholder {
131
+ color: @navbarSearchPlaceholderColor;
132
+ }
133
+
134
+ // Focus states (we use .focused since IE7-8 and down doesn't support :focus)
137
135
  &:focus,
138
136
  &.focused {
139
137
  padding: 5px 10px;
140
138
  color: @grayDark;
141
139
  text-shadow: 0 1px 0 @white;
142
- background-color: @white;
140
+ background-color: @navbarSearchBackgroundFocus;
143
141
  border: 0;
144
142
  .box-shadow(0 0 3px rgba(0,0,0,.15));
145
143
  outline: 0;
@@ -148,22 +146,42 @@
148
146
  }
149
147
 
150
148
 
149
+
151
150
  // FIXED NAVBAR
152
151
  // ------------
153
152
 
154
- .navbar-fixed-top {
153
+ // Shared (top/bottom) styles
154
+ .navbar-fixed-top,
155
+ .navbar-fixed-bottom {
155
156
  position: fixed;
156
- top: 0;
157
157
  right: 0;
158
158
  left: 0;
159
159
  z-index: @zindexFixedNavbar;
160
+ margin-bottom: 0; // remove 18px margin for static navbar
160
161
  }
161
- .navbar-fixed-top .navbar-inner {
162
+ .navbar-fixed-top .navbar-inner,
163
+ .navbar-fixed-bottom .navbar-inner {
162
164
  padding-left: 0;
163
165
  padding-right: 0;
164
166
  .border-radius(0);
165
167
  }
166
168
 
169
+ .navbar-fixed-top .container,
170
+ .navbar-fixed-bottom .container {
171
+ #grid > .core > .span(@gridColumns);
172
+ }
173
+
174
+ // Fixed to top
175
+ .navbar-fixed-top {
176
+ top: 0;
177
+ }
178
+
179
+ // Fixed to bottom
180
+ .navbar-fixed-bottom {
181
+ bottom: 0;
182
+ }
183
+
184
+
167
185
 
168
186
  // NAVIGATION
169
187
  // ----------
@@ -186,15 +204,32 @@
186
204
  // Links
187
205
  .navbar .nav > li > a {
188
206
  float: none;
189
- padding: 10px 10px 11px;
207
+ // Vertically center the text given @navbarHeight
208
+ @elementHeight: 20px;
209
+ padding: ((@navbarHeight - @elementHeight) / 2 - 1) 10px ((@navbarHeight - @elementHeight) / 2 + 1);
190
210
  line-height: 19px;
191
211
  color: @navbarLinkColor;
192
212
  text-decoration: none;
193
213
  text-shadow: 0 -1px 0 rgba(0,0,0,.25);
194
214
  }
215
+ // Buttons
216
+ .navbar .btn {
217
+ display: inline-block;
218
+ padding: 4px 10px 4px;
219
+ // Vertically center the button given @navbarHeight
220
+ @elementHeight: 28px;
221
+ margin: ((@navbarHeight - @elementHeight) / 2 - 1) 5px ((@navbarHeight - @elementHeight) / 2);
222
+ line-height: @baseLineHeight;
223
+ }
224
+ .navbar .btn-group {
225
+ margin: 0;
226
+ // Vertically center the button given @navbarHeight
227
+ @elementHeight: 28px;
228
+ padding: ((@navbarHeight - @elementHeight) / 2 - 1) 5px ((@navbarHeight - @elementHeight) / 2);
229
+ }
195
230
  // Hover
196
231
  .navbar .nav > li > a:hover {
197
- background-color: transparent;
232
+ background-color: @navbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
198
233
  color: @navbarLinkColorHover;
199
234
  text-decoration: none;
200
235
  }
@@ -202,10 +237,9 @@
202
237
  // Active nav items
203
238
  .navbar .nav .active > a,
204
239
  .navbar .nav .active > a:hover {
205
- color: @navbarLinkColorHover;
240
+ color: @navbarLinkColorActive;
206
241
  text-decoration: none;
207
- background-color: @navbarBackground;
208
- background-color: rgba(0,0,0,.5);
242
+ background-color: @navbarLinkBackgroundActive;
209
243
  }
210
244
 
211
245
  // Dividers (basically a vertical hr)
@@ -224,6 +258,28 @@
224
258
  margin-right: 0;
225
259
  }
226
260
 
261
+ // Navbar button for toggling navbar items in responsive layouts
262
+ // These definitions need to come after '.navbar .btn'
263
+ .navbar .btn-navbar {
264
+ display: none;
265
+ float: right;
266
+ padding: 7px 10px;
267
+ margin-left: 5px;
268
+ margin-right: 5px;
269
+ .buttonBackground(@navbarBackgroundHighlight, @navbarBackground);
270
+ .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075)");
271
+ }
272
+ .navbar .btn-navbar .icon-bar {
273
+ display: block;
274
+ width: 18px;
275
+ height: 2px;
276
+ background-color: #f5f5f5;
277
+ .border-radius(1px);
278
+ .box-shadow(0 1px 0 rgba(0,0,0,.25));
279
+ }
280
+ .btn-navbar .icon-bar + .icon-bar {
281
+ margin-top: 3px;
282
+ }
227
283
 
228
284
 
229
285
  // Dropdown menus
@@ -231,15 +287,13 @@
231
287
 
232
288
  // Menu position and menu carets
233
289
  .navbar .dropdown-menu {
234
- margin-top: 1px;
235
- .border-radius(4px);
236
290
  &:before {
237
291
  content: '';
238
292
  display: inline-block;
239
293
  border-left: 7px solid transparent;
240
294
  border-right: 7px solid transparent;
241
295
  border-bottom: 7px solid #ccc;
242
- border-bottom-color: rgba(0,0,0,.2);
296
+ border-bottom-color: @dropdownBorder;
243
297
  position: absolute;
244
298
  top: -7px;
245
299
  left: 9px;
@@ -249,36 +303,54 @@
249
303
  display: inline-block;
250
304
  border-left: 6px solid transparent;
251
305
  border-right: 6px solid transparent;
252
- border-bottom: 6px solid @white;
306
+ border-bottom: 6px solid @dropdownBackground;
253
307
  position: absolute;
254
308
  top: -6px;
255
309
  left: 10px;
256
310
  }
257
311
  }
258
-
312
+ // Menu position and menu caret support for dropups via extra dropup class
313
+ .navbar-fixed-bottom .dropdown-menu {
314
+ &:before {
315
+ border-top: 7px solid #ccc;
316
+ border-top-color: @dropdownBorder;
317
+ border-bottom: 0;
318
+ bottom: -7px;
319
+ top: auto;
320
+ }
321
+ &:after {
322
+ border-top: 6px solid @dropdownBackground;
323
+ border-bottom: 0;
324
+ bottom: -6px;
325
+ top: auto;
326
+ }
327
+ }
259
328
  // Dropdown toggle caret
260
- .navbar .nav .dropdown-toggle .caret,
261
- .navbar .nav .open.dropdown .caret {
329
+ .navbar .nav li.dropdown .dropdown-toggle .caret,
330
+ .navbar .nav li.dropdown.open .caret {
262
331
  border-top-color: @white;
332
+ border-bottom-color: @white;
263
333
  }
264
- .navbar .nav .active .caret {
334
+ .navbar .nav li.dropdown.active .caret {
265
335
  .opacity(100);
266
336
  }
267
337
 
268
338
  // Remove background color from open dropdown
269
- .navbar .nav .open > .dropdown-toggle,
270
- .navbar .nav .active > .dropdown-toggle,
271
- .navbar .nav .open.active > .dropdown-toggle {
339
+ .navbar .nav li.dropdown.open > .dropdown-toggle,
340
+ .navbar .nav li.dropdown.active > .dropdown-toggle,
341
+ .navbar .nav li.dropdown.open.active > .dropdown-toggle {
272
342
  background-color: transparent;
273
343
  }
274
344
 
275
345
  // Dropdown link on hover
276
- .navbar .nav .active > .dropdown-toggle:hover {
346
+ .navbar .nav li.dropdown.active > .dropdown-toggle:hover {
277
347
  color: @white;
278
348
  }
279
349
 
280
350
  // Right aligned menus need alt position
281
- .navbar .nav.pull-right .dropdown-menu {
351
+ // TODO: rejigger this at some point to simplify the selectors
352
+ .navbar .pull-right .dropdown-menu,
353
+ .navbar .dropdown-menu.pull-right {
282
354
  left: auto;
283
355
  right: 0;
284
356
  &:before {