bootstrap-generators 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -8
  3. data/Rakefile +4 -5
  4. data/lib/bootstrap/generators/version.rb +1 -1
  5. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +25 -23
  6. data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss +25 -23
  7. data/readme-template.md.erb +1 -6
  8. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  9. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +47 -47
  10. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  11. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  12. data/vendor/assets/javascripts/bootstrap/affix.js +1 -1
  13. data/vendor/assets/javascripts/bootstrap/alert.js +1 -1
  14. data/vendor/assets/javascripts/bootstrap/button.js +1 -1
  15. data/vendor/assets/javascripts/bootstrap/carousel.js +1 -1
  16. data/vendor/assets/javascripts/bootstrap/collapse.js +1 -1
  17. data/vendor/assets/javascripts/bootstrap/dropdown.js +1 -1
  18. data/vendor/assets/javascripts/bootstrap/modal.js +1 -1
  19. data/vendor/assets/javascripts/bootstrap/popover.js +1 -1
  20. data/vendor/assets/javascripts/bootstrap/scrollspy.js +1 -1
  21. data/vendor/assets/javascripts/bootstrap/tab.js +1 -1
  22. data/vendor/assets/javascripts/bootstrap/tooltip.js +1 -1
  23. data/vendor/assets/javascripts/bootstrap/transition.js +1 -1
  24. data/vendor/assets/stylesheets/bootstrap.css +245 -291
  25. data/vendor/twitter/bootstrap/less/button-groups.less +3 -3
  26. data/vendor/twitter/bootstrap/less/buttons.less +6 -2
  27. data/vendor/twitter/bootstrap/less/carousel.less +3 -3
  28. data/vendor/twitter/bootstrap/less/forms.less +22 -3
  29. data/vendor/twitter/bootstrap/less/grid.less +4 -20
  30. data/vendor/twitter/bootstrap/less/input-groups.less +5 -0
  31. data/vendor/twitter/bootstrap/less/mixins.less +18 -15
  32. data/vendor/twitter/bootstrap/less/modals.less +3 -2
  33. data/vendor/twitter/bootstrap/less/navbar.less +1 -1
  34. data/vendor/twitter/bootstrap/less/panels.less +54 -43
  35. data/vendor/twitter/bootstrap/less/popovers.less +11 -11
  36. data/vendor/twitter/bootstrap/less/responsive-utilities.less +6 -7
  37. data/vendor/twitter/bootstrap/less/thumbnails.less +1 -1
  38. data/vendor/twitter/bootstrap/less/type.less +2 -5
  39. data/vendor/twitter/bootstrap/less/variables.less +25 -23
  40. data/vendor/twitter/bootstrap/sass/_buttons.scss +6 -2
  41. data/vendor/twitter/bootstrap/sass/_carousel.scss +2 -2
  42. data/vendor/twitter/bootstrap/sass/_forms.scss +22 -3
  43. data/vendor/twitter/bootstrap/sass/_grid.scss +4 -20
  44. data/vendor/twitter/bootstrap/sass/_input-groups.scss +5 -0
  45. data/vendor/twitter/bootstrap/sass/_mixins.scss +50 -34
  46. data/vendor/twitter/bootstrap/sass/_modals.scss +3 -2
  47. data/vendor/twitter/bootstrap/sass/_navbar.scss +1 -1
  48. data/vendor/twitter/bootstrap/sass/_panels.scss +54 -43
  49. data/vendor/twitter/bootstrap/sass/_popovers.scss +11 -11
  50. data/vendor/twitter/bootstrap/sass/_responsive-utilities.scss +1 -7
  51. data/vendor/twitter/bootstrap/sass/_thumbnails.scss +4 -4
  52. data/vendor/twitter/bootstrap/sass/_type.scss +21 -33
  53. data/vendor/twitter/bootstrap/sass/_variables.scss +25 -23
  54. metadata +2 -2
@@ -23,30 +23,29 @@
23
23
 
24
24
 
25
25
  // Visibility utilities
