anjlab-bootstrap-rails 3.0.0.rc1 → 3.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -12
  3. data/Rakefile +3 -2
  4. data/app/assets/javascripts/twitter/bootstrap.js +2 -1
  5. data/app/assets/javascripts/twitter/bootstrap/button.js +4 -2
  6. data/app/assets/javascripts/twitter/bootstrap/carousel.js +6 -2
  7. data/app/assets/javascripts/twitter/bootstrap/collapse.js +2 -2
  8. data/app/assets/javascripts/twitter/bootstrap/modal.js +19 -16
  9. data/app/assets/javascripts/twitter/bootstrap/popover.js +7 -5
  10. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +39 -21
  11. data/app/assets/javascripts/twitter/bootstrap/transition.js +2 -2
  12. data/app/assets/stylesheets/twitter/bootstrap/_alerts.scss +21 -19
  13. data/app/assets/stylesheets/twitter/bootstrap/_badges.scss +5 -5
  14. data/app/assets/stylesheets/twitter/bootstrap/_bootstrap.scss +1 -1
  15. data/app/assets/stylesheets/twitter/bootstrap/_button-groups.scss +96 -23
  16. data/app/assets/stylesheets/twitter/bootstrap/_buttons.scss +24 -18
  17. data/app/assets/stylesheets/twitter/bootstrap/_carousel.scss +10 -11
  18. data/app/assets/stylesheets/twitter/bootstrap/_close.scss +1 -1
  19. data/app/assets/stylesheets/twitter/bootstrap/_code.scss +4 -3
  20. data/app/assets/stylesheets/twitter/bootstrap/_dropdowns.scss +23 -18
  21. data/app/assets/stylesheets/twitter/bootstrap/_forms.scss +65 -160
  22. data/app/assets/stylesheets/twitter/bootstrap/_grid.scss +244 -59
  23. data/app/assets/stylesheets/twitter/bootstrap/_input-groups.scss +127 -0
  24. data/app/assets/stylesheets/twitter/bootstrap/_labels.scss +12 -4
  25. data/app/assets/stylesheets/twitter/bootstrap/_list-group.scss +36 -36
  26. data/app/assets/stylesheets/twitter/bootstrap/_mixins.scss +227 -52
  27. data/app/assets/stylesheets/twitter/bootstrap/_modals.scss +6 -9
  28. data/app/assets/stylesheets/twitter/bootstrap/_navbar.scss +268 -82
  29. data/app/assets/stylesheets/twitter/bootstrap/_navs.scss +10 -18
  30. data/app/assets/stylesheets/twitter/bootstrap/_pagination.scss +5 -41
  31. data/app/assets/stylesheets/twitter/bootstrap/_panels.scss +83 -57
  32. data/app/assets/stylesheets/twitter/bootstrap/_popovers.scss +0 -2
  33. data/app/assets/stylesheets/twitter/bootstrap/_progress-bars.scss +2 -8
  34. data/app/assets/stylesheets/twitter/bootstrap/_responsive-utilities.scss +76 -21
  35. data/app/assets/stylesheets/twitter/bootstrap/_scaffolding.scss +18 -2
  36. data/app/assets/stylesheets/twitter/bootstrap/_tables.scss +1 -1
  37. data/app/assets/stylesheets/twitter/bootstrap/_thumbnails.scss +2 -2
  38. data/app/assets/stylesheets/twitter/bootstrap/_tooltip.scss +1 -1
  39. data/app/assets/stylesheets/twitter/bootstrap/_type.scss +19 -13
  40. data/app/assets/stylesheets/twitter/bootstrap/_utilities.scss +3 -2
  41. data/app/assets/stylesheets/twitter/bootstrap/_variables.scss +86 -46
  42. data/app/assets/stylesheets/twitter/bootstrap/_wells.scss +2 -2
  43. data/lib/bootstrap-rails/version.rb +1 -1
  44. data/vendor/assets/javascripts/holder.js +419 -0
  45. metadata +4 -3
  46. data/app/assets/stylesheets/twitter/bootstrap/_accordion.scss +0 -31
@@ -29,15 +29,13 @@
29
29
  @include translate(0, -25%);
30
30
  @include transition-transform(0.3s ease-out);
31
31
  }
32
- &.fade.in .modal-dialog { @include translate(0, 0)}
32
+ &.in .modal-dialog { @include translate(0, 0)}
33
33
  }
