bootstrap-on-rails 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +28 -1
  3. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  4. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +200 -199
  5. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  6. data/app/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  7. data/app/assets/javascripts/bootstrap/affix.js +4 -4
  8. data/app/assets/javascripts/bootstrap/alert.js +3 -3
  9. data/app/assets/javascripts/bootstrap/button.js +3 -3
  10. data/app/assets/javascripts/bootstrap/carousel.js +4 -4
  11. data/app/assets/javascripts/bootstrap/collapse.js +4 -4
  12. data/app/assets/javascripts/bootstrap/dropdown.js +4 -4
  13. data/app/assets/javascripts/bootstrap/modal.js +4 -4
  14. data/app/assets/javascripts/bootstrap/popover.js +4 -4
  15. data/app/assets/javascripts/bootstrap/scrollspy.js +4 -4
  16. data/app/assets/javascripts/bootstrap/tab.js +5 -5
  17. data/app/assets/javascripts/bootstrap/tooltip.js +4 -4
  18. data/app/assets/javascripts/bootstrap/transition.js +3 -3
  19. data/app/assets/stylesheets/bootstrap/alerts.less +1 -1
  20. data/app/assets/stylesheets/bootstrap/badges.less +0 -0
  21. data/app/assets/stylesheets/bootstrap/bootstrap.less +0 -10
  22. data/app/assets/stylesheets/bootstrap/breadcrumbs.less +2 -2
  23. data/app/assets/stylesheets/bootstrap/button-groups.less +6 -1
  24. data/app/assets/stylesheets/bootstrap/buttons.less +2 -4
  25. data/app/assets/stylesheets/bootstrap/carousel.less +32 -10
  26. data/app/assets/stylesheets/bootstrap/close.less +0 -0
  27. data/app/assets/stylesheets/bootstrap/code.less +5 -8
  28. data/app/assets/stylesheets/bootstrap/component-animations.less +0 -0
  29. data/app/assets/stylesheets/bootstrap/dropdowns.less +1 -2
  30. data/app/assets/stylesheets/bootstrap/forms.less +12 -10
  31. data/app/assets/stylesheets/bootstrap/glyphicons.less +13 -12
  32. data/app/assets/stylesheets/bootstrap/grid.less +32 -285
  33. data/app/assets/stylesheets/bootstrap/input-groups.less +9 -0
  34. data/app/assets/stylesheets/bootstrap/jumbotron.less +2 -2
  35. data/app/assets/stylesheets/bootstrap/labels.less +0 -0
  36. data/app/assets/stylesheets/bootstrap/list-group.less +12 -12
  37. data/app/assets/stylesheets/bootstrap/media.less +0 -0
  38. data/app/assets/stylesheets/bootstrap/mixins.less +131 -17
  39. data/app/assets/stylesheets/bootstrap/modals.less +2 -11
  40. data/app/assets/stylesheets/bootstrap/navbar.less +10 -7
  41. data/app/assets/stylesheets/bootstrap/navs.less +52 -19
  42. data/app/assets/stylesheets/bootstrap/normalize.less +16 -6
  43. data/app/assets/stylesheets/bootstrap/pager.less +0 -0
  44. data/app/assets/stylesheets/bootstrap/pagination.less +0 -0
  45. data/app/assets/stylesheets/bootstrap/panels.less +31 -7
  46. data/app/assets/stylesheets/bootstrap/popovers.less +0 -0
  47. data/app/assets/stylesheets/bootstrap/print.less +6 -1
  48. data/app/assets/stylesheets/bootstrap/progress-bars.less +4 -7
  49. data/app/assets/stylesheets/bootstrap/responsive-utilities.less +13 -24
  50. data/app/assets/stylesheets/bootstrap/scaffolding.less +1 -12
  51. data/app/assets/stylesheets/bootstrap/tables.less +37 -39
  52. data/app/assets/stylesheets/bootstrap/theme.less +17 -11
  53. data/app/assets/stylesheets/bootstrap/thumbnails.less +14 -15
  54. data/app/assets/stylesheets/bootstrap/tooltip.less +8 -8
  55. data/app/assets/stylesheets/bootstrap/type.less +58 -21
  56. data/app/assets/stylesheets/bootstrap/utilities.less +14 -0
  57. data/app/assets/stylesheets/bootstrap/variables.less +36 -34
  58. data/app/assets/stylesheets/bootstrap/wells.less +0 -0
  59. data/bootstrap-on-rails.gemspec +2 -0
  60. data/lib/bootstrap-on-rails.rb +1 -0
  61. data/lib/bootstrap-on-rails/version.rb +1 -1
  62. metadata +24 -11