26
- .visible-xs {
26
+ .visible-xs,
27
+ .visible-sm,
28
+ .visible-md,
29
+ .visible-lg {
27
30
  .responsive-invisibility();
31
+ }
28
32
 
33
+ .visible-xs {
29
34
  @media (max-width: @screen-xs-max) {
30
35
  .responsive-visibility();
31
36
  }
32
37
  }
33
38
  .visible-sm {
34
- .responsive-invisibility();
35
-
36
39
  @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {
37
40
  .responsive-visibility();
38
41
  }
39
42
  }
40
43
  .visible-md {
41
- .responsive-invisibility();
42
-
43
44
  @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {
44
45
  .responsive-visibility();
45
46
  }
46
47
  }
47
48
  .visible-lg {
48
- .responsive-invisibility();
49
-
50
49
  @media (min-width: @screen-lg-min) {
51
50
  .responsive-visibility();
52
51
  }
@@ -16,7 +16,7 @@
16
16
 
17
17
  > img,
18
18
  a > img {
19
- .img-responsive();
19
+ &:extend(.img-responsive);
20
20
  margin-left: auto;
21
21
  margin-right: auto;
22
22
  }
@@ -165,15 +165,12 @@ ol {
165
165
  // Inline turns list items into inline-block
166
166
  .list-inline {
167
167
  .list-unstyled();
168
+ margin-left: -5px;
168
169
 
169
170
  > li {
170
171
  display: inline-block;
171
172
  padding-left: 5px;
172
173
  padding-right: 5px;
173
-
174
- &:first-child {
175
- padding-left: 0;
176
- }
177
174
  }
178
175
  }
179
176
 
@@ -233,7 +230,7 @@ abbr[data-original-title] {
233
230
  blockquote {
234
231
  padding: (@line-height-computed / 2) @line-height-computed;
235
232
  margin: 0 0 @line-height-computed;
236
- font-size: (@font-size-base * 1.25);
233
+ font-size: @blockquote-font-size;
237
234
  border-left: 5px solid @blockquote-border-color;
238
235
 
239
236
  p,
@@ -74,7 +74,7 @@
74
74
 
75
75
  @icon-font-path: "../fonts/";
76
76
  @icon-font-name: "glyphicons-halflings-regular";
77
- @icon-font-svg-id: "glyphicons_halflingsregular";
77
+ @icon-font-svg-id: "glyphicons_halflingsregular";
78
78
 
79
79
  //== Components
80
80
  //
@@ -301,6 +301,26 @@
301
301
  @grid-float-breakpoint-max: (@grid-float-breakpoint - 1);
302
302
 
303
303
 
304
+ //== Container sizes
305
+ //
306
+ //## Define the maximum width of `.container` for different screen sizes.
307
+
308
+ // Small screen / tablet
309
+ @container-tablet: ((720px + @grid-gutter-width));
310
+ //** For `@screen-sm-min` and up.
311
+ @container-sm: @container-tablet;
312
+
313
+ // Medium screen / desktop
314
+ @container-desktop: ((940px + @grid-gutter-width));
315
+ //** For `@screen-md-min` and up.
316
+ @container-md: @container-desktop;
317
+
318
+ // Large screen / wide desktop
319
+ @container-large-desktop: ((1140px + @grid-gutter-width));
320
+ //** For `@screen-lg-min` and up.
321
+ @container-lg: @container-large-desktop;
322
+
323
+
304
324
  //== Navbar
305
325
  //
306
326
  //##
@@ -505,9 +525,9 @@
505
525
  //** Popover outer arrow width
506
526
  @popover-arrow-outer-width: (@popover-arrow-width + 1);
507
527
  //** Popover outer arrow color
508
- @popover-arrow-outer-color: rgba(0,0,0,.25);
528
+ @popover-arrow-outer-color: fadein(@popover-border-color, 5%);
509
529
  //** Popover outer arrow fallback color
510
- @popover-arrow-outer-fallback-color: #999;
530
+ @popover-arrow-outer-fallback-color: darken(@popover-fallback-border-color, 20%);
511
531
 
512
532
 
513
533
  //== Labels
@@ -790,6 +810,8 @@
790
810
  @headings-small-color: @gray-light;
791
811
  //** Blockquote small color
792
812
  @blockquote-small-color: @gray-light;
813
+ //** Blockquote font size
814
+ @blockquote-font-size: (@font-size-base * 1.25);
793
815
  //** Blockquote border color
794
816
  @blockquote-border-color: @gray-lighter;
795
817
  //** Page header border color
@@ -805,23 +827,3 @@
805
827
 
806
828
  //** Horizontal offset for forms and lists.
807
829
  @component-offset-horizontal: 180px;
808
-
809
-
810
- //== Container sizes
811
- //
812
- //## Define the maximum width of `.container` for different screen sizes.
813
-
814
- // Small screen / tablet
815
- @container-tablet: ((720px + @grid-gutter-width));
816
- //** For `@screen-sm-min` and up.
817
- @container-sm: @container-tablet;
818
-
819
- // Medium screen / desktop
820
- @container-desktop: ((940px + @grid-gutter-width));
821
- //** For `@screen-md-min` and up.
822
- @container-md: @container-desktop;
823
-
824
- // Large screen / wide desktop
825
- @container-large-desktop: ((1140px + @grid-gutter-width));
826
- //** For `@screen-lg-min` and up.
827
- @container-lg: @container-large-desktop;
@@ -19,8 +19,12 @@
19
19
  @include button-size($padding-base-vertical, $padding-base-horizontal, $font-size-base, $line-height-base, $border-radius-base);
20
20
  @include user-select(none);
21
21
 
22
- &:focus {
23
- @include tab-focus();
22
+ &,
23
+ &:active,
24
+ &.active {
25
+ &:focus {
26
+ @include tab-focus();
27
+ }
24
28
  }
25
29
 
26
30
  &:hover,
@@ -206,8 +206,8 @@
206
206
 
207
207
  // Scale up the controls a smidge
208
208
  .carousel-control {
209
- .glyphicons-chevron-left,
210
- .glyphicons-chevron-right,
209
+ .glyphicon-chevron-left,
210
+ .glyphicon-chevron-right,
211
211
  .icon-prev,
212
212
  .icon-next {
213
213
  width: 30px;
@@ -133,9 +133,10 @@ output {
133
133
  @include placeholder();
134
134
 
135
135
  // Disabled and read-only inputs
136
- // Note: HTML5 says that controls under a fieldset > legend:first-child won't
137
- // be disabled if the fieldset is disabled. Due to implementation difficulty,
138
- // we don't honor that edge case; we style them as disabled anyway.
136
+ //
137
+ // HTML5 says that controls under a fieldset > legend:first-child won't be
138
+ // disabled if the fieldset is disabled. Due to implementation difficulty, we
139
+ // don't honor that edge case; we style them as disabled anyway.
139
140
  &[disabled],
140
141
  &[readonly],
141
142
  fieldset[disabled] & {
@@ -152,10 +153,24 @@ textarea.form-control {
152
153
  height: auto;
153
154
  }
154
155
 
156
+
157
+ // Search inputs in iOS
158
+ //
159
+ // This overrides the extra rounded corners on search inputs in iOS so that our
160
+ // `.form-control` class can properly style them. Note that this cannot simply
161
+ // be added to `.form-control` as it's not specific enough. For details, see
162
+ // https://github.com/twbs/bootstrap/issues/11586.
163
+
164
+ input[type="search"] {
165
+ -webkit-appearance: none;
166
+ }
167
+
168
+
155
169
  // Special styles for iOS date input
156
170
  //
157
171
  // In Mobile Safari, date inputs require a pixel line-height that matches the
158
172
  // given height of the input.
173
+
159
174
  input[type="date"] {
160
175
  line-height: $input-height-base;
161
176
  }
@@ -332,6 +347,10 @@ input[type="checkbox"],
332
347
  width: auto; // Prevent labels from stacking above inputs in `.form-group`
333
348
  vertical-align: middle;
334
349
  }
350
+ // Input groups need that 100% width though
351
+ .input-group > .form-control {
352
+ width: 100%;
353
+ }
335
354
 
336
355
  .control-label {
337
356
  margin-bottom: 0;
@@ -53,11 +53,7 @@
53
53
  // Columns, offsets, pushes, and pulls for extra small devices like
54
54
  // smartphones.
55
55
 
56
- @include make-grid-columns-float(xs);
57
- @include make-grid($grid-columns, xs, width);
58
- @include make-grid($grid-columns, xs, pull);
59
- @include make-grid($grid-columns, xs, push);
60
- @include make-grid($grid-columns, xs, offset);
56
+ @include make-grid(xs);
61
57
 
62
58
 
63
59
  // Small grid
@@ -66,11 +62,7 @@
66
62
  // to tablets.
67
63
 
68
64
  @media (min-width: $screen-sm-min) {
69
- @include make-grid-columns-float(sm);
70
- @include make-grid($grid-columns, sm, width);
71
- @include make-grid($grid-columns, sm, pull);
72
- @include make-grid($grid-columns, sm, push);
73
- @include make-grid($grid-columns, sm, offset);
65
+ @include make-grid(sm);
74
66
  }
75
67
 
76
68
 
@@ -79,11 +71,7 @@
79
71
  // Columns, offsets, pushes, and pulls for the desktop device range.
80
72
 
81
73
  @media (min-width: $screen-md-min) {
82
- @include make-grid-columns-float(md);
83
- @include make-grid($grid-columns, md, width);
84
- @include make-grid($grid-columns, md, pull);
85
- @include make-grid($grid-columns, md, push);
86
- @include make-grid($grid-columns, md, offset);
74
+ @include make-grid(md);
87
75
  }
88
76
 
89
77
 
@@ -92,9 +80,5 @@
92
80
  // Columns, offsets, pushes, and pulls for the large desktop device range.
93
81
 
94
82
  @media (min-width: $screen-lg-min) {
95
- @include make-grid-columns-float(lg);
96
- @include make-grid($grid-columns, lg, width);
97
- @include make-grid($grid-columns, lg, pull);
98
- @include make-grid($grid-columns, lg, push);
99
- @include make-grid($grid-columns, lg, offset);
83
+ @include make-grid(lg);
100
84
  }
@@ -17,6 +17,11 @@
17
17
  }
18
18
 
19
19
  .form-control {
20
+ // Ensure that the input is always above the *appended* addon button for
21
+ // proper border colors.
22
+ position: relative;
23
+ z-index: 2;
24
+
20
25
  // IE9 fubars the placeholder attribute in text inputs and the arrows on
21
26
  // select elements in input groups. To fix it, we float the input. Details:
22
27
  // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855
@@ -54,8 +54,7 @@
54
54
 
55
55
  // Placeholder text
56
56
  @mixin placeholder($color: $input-color-placeholder) {
57
- &:-moz-placeholder { color: $color; } // Firefox 4-18
58
- &::-moz-placeholder { color: $color; // Firefox 19+
57
+ &::-moz-placeholder { color: $color; // Firefox
59
58
  opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526
60
59
  &:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
61
60
  &::-webkit-input-placeholder { color: $color; } // Safari and Chrome
@@ -154,10 +153,10 @@
154
153
  -ms-transform: rotate($degrees); // IE9 only
155
154
  transform: rotate($degrees);
156
155
  }
157
- @mixin scale($ratio, $ratio-y...) {
158
- -webkit-transform: scale($ratio, $ratio-y);
159
- -ms-transform: scale($ratio, $ratio-y); // IE9 only
160
- transform: scale($ratio, $ratio-y);
156
+ @mixin scale($scale-args...) {
157
+ -webkit-transform: scale($scale-args);
158
+ -ms-transform: scale($scale-args); // IE9 only
159
+ transform: scale($scale-args);
161
160
  }
162
161
  @mixin translate($x, $y) {
163
162
  -webkit-transform: translate($x, $y);
@@ -253,7 +252,6 @@
253
252
  -webkit-user-select: $select;
254
253
  -moz-user-select: $select;
255
254
  -ms-user-select: $select; // IE10+
256
- -o-user-select: $select;
257
255
  user-select: $select;
258
256
  }
259
257
 
@@ -590,18 +588,24 @@
590
588
 
591
589
  // Contextual backgrounds
592
590
  // -------------------------
593
- @mixin bg-variant($color) {
594
- background-color: $color;
595
- a:hover {
591
+ // [converter] $parent hack
592
+ @mixin bg-variant($parent, $color) {
593
+ #{$parent} {
594
+ background-color: $color;
595
+ }
596
+ a#{$parent}:hover {
596
597
  background-color: darken($color, 10%);
597
598
  }
598
599
  }
599
600
 
600
601
  // Typography
601
602
  // -------------------------
602
- @mixin text-emphasis-variant($color) {
603
- color: $color;
604
- a:hover {
603
+ // [converter] $parent hack
604
+ @mixin text-emphasis-variant($parent, $color) {
605
+ #{$parent} {
606
+ color: $color;
607
+ }
608
+ a#{$parent}:hover {
605
609
  color: darken($color, 10%);
606
610
  }
607
611
  }
@@ -629,7 +633,9 @@
629
633
  // More easily include all the states for responsive-utilities.less.
630
634
  // [converter] $parent hack
631
635
  @mixin responsive-visibility($parent) {
632
- #{$parent} { display: block !important; }
636
+ #{$parent} {
637
+ display: block !important;
638
+ }
633
639
  table#{$parent} { display: table; }
634
640
  tr#{$parent} { display: table-row !important; }
635
641
  th#{$parent},
@@ -638,10 +644,9 @@
638
644
 
639
645
  // [converter] $parent hack
640
646
  @mixin responsive-invisibility($parent) {
641
- #{$parent},
642
- tr#{$parent},
643
- th#{$parent},
644
- td#{$parent} { display: none !important; }
647
+ #{$parent} {
648
+ display: none !important;
649
+ }
645
650
  }
646
651
 
647
652
 
@@ -782,13 +787,13 @@
782
787
  // Used only by Bootstrap to generate the correct number of grid classes given
783
788
  // any value of `$grid-columns`.
784
789
 
785
- // [converter] Grid converted to use SASS cycles (LESS uses recursive nested mixin defs not supported by SASS)
790
+ // [converter] This is defined recursively in LESS, but Sass supports real loops
786
791
  @mixin make-grid-columns() {
787
792
  $list: '';
788
793
  $i: 1;
789
794
  $list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
790
- @for $i from 2 through $grid-columns {
791
- $list: ".col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}, #{$list}";
795
+ @for $i from (1 + 1) through $grid-columns {
796
+ $list: "#{$list}, .col-xs-#{$i}, .col-sm-#{$i}, .col-md-#{$i}, .col-lg-#{$i}";
792
797
  }
793
798
  #{$list} {
794
799
  position: relative;
@@ -801,13 +806,13 @@
801
806
  }
802
807
 
803
808
 
804
- // [converter] Grid converted to use SASS cycles (LESS uses recursive nested mixin defs not supported by SASS)
805
- @mixin make-grid-columns-float($class) {
809
+ // [converter] This is defined recursively in LESS, but Sass supports real loops
810
+ @mixin float-grid-columns($class) {
806
811
  $list: '';
807
812
  $i: 1;
808
813
  $list: ".col-#{$class}-#{$i}";
809
- @for $i from 2 through $grid-columns {
810
- $list: ".col-#{$class}-#{$i}, #{$list}";
814
+ @for $i from (1 + 1) through $grid-columns {
815
+ $list: "#{$list}, .col-#{$class}-#{$i}";
811
816
  }
812
817
  #{$list} {
813
818
  float: left;
@@ -815,7 +820,7 @@
815
820
  }
816
821
 
817
822
 
818
- @mixin calc-grid($index, $class, $type) {
823
+ @mixin calc-grid-column($index, $class, $type) {
819
824
  @if ($type == width) and ($index > 0) {
820
825
  .col-#{$class}-#{$index} {
821
826
  width: percentage(($index / $grid-columns));
@@ -838,14 +843,22 @@
838
843
  }
839
844
  }
840
845
 
841
- // [converter] This is defined recursively in LESS, but SASS supports real loops
842
- @mixin make-grid($columns, $class, $type) {
846
+ // [converter] This is defined recursively in LESS, but Sass supports real loops
847
+ @mixin loop-grid-columns($columns, $class, $type) {
843
848
  @for $i from 0 through $columns {
844
- @include calc-grid($i, $class, $type);
849
+ @include calc-grid-column($i, $class, $type);
845
850
  }
846
851
  }
847
852
 
848
853
 
854
+ // Create grid for specific class
855
+ @mixin make-grid($class) {
856
+ @include float-grid-columns($class);
857
+ @include loop-grid-columns($grid-columns, $class, width);
858
+ @include loop-grid-columns($grid-columns, $class, pull);
859
+ @include loop-grid-columns($grid-columns, $class, push);
860
+ @include loop-grid-columns($grid-columns, $class, offset);
861
+ }
849
862
 
850
863
  // Form validation states
851
864
  //
@@ -914,11 +927,14 @@
914
927
 
915
928
  // [converter] $parent hack
916
929
  @mixin input-size($parent, $input-height, $padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {
917
- #{$parent} { height: $input-height;
918
- padding: $padding-vertical $padding-horizontal;
919
- font-size: $font-size;
920
- line-height: $line-height;
921
- border-radius: $border-radius; }
930
+ #{$parent} {
931
+ height: $input-height;
932
+ padding: $padding-vertical $padding-horizontal;
933
+ font-size: $font-size;
934
+ line-height: $line-height;
935
+ border-radius: $border-radius;
936
+ }
937
+
922
938
  select#{$parent} {
923
939
  height: $input-height;
924
940
  line-height: $input-height;