34
34
 
35
35
  // Shell div to position the modal with bottom padding
36
36
  .modal-dialog {
37
- position: relative;
38
- top: 0;
39
- left: 0;
40
- right: 0;
37
+ margin-left: auto;
38
+ margin-right: auto;
41
39
  width: auto;
42
40
  padding: 10px;
43
41
  z-index: ($zindex-modal-background + 10);
@@ -51,7 +49,7 @@
51
49
  border: 1px solid $modal-content-border-color;
52
50
  border-radius: $border-radius-large;
53
51
  @include box-shadow(0 3px 9px rgba(0,0,0,.5));
54
- @include background-clip(padding-box);
52
+ background-clip: padding-box;
55
53
  // Remove focus outline from opened modal
56
54
  outline: none;
57
55
  }
@@ -67,7 +65,7 @@
67
65
  background-color: $modal-backdrop-bg;
68
66
  // Fade for backdrop
69
67
  &.fade { @include opacity(0); }
70
- &.fade.in { @include opacity(.5); }
68
+ &.in { @include opacity(.5); }
71
69
  }
72
70
 
73
71
  // Modal header
@@ -124,8 +122,7 @@
124
122
  .modal-dialog {
125
123
  left: 50%;
126
124
  right: auto;
127
- width: 560px;
128
- margin-left: -280px;
125
+ width: 600px;
129
126
  padding-top: 30px;
130
127
  padding-bottom: 30px;
131
128
  }
@@ -2,73 +2,90 @@
2
2
  // Navbars
3
3
  // --------------------------------------------------
4
4
 
5
+
5
6
  // Wrapper and base class
7
+ //
8
+ // Provide a static navbar from which we expand to create full-width, fixed, and
9
+ // other navbar variations.
10
+
6
11
  .navbar {
7
12
  position: relative;
8
13
  min-height: $navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
9
- margin-bottom: 20px;
10
- padding-left: $navbar-padding-horizontal;
11
- padding-right: $navbar-padding-horizontal;
14
+ margin-bottom: $navbar-margin-bottom;
12
15
  background-color: $navbar-bg;
13
- border-radius: $border-radius-base;
16
+ border: 1px solid $navbar-border;
14
17
 
15
18
  // Prevent floats from breaking the navbar
16
19
  @include clearfix();
20
+
21
+ @media (min-width: $grid-float-breakpoint) {
22
+ border-radius: $navbar-border-radius;
23
+ }
17
24
  }
18
25
 
19
- // Navbar nav links
20
- // -------------------------
21
26
 