@@ -61,6 +61,7 @@
61
61
  font-size: @font-size-base;
62
62
  font-weight: normal;
63
63
  line-height: 1;
64
+ color: @input-color;
64
65
  text-align: center;
65
66
  background-color: @input-group-addon-bg;
66
67
  border: 1px solid @input-group-addon-border-color;
@@ -112,6 +113,14 @@
112
113
  .input-group-btn {
113
114
  position: relative;
114
115
  white-space: nowrap;
116
+
117
+ // Negative margin to only have a 1px border between the two
118
+ &:first-child > .btn {
119
+ margin-right: -1px;
120
+ }
121
+ &:last-child > .btn {
122
+ margin-left: -1px;
123
+ }
115
124
  }
116
125
  .input-group-btn > .btn {
117
126
  position: relative;
@@ -6,7 +6,7 @@
6
6
  .jumbotron {
7
7
  padding: @jumbotron-padding;
8
8
  margin-bottom: @jumbotron-padding;
9
- font-size: (@font-size-base * 1.5);
9
+ font-size: @jumbotron-font-size;
10
10
  font-weight: 200;
11
11
  line-height: (@line-height-base * 1.5);
12
12
  color: @jumbotron-color;
@@ -24,7 +24,7 @@
24
24
  border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container
25
25
  }
26
26
 
27
- @media screen and (min-width: @screen-sm) {
27
+ @media screen and (min-width: @screen-sm-min) {
28
28
  padding-top: (@jumbotron-padding * 1.6);
29
29
  padding-bottom: (@jumbotron-padding * 1.6);
30
30
 
@@ -39,21 +39,21 @@
39
39
  > .badge + .badge {
40
40
  margin-right: 5px;
41
41
  }
42
+ }
42
43
 
43
- // Linked list items
44
- a& {
45
- color: @list-group-link-color;
44
+ // Linked list items
45
+ a.list-group-item {
46
+ color: @list-group-link-color;
46
47
 
47
- .list-group-item-heading {
48
- color: @list-group-link-heading-color;
49
- }
48
+ .list-group-item-heading {
49
+ color: @list-group-link-heading-color;
50
+ }
50
51
 
51
- // Hover state
52
- &:hover,
53
- &:focus {
54
- text-decoration: none;
55
- background-color: @list-group-hover-bg;
56
- }
52
+ // Hover state
53
+ &:hover,
54
+ &:focus {
55
+ text-decoration: none;
56
+ background-color: @list-group-hover-bg;
57
57
  }
58
58
 
59
59
  // Active class on item itself, not parent
@@ -27,11 +27,11 @@
27
27
  }
28
28
  }
29
29
 
30
- // Webkit-style focus
30
+ // WebKit-style focus
31
31
  .tab-focus() {
32
32
  // Default
33
33
  outline: thin dotted #333;
34
- // Webkit
34
+ // WebKit
35
35
  outline: 5px auto -webkit-focus-ring-color;
36
36
  outline-offset: -2px;
37
37
  }
@@ -173,10 +173,41 @@
173
173
  transform: translate3d(@x, @y, @z);
174
174
  }
175
175
 
176
+ .rotateX(@degrees) {
177
+ -webkit-transform: rotateX(@degrees);
178
+ -ms-transform: rotateX(@degrees); // IE9+
179
+ transform: rotateX(@degrees);
180
+ }
181
+ .rotateY(@degrees) {
182
+ -webkit-transform: rotateY(@degrees);
183
+ -ms-transform: rotateY(@degrees); // IE9+
184
+ transform: rotateY(@degrees);
185
+ }
186
+ .perspective(@perspective) {
187
+ -webkit-perspective: @perspective;
188
+ -moz-perspective: @perspective;
189
+ perspective: @perspective;
190
+ }
191
+ .perspective-origin(@perspective) {
192
+ -webkit-perspective-origin: @perspective;
193
+ -moz-perspective-origin: @perspective;
194
+ perspective-origin: @perspective;
195
+ }
196
+ .transform-origin(@origin) {
197
+ -webkit-transform-origin: @origin;
198
+ -moz-transform-origin: @origin;
199
+ transform-origin: @origin;
200
+ }
201
+
202
+ // Animations
203
+ .animation(@animation) {
204
+ -webkit-animation: @animation;
205
+ animation: @animation;
206
+ }
207
+
176
208
  // Backface visibility
177
209
  // Prevent browsers from flickering when using CSS 3D transforms.
178
210
  // Default value is `visible`, but can be changed to `hidden`
179
- // See git pull https://github.com/dannykeane/bootstrap.git backface-visibility for examples
180
211
  .backface-visibility(@visibility){
181
212
  -webkit-backface-visibility: @visibility;
182
213
  -moz-backface-visibility: @visibility;
@@ -260,7 +291,7 @@
260
291
  // Color stops are not available in IE9 and below.
261
292
  .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
262
293
  background-image: -webkit-gradient(linear, left @start-percent, left @end-percent, from(@start-color), to(@end-color)); // Safari 4+, Chrome 2+
263
- background-image: -webkit-linear-gradient(top, @start-color, @start-percent, @end-color, @end-percent); // Safari 5.1+, Chrome 10+
294
+ background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1+, Chrome 10+
264
295
  background-image: -moz-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // FF 3.6+
265
296
  background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10
266
297
  background-repeat: repeat-x;
@@ -296,11 +327,11 @@
296
327
  background-image: radial-gradient(circle, @inner-color, @outer-color);
297
328
  background-repeat: no-repeat;
298
329
  }
299
- .striped(@color: #555; @angle: 45deg) {
300
- background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, rgba(255,255,255,.15)), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, rgba(255,255,255,.15)), color-stop(.75, rgba(255,255,255,.15)), color-stop(.75, transparent), to(transparent));
301
- background-image: -webkit-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);
302
- background-image: -moz-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);
303
- 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);
330
+ .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
331
+ background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, @color), color-stop(.25, transparent), color-stop(.5, transparent), color-stop(.5, @color), color-stop(.75, @color), color-stop(.75, transparent), to(transparent));
332
+ background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
333
+ background-image: -moz-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
334
+ background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
304
335
  }
305
336
  }
306
337
 
@@ -362,13 +393,18 @@
362
393
  // -------------------------
363
394
  .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border;) {
364
395
  border-color: @border;
396
+
365
397
  & > .panel-heading {
366
398
  color: @heading-text-color;
367
399
  background-color: @heading-bg-color;
368
400
  border-color: @heading-border;
401
+
369
402
  + .panel-collapse .panel-body {
370
403
  border-top-color: @border;
371
404
  }
405
+ & > .dropdown .caret {
406
+ border-color: @heading-text-color transparent;
407
+ }
372
408
  }
373
409
  & > .panel-footer {
374
410
  + .panel-collapse .panel-body {
@@ -383,6 +419,7 @@
383
419
  background-color: @background;
384
420
  border-color: @border;
385
421
  color: @text-color;
422
+
386
423
  hr {
387
424
  border-top-color: darken(@border, 5%);
388
425
  }
@@ -404,7 +441,6 @@
404
441
  &.@{state} > td,
405
442
  &.@{state} > th {
406
443
  background-color: @background;
407
- border-color: @border;
408
444
  }
409
445
  }
410
446
 
@@ -416,7 +452,6 @@
416
452
  &.@{state}:hover > td,
417
453
  &.@{state}:hover > th {
418
454
  background-color: darken(@background, 5%);
419
- border-color: darken(@border, 5%);
420
455
  }
421
456
  }
422
457
  }
@@ -453,7 +488,7 @@
453
488
  &:active,
454
489
  &.active {
455
490
  background-color: @background;
456
- border-color: @border
491
+ border-color: @border;
457
492
  }
458
493
  }
459
494
  }
@@ -517,7 +552,7 @@
517
552
  .progress-bar-variant(@color) {
518
553
  background-color: @color;
519
554
  .progress-striped & {
520
- #gradient > .striped(@color);
555
+ #gradient > .striped();
521
556
  }
522
557
  }