22
- .navbar-nav {
23
- // Space out from .navbar .brand and .btn-navbar when stacked in mobile views
24
- margin-top: 10px;
25
- margin-bottom: 15px;
27
+ // Navbar heading
28
+ //
29
+ // Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
30
+ // styling of responsive aspects.
26
31
 
27
- > li > a {
28
- padding-top: (($navbar-height - $line-height-computed) / 2);
29
- padding-bottom: (($navbar-height - $line-height-computed) / 2);
30
- color: $navbar-link-color;
31
- line-height: 20px;
32
- border-radius: $border-radius-base;
33
- &:hover,
34
- &:focus {
35
- color: $navbar-link-hover-color;
36
- background-color: $navbar-link-hover-bg;
37
- }
38
- }
39
- > .active > a {
40
- &,
41
- &:hover,
42
- &:focus {
43
- color: $navbar-link-active-color;
44
- background-color: $navbar-link-active-bg;
45
- }
46
- }
47
- > .disabled > a {
48
- &,
49
- &:hover,
50
- &:focus {
51
- color: $navbar-link-disabled-color;
52
- background-color: $navbar-link-disabled-bg;
53
- }
54
- }
32
+ .navbar-header {
33
+ padding-left: $navbar-padding-horizontal;
34
+ padding-right: $navbar-padding-horizontal;
35
+ @include clearfix();
55
36
 
56
- // Right aligned contents
57
- // Make them full width first so that they align properly on mobile
58
- &.pull-right {
59
- width: 100%;
37
+ @media (min-width: $grid-float-breakpoint) {
38
+ float: left;
60
39
  }
61
40
  }
62
41
 
63
42
 
43
+ // Navbar collapse (body)
44
+ //
45
+ // Group your navbar content into this for easy collapsing and expanding across
46
+ // various device sizes. By default, this content is collapsed when <768px, but
47
+ // will expand past that for a horizontal display.
48
+ //
49
+ // To start (on mobile devices) the navbar links, forms, and buttons are stacked
50
+ // vertically and include a `max-height` to overflow in case you have too much
51
+ // content for the user's viewport.
52
+
53
+ .navbar-collapse {
54
+ padding: 5px $navbar-padding-horizontal;
55
+ border-top: 1px solid darken($navbar-bg, 7%);
56
+ box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
57
+ // Clear floated elements and prevent collapsing of padding
58
+ @include clearfix();
59
+
60
+ // This is not automatically added to the `.navbar-fixed-top` because it causes
61
+ // z-index bugs in iOS7 (possibly earlier).
62
+ max-height: 340px;
63
+ overflow-x: visible;
64
+ overflow-y: auto;
65
+ -webkit-overflow-scrolling: touch;
66
+
67
+ @media (min-width: $grid-float-breakpoint) {
68
+ width: auto;
69
+ padding-top: 0;
70
+ padding-bottom: 0;
71
+ border-top: 0;
72
+ box-shadow: none;
73
+ }
74
+ }
75
+
64
76
 
65
77
  //
66
78
  // Navbar alignment options
67
- // --------------------------------------------------
79
+ //
80
+ // Display the navbar across the entirity of the page or fixed it to the top or
81
+ // bottom of the page.
68
82
 
69
- // Static navbar
83
+ // Static top (unfixed, but 100% wide) navbar
70
84
  .navbar-static-top {
71
- border-radius: 0;
85
+ @media (min-width: $grid-float-breakpoint) {
86
+ border-width: 0 0 1px;
87
+ border-radius: 0;
88
+ }
72
89
  }
73
90
 
74
91
  // Fix the top/bottom navbars when screen real estate supports it
@@ -78,7 +95,12 @@
78
95
  right: 0;
79
96
  left: 0;
80
97
  z-index: $zindex-navbar-fixed;
81
- border-radius: 0;
98
+ border-width: 0 0 1px;
99
+
100
+ // Undo the rounded corners
101
+ @media (min-width: $grid-float-breakpoint) {
102
+ border-radius: 0;
103
+ }
82
104
  }
83
105
  .navbar-fixed-top {
84
106
  top: 0;
@@ -89,23 +111,16 @@
89
111
  }
90
112
 
91
113
 
92
-
93
- //
94
- // Navbar optional components
95
- // --------------------------------------------------
96
-
97
114
  // Brand/project name
115
+
98
116
  .navbar-brand {
99
- display: block;
100
- max-width: 200px;
101
- margin-left: auto;
102
- margin-right: auto;
103
- padding: $navbar-padding-vertical $navbar-padding-horizontal;
117
+ float: left;
118
+ margin-right: ($navbar-padding-horizontal / 2);
119
+ padding-top: $navbar-padding-vertical;
120
+ padding-bottom: $navbar-padding-vertical;
104
121
  font-size: $font-size-large;
105
- font-weight: 500;
106
122
  line-height: $line-height-computed;
107
123
  color: $navbar-brand-color;
108
- text-align: center;
109
124
  &:hover,
110
125
  &:focus {
111
126
  color: $navbar-brand-hover-color;
@@ -114,14 +129,17 @@
114
129
  }
115
130
  }
116
131
 
117
- // Collapsible navbar toggle
132
+
133
+ // Navbar toggle
134
+ //
135
+ // Custom button for toggling the `.navbar-collapse`, powered by the collapse
136
+ // JavaScript plugin.
137
+
118
138
  .navbar-toggle {
119
- position: absolute;
120
- top: floor(($navbar-height - 32) / 2);
121
- right: 10px;
122
- width: 48px;
123
- height: 32px;
124
- padding: 8px 12px;
139
+ position: relative;
140
+ float: right;
141
+ padding: 9px 10px;
142
+ @include navbar-vertical-align(34px);
125
143
  background-color: transparent;
126
144
  border: 1px solid $navbar-toggle-border-color;
127
145
  border-radius: $border-radius-base;
@@ -144,24 +162,160 @@
144
162
  }
145
163
  }
146
164
 