523
558
 
@@ -532,12 +567,13 @@
532
567
  }
533
568
 
534
569
  .responsive-invisibility() {
535
- display: none !important;
536
- tr& { display: none !important; }
570
+ &,
571
+ tr&,
537
572
  th&,
538
573
  td& { display: none !important; }
539
574
  }
540
575
 
576
+
541
577
  // Grid System
542
578
  // -----------
543
579
 
@@ -618,7 +654,7 @@
618
654
  }
619
655
  }
620
656
 
621
- // Generate the large column offsets
657
+ // Generate the medium column offsets
622
658
  .make-md-column-offset(@columns) {
623
659
  @media (min-width: @screen-md-min) {
624
660
  margin-left: percentage((@columns / @grid-columns));
@@ -669,6 +705,80 @@
669
705
  }
670
706
 
671
707
 
708
+ // Framework grid generation
709
+ //
710
+ // Used only by Bootstrap to generate the correct number of grid classes given
711
+ // any value of `@grid-columns`.
712
+
713
+ .make-grid-columns() {
714
+ // Common styles for all sizes of grid columns, widths 1-12
715
+ .col(@index) when (@index = 1) { // initial
716
+ @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
717
+ .col(@index + 1, @item);
718
+ }
719
+ .col(@index, @list) when (@index =< @grid-columns) { // general; "=<" isn't a typo
720
+ @item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
721
+ .col(@index + 1, ~"@{list}, @{item}");
722
+ }
723
+ .col(@index, @list) when (@index > @grid-columns) { // terminal
724
+ @{list} {
725
+ position: relative;
726
+ // Prevent columns from collapsing when empty
727
+ min-height: 1px;
728
+ // Inner gutter via padding
729
+ padding-left: (@grid-gutter-width / 2);
730
+ padding-right: (@grid-gutter-width / 2);
731
+ }
732
+ }
733
+ .col(1); // kickstart it
734
+ }
735
+
736
+ .make-grid-columns-float(@class) {
737
+ .col(@index) when (@index = 1) { // initial
738
+ @item: ~".col-@{class}-@{index}";
739
+ .col(@index + 1, @item);
740
+ }
741
+ .col(@index, @list) when (@index < @grid-columns) { // general
742
+ @item: ~".col-@{class}-@{index}";
743
+ .col(@index + 1, ~"@{list}, @{item}");
744
+ }
745
+ .col(@index, @list) when (@index = @grid-columns) { // terminal
746
+ @{list} {
747
+ float: left;
748
+ }
749
+ }
750
+ .col(1); // kickstart it
751
+ }
752
+
753
+ .calc-grid(@index, @class, @type) when (@type = width) and (@index > 0) {
754
+ .col-@{class}-@{index} {
755
+ width: percentage((@index / @grid-columns));
756
+ }
757
+ }
758
+ .calc-grid(@index, @class, @type) when (@type = push) {
759
+ .col-@{class}-push-@{index} {
760
+ left: percentage((@index / @grid-columns));
761
+ }
762
+ }
763
+ .calc-grid(@index, @class, @type) when (@type = pull) {
764
+ .col-@{class}-pull-@{index} {
765
+ right: percentage((@index / @grid-columns));
766
+ }
767
+ }
768
+ .calc-grid(@index, @class, @type) when (@type = offset) {
769
+ .col-@{class}-offset-@{index} {
770
+ margin-left: percentage((@index / @grid-columns));
771
+ }
772
+ }
773
+
774
+ // Basic looping in LESS
775
+ .make-grid(@index, @class, @type) when (@index >= 0) {
776
+ .calc-grid(@index, @class, @type);
777
+ // next iteration
778
+ .make-grid(@index - 1, @class, @type);
779
+ }
780
+
781
+
672
782
  // Form validation states
673
783
  //
674
784
  // Used in forms.less to generate the form validation CSS for warnings, errors,
@@ -677,7 +787,11 @@
677
787
  .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {
678
788
  // Color the label and help text
679
789
  .help-block,
680
- .control-label {
790
+ .control-label,
791
+ .radio,
792
+ .checkbox,
793
+ .radio-inline,
794
+ .checkbox-inline {
681
795
  color: @text-color;
682
796
  }
683
797
  // Set the border and box shadow on specific inputs to match
@@ -10,14 +10,6 @@
10
10
  // Kill the scroll on the body
11
11
  .modal-open {
12
12
  overflow: hidden;
13
-
14
-
15
- // Account for hiding of scrollbar
16
- body&,
17
- .navbar-fixed-top,
18
- .navbar-fixed-bottom {
19
- margin-right: 15px
20
- }
21
13
  }
22
14
 
23
15
  // Container that the modal scrolls within
@@ -42,6 +34,7 @@
42
34
 
43
35
  // Shell div to position the modal with bottom padding
44
36
  .modal-dialog {
37
+ position: relative;
45
38
  margin-left: auto;
46
39
  margin-right: auto;
47
40
  width: auto;
@@ -125,11 +118,9 @@
125
118
  }
126
119
 
127
120
  // Scale up the modal
128
- @media screen and (min-width: @screen-sm) {
121
+ @media screen and (min-width: @screen-sm-min) {
129
122
 
130
123
  .modal-dialog {
131
- left: 50%;
132
- right: auto;
133
124
  width: 600px;
134
125
  padding-top: 30px;
135
126
  padding-bottom: 30px;
@@ -10,7 +10,6 @@
10
10
 
11
11
  .navbar {
12
12
  position: relative;
13
- z-index: @zindex-navbar;
14
13
  min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
15
14
  margin-bottom: @navbar-margin-bottom;
16
15
  border: 1px solid transparent;
@@ -75,7 +74,7 @@
75
74
  }
76
75
 
77
76
  &.in {
78
- overflow-y: visible;
77
+ overflow-y: auto;
79
78
  }
80
79
 
81
80
  // Account for first and last children spacing
@@ -111,12 +110,14 @@
111
110
  //
112
111
  // Navbar alignment options
113
112
  //
114
- // Display the navbar across the entirity of the page or fixed it to the top or
113
+ // Display the navbar across the entirety of the page or fixed it to the top or
115
114
  // bottom of the page.
116
115
 
117
116
  // Static top (unfixed, but 100% wide) navbar
118
117
  .navbar-static-top {
118
+ z-index: @zindex-navbar;
119
119
  border-width: 0 0 1px;
120
+
120
121
  @media (min-width: @grid-float-breakpoint) {
121
122
  border-radius: 0;
122
123
  }
@@ -128,7 +129,7 @@
128
129
  position: fixed;
129
130
  right: 0;
130
131
  left: 0;
131
- border-width: 0 0 1px;
132
+ z-index: @zindex-navbar-fixed;
132
133
 
133
134
  // Undo the rounded corners
134
135
  @media (min-width: @grid-float-breakpoint) {
@@ -136,12 +137,13 @@
136
137
  }
137
138
  }
138
139
  .navbar-fixed-top {
139
- z-index: @zindex-navbar-fixed;
140
140
  top: 0;
141
+ border-width: 0 0 1px;
141
142
  }
142
143
  .navbar-fixed-bottom {
143
144
  bottom: 0;
144
145
  margin-bottom: 0; // override .navbar defaults
146
+ border-width: 1px 0 0;
145
147
  }
146
148
 
147
149
 
@@ -152,6 +154,7 @@
152
154
  padding: @navbar-padding-vertical @navbar-padding-horizontal;
153
155
  font-size: @font-size-large;
154
156
  line-height: @line-height-computed;
157
+
155
158
  &:hover,
156
159
  &:focus {
157
160
  text-decoration: none;
@@ -254,7 +257,7 @@
254
257
 
255
258
  // Component alignment
256
259
  //
257
- // Repurpose the pull utilities as their own navbar utilities to avoid specifity
260
+ // Repurpose the pull utilities as their own navbar utilities to avoid specificity
258
261
  // issues with parents and chaining. Only do this when the navbar is uncollapsed
259
262
  // though so that navbar contents properly stack and align in mobile.
260
263
 
@@ -408,7 +411,7 @@
408
411
 
409
412
  .navbar-collapse,
410
413
  .navbar-form {
411
- border-color: darken(@navbar-default-bg, 7%);
414
+ border-color: @navbar-default-border;
412
415
  }
413
416
 
414
417
  // Dropdown menu items and carets