165
+
166
+ // Navbar nav links
167
+ //
168
+ // Builds on top of the `.nav` components with it's own modifier class to make
169
+ // the nav the full height of the horizontal nav (above 768px).
170
+
171
+ .navbar-nav {
172
+ margin-left: -$navbar-padding-horizontal;
173
+ margin-right: -$navbar-padding-horizontal;
174
+
175
+ @media (min-width: $grid-float-breakpoint) {
176
+ margin-left: 0;
177
+ margin-right: 0;
178
+ }
179
+
180
+ > li > a {
181
+ padding-top: 10px;
182
+ padding-bottom: 10px;
183
+ color: $navbar-link-color;
184
+ line-height: $line-height-computed;
185
+ &:hover,
186
+ &:focus {
187
+ color: $navbar-link-hover-color;
188
+ background-color: $navbar-link-hover-bg;
189
+ }
190
+ }
191
+ > .active > a {
192
+ &,
193
+ &:hover,
194
+ &:focus {
195
+ color: $navbar-link-active-color;
196
+ background-color: $navbar-link-active-bg;
197
+ }
198
+ }
199
+ > .disabled > a {
200
+ &,
201
+ &:hover,
202
+ &:focus {
203
+ color: $navbar-link-disabled-color;
204
+ background-color: $navbar-link-disabled-bg;
205
+ }
206
+ }
207
+
208
+ @media (max-width: $screen-phone-max) {
209
+ // Dropdowns get custom display
210
+ .open .dropdown-menu {
211
+ position: static;
212
+ float: none;
213
+ width: auto;
214
+ margin-top: 0;
215
+ background-color: transparent;
216
+ border: 0;
217
+ box-shadow: none;
218
+ > li > a,
219
+ .dropdown-header {
220
+ padding: 5px 15px 5px 25px;
221
+ }
222
+ > li > a {
223
+ color: $navbar-link-color;
224
+ line-height: $line-height-computed;
225
+ &:hover,
226
+ &:focus {
227
+ color: $navbar-link-hover-color;
228
+ background-color: $navbar-link-hover-bg;
229
+ background-image: none;
230
+ }
231
+ }
232
+ > .active > a {
233
+ &,
234
+ &:hover,
235
+ &:focus {
236
+ color: $navbar-link-active-color;
237
+ background-color: $navbar-link-active-bg;
238
+ }
239
+ }
240
+ > .disabled > a {
241
+ &,
242
+ &:hover,
243
+ &:focus {
244
+ color: $navbar-link-disabled-color;
245
+ background-color: $navbar-link-disabled-bg;
246
+ }
247
+ }
248
+ }
249
+ }
250
+
251
+ }
252
+
253
+
254
+ // Component alignment
255
+ //
256
+ // Repurpose the pull utilities as their own navbar utilities to avoid specifity
257
+ // issues with parents and chaining. Only do this when the navbar is uncollapsed
258
+ // though so that navbar contents properly stack and align in mobile.
259
+
260
+ @media (min-width: $grid-float-breakpoint) {
261
+ .navbar-left { @include pull-left; }
262
+ .navbar-right {
263
+ @include pull-right;
264
+ .dropdown-menu {
265
+ left: auto;
266
+ right: 0;
267
+ //INLINED .pull-right > .dropdown-menu();
268
+ }
269
+ }
270
+ }
271
+
272
+
147
273
  // Navbar form
274
+ //
275
+ // Extension of the `.form-inline` with some extra flavor for optimum display in
276
+ // our navbars.
277
+
148
278
  .navbar-form {
279
+ margin-left: -$navbar-padding-horizontal;
280
+ margin-right: -$navbar-padding-horizontal;
281
+ padding: 10px $navbar-padding-horizontal;
282
+ border-top: 1px solid darken($navbar-bg, 7%);
283
+ border-bottom: 1px solid darken($navbar-bg, 7%);
284
+
285
+ // Mixin behavior for optimum display
149
286
  @include form-inline();
150
- @include navbar-vertical-align($input-height-base); // Vertically center in navbar
287
+
288
+ .form-group {
289
+ @media (max-width: $screen-phone-max) {
290
+ margin-bottom: 5px;
291
+ }
292
+ }
293
+
294
+ // Vertically center in expanded, horizontal navbar
295
+ @include navbar-vertical-align($input-height-base);
296
+
297
+ // Undo 100% width for pull classes
298
+ @media (min-width: $grid-float-breakpoint) {
299
+ width: auto;
300
+ border: 0;
301
+ margin-left: 0;
302
+ margin-right: 0;
303
+ padding-top: 0;
304
+ padding-bottom: 0;
305
+ }
151
306
  }
152
307
 
308
+
153
309
  // Dropdown menus
154
310
 
155
311
  // Menu position and menu carets
156
312
  .navbar-nav > li > .dropdown-menu {
157
313
  margin-top: 0;
158
- border-top-left-radius: 0;
159
- border-top-right-radius: 0;
314
+ @include border-top-radius(0);
160
315
  }
161
316
  // Menu position and menu caret support for dropups via extra dropup class
162
317
  .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
163
- border-bottom-left-radius: 0;
164
- border-bottom-right-radius: 0;
318
+ @include border-bottom-radius(0);
165
319
  }
166
320
 
167
321
  // Dropdown menu items and carets
@@ -206,6 +360,7 @@
206
360
 
207
361
  .navbar-inverse {
208
362
  background-color: $navbar-inverse-bg;
363
+ border-color: $navbar-inverse-border;
209
364
 
210
365
  .navbar-brand {
211
366
  color: $navbar-inverse-brand-color;
@@ -260,6 +415,10 @@
260
415
  }
261
416
  }
262
417
 
418
+ .navbar-collapse {
419
+ border-top-color: darken($navbar-inverse-bg, 7%);
420
+ }
421
+
263
422
  // Dropdowns
264
423
  .navbar-nav {
265
424
  > .open > a {
@@ -288,7 +447,41 @@
288
447
  }
289
448
  }
290
449
  }
450
+
451
+ @media (max-width: $screen-phone-max) {
452
+ // Dropdowns get custom display
453
+ .open .dropdown-menu {
454
+ > .dropdown-header {
455
+ border-color: $navbar-inverse-border;
456
+ }
457
+ > li > a {
458
+ color: $navbar-inverse-link-color;
459
+ &:hover,
460
+ &:focus {
461
+ color: $navbar-inverse-link-hover-color;
462
+ background-color: $navbar-inverse-link-hover-bg;
463
+ }
464
+ }
465
+ > .active > a {
466
+ &,
467
+ &:hover,
468
+ &:focus {
469
+ color: $navbar-inverse-link-active-color;
470
+ background-color: $navbar-inverse-link-active-bg;
471
+ }
472
+ }
473
+ > .disabled > a {
474
+ &,
475
+ &:hover,
476
+ &:focus {
477
+ color: $navbar-inverse-link-disabled-color;
478
+ background-color: $navbar-inverse-link-disabled-bg;
479
+ }
480
+ }
481
+ }
482
+ }
291
483
  }
484
+
292
485
  }
293
486
 
294
487
 
@@ -298,11 +491,6 @@
298
491
 
299
492
  @media screen and (min-width: $grid-float-breakpoint) {
300
493
 
301
- .navbar-brand {
302
- float: left;
303
- margin-left: -($navbar-padding-horizontal);
304
- margin-right: 5px;
305
- }
306
494
  .navbar-nav {
307
495
  float: left;
308
496
  // undo margin to make nav extend full height of navbar
@@ -312,14 +500,10 @@
312
500
  > li {
313
501
  float: left;
314
502
  > a {
315
- border-radius: 0;
503
+ padding-top: (($navbar-height - $line-height-computed) / 2);
504
+ padding-bottom: (($navbar-height - $line-height-computed) / 2);
316
505
  }
317
506
  }
318
-
319
- &.pull-right {
320
- float: right;
321
- width: auto;
322
- }
323
507
  }
324
508
 
325
509
  // Required to make the collapsing navbar work on regular desktops
@@ -329,9 +513,10 @@
329
513
  left: auto;
330
514
  display: none;
331
515
  }
332
- .nav-collapse.collapse {
516
+ .navbar-collapse.collapse {
333
517
  display: block !important;
334
518
  height: auto !important;
519
+ padding-bottom: 0; // Override default setting
335
520
  overflow: visible !important;
336
521
  }
337
522
 
@@ -354,6 +539,7 @@
354
539
  // Add a class to make any element properly align itself vertically within the navbars.
355
540
 
356
541
  .navbar-text {
542
+ float: left;
357
543
  @include navbar-vertical-align($line-height-computed);
358
544
  }
359
545