bootstrap 4.0.0.alpha6 → 4.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bootstrap might be problematic. Click here for more details.

Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/Gemfile +2 -4
  4. data/README.md +20 -22
  5. data/assets/javascripts/bootstrap.js +657 -361
  6. data/assets/javascripts/bootstrap.min.js +2 -3
  7. data/assets/javascripts/bootstrap/alert.js +8 -8
  8. data/assets/javascripts/bootstrap/button.js +16 -9
  9. data/assets/javascripts/bootstrap/carousel.js +48 -21
  10. data/assets/javascripts/bootstrap/collapse.js +42 -33
  11. data/assets/javascripts/bootstrap/dropdown.js +196 -52
  12. data/assets/javascripts/bootstrap/modal.js +71 -29
  13. data/assets/javascripts/bootstrap/popover.js +25 -13
  14. data/assets/javascripts/bootstrap/scrollspy.js +23 -21
  15. data/assets/javascripts/bootstrap/tab.js +14 -18
  16. data/assets/javascripts/bootstrap/tooltip.js +139 -83
  17. data/assets/javascripts/bootstrap/util.js +10 -8
  18. data/assets/stylesheets/_bootstrap-grid.scss +2 -8
  19. data/assets/stylesheets/_bootstrap-reboot.scss +1 -2
  20. data/assets/stylesheets/_bootstrap.scss +2 -15
  21. data/assets/stylesheets/bootstrap/_alert.scss +4 -11
  22. data/assets/stylesheets/bootstrap/_badge.scss +4 -33
  23. data/assets/stylesheets/bootstrap/_breadcrumb.scss +1 -1
  24. data/assets/stylesheets/bootstrap/_button-group.scss +11 -15
  25. data/assets/stylesheets/bootstrap/_buttons.scss +13 -42
  26. data/assets/stylesheets/bootstrap/_card.scss +27 -80
  27. data/assets/stylesheets/bootstrap/_carousel.scss +24 -17
  28. data/assets/stylesheets/bootstrap/_close.scss +0 -2
  29. data/assets/stylesheets/bootstrap/_custom-forms.scss +27 -36
  30. data/assets/stylesheets/bootstrap/_dropdown.scss +15 -48
  31. data/assets/stylesheets/bootstrap/_forms.scss +70 -68
  32. data/assets/stylesheets/bootstrap/_functions.scss +90 -0
  33. data/assets/stylesheets/bootstrap/_grid.scss +3 -2
  34. data/assets/stylesheets/bootstrap/_images.scss +1 -1
  35. data/assets/stylesheets/bootstrap/_input-group.scss +6 -8
  36. data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -4
  37. data/assets/stylesheets/bootstrap/_list-group.scss +9 -36
  38. data/assets/stylesheets/bootstrap/_mixins.scss +2 -18
  39. data/assets/stylesheets/bootstrap/_modal.scss +3 -3
  40. data/assets/stylesheets/bootstrap/_nav.scss +15 -16
  41. data/assets/stylesheets/bootstrap/_navbar.scss +70 -54
  42. data/assets/stylesheets/bootstrap/_pagination.scss +3 -4
  43. data/assets/stylesheets/bootstrap/_popover.scss +96 -72
  44. data/assets/stylesheets/bootstrap/_print.scss +1 -9
  45. data/assets/stylesheets/bootstrap/_progress.scss +4 -4
  46. data/assets/stylesheets/bootstrap/_reboot.scss +187 -95
  47. data/assets/stylesheets/bootstrap/_tables.scss +34 -19
  48. data/assets/stylesheets/bootstrap/_tooltip.scss +52 -35
  49. data/assets/stylesheets/bootstrap/_type.scss +8 -28
  50. data/assets/stylesheets/bootstrap/_utilities.scss +1 -0
  51. data/assets/stylesheets/bootstrap/_variables.scss +286 -410
  52. data/assets/stylesheets/bootstrap/mixins/_alert.scss +4 -5
  53. data/assets/stylesheets/bootstrap/mixins/_badge.scss +6 -5
  54. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +3 -3
  55. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +5 -0
  56. data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +23 -13
  57. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +11 -14
  58. data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +1 -1
  59. data/assets/stylesheets/bootstrap/mixins/_forms.scss +57 -55
  60. data/assets/stylesheets/bootstrap/mixins/_gradients.scss +1 -1
  61. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +9 -18
  62. data/assets/stylesheets/bootstrap/mixins/_grid.scss +12 -65
  63. data/assets/stylesheets/bootstrap/mixins/_hover.scss +6 -6
  64. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -4
  65. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +3 -3
  66. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -0
  67. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +4 -3
  68. data/assets/stylesheets/bootstrap/mixins/_resize.scss +1 -1
  69. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +5 -2
  70. data/assets/stylesheets/bootstrap/mixins/_text-truncate.scss +1 -1
  71. data/assets/stylesheets/bootstrap/mixins/_transition.scss +9 -0
  72. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +2 -2
  73. data/assets/stylesheets/bootstrap/utilities/_background.scss +4 -17
  74. data/assets/stylesheets/bootstrap/utilities/_borders.scss +20 -5
  75. data/assets/stylesheets/bootstrap/utilities/_display.scss +36 -1
  76. data/assets/stylesheets/bootstrap/{_responsive-embed.scss → utilities/_embed.scss} +0 -0
  77. data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -4
  78. data/assets/stylesheets/bootstrap/utilities/_position.scss +5 -3
  79. data/assets/stylesheets/bootstrap/utilities/_spacing.scss +10 -12
  80. data/assets/stylesheets/bootstrap/utilities/_text.scss +5 -17
  81. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -48
  82. data/bootstrap.gemspec +2 -0
  83. data/lib/bootstrap.rb +2 -0
  84. data/lib/bootstrap/version.rb +2 -2
  85. data/tasks/updater/js.rb +7 -9
  86. data/tasks/updater/scss.rb +1 -4
  87. data/templates/project/_bootstrap-variables.scss +289 -396
  88. data/test/dummy_rails/app/assets/javascripts/application.js +1 -1
  89. data/test/dummy_rails/config/application.rb +0 -1
  90. data/test/gemfiles/rails_4_2.gemfile +0 -4
  91. data/test/gemfiles/rails_5_0.gemfile +0 -4
  92. data/test/gemfiles/rails_5_1.gemfile +8 -0
  93. metadata +23 -8
  94. data/assets/stylesheets/bootstrap/_custom.scss +0 -4
  95. data/assets/stylesheets/bootstrap/_normalize.scss +0 -461
  96. data/assets/stylesheets/bootstrap/mixins/_cards.scss +0 -47
  97. data/assets/stylesheets/bootstrap/mixins/_transforms.scss +0 -14
@@ -1,14 +1,13 @@
1
- // Alerts
2
-
3
- @mixin alert-variant($background, $border, $body-color) {
1
+ @mixin alert-variant($background, $border, $color) {
2
+ color: $color;
4
3
  background-color: $background;
5
4
  border-color: $border;
6
- color: $body-color;
7
5
 
8
6
  hr {
9
7
  border-top-color: darken($border, 5%);
10
8
  }
9
+
11
10
  .alert-link {
12
- color: darken($body-color, 10%);
11
+ color: darken($color, 10%);
13
12
  }
14
13
  }
@@ -1,11 +1,12 @@
1
- // Badges
2
-
3
- @mixin badge-variant($color) {
4
- background-color: $color;
1
+ @mixin badge-variant($bg) {
2
+ @include color-yiq($bg);
3
+ background-color: $bg;
5
4
 
6
5
  &[href] {
7
6
  @include hover-focus {
8
- background-color: darken($color, 10%);
7
+ @include color-yiq($bg);
8
+ text-decoration: none;
9
+ background-color: darken($bg, 10%);
9
10
  }
10
11
  }
11
12
  }
@@ -8,15 +8,15 @@
8
8
 
9
9
  @mixin border-top-radius($radius) {
10
10
  @if $enable-rounded {
11
- border-top-right-radius: $radius;
12
11
  border-top-left-radius: $radius;
12
+ border-top-right-radius: $radius;
13
13
  }
14
14
  }
15
15
 
16
16
  @mixin border-right-radius($radius) {
17
17
  @if $enable-rounded {
18
- border-bottom-right-radius: $radius;
19
18
  border-top-right-radius: $radius;
19
+ border-bottom-right-radius: $radius;
20
20
  }
21
21
  }
22
22
 
@@ -29,7 +29,7 @@
29
29
 
30
30
  @mixin border-left-radius($radius) {
31
31
  @if $enable-rounded {
32
- border-bottom-left-radius: $radius;
33
32
  border-top-left-radius: $radius;
33
+ border-bottom-left-radius: $radius;
34
34
  }
35
35
  }
@@ -0,0 +1,5 @@
1
+ @mixin box-shadow($shadow...) {
2
+ @if $enable-shadows {
3
+ box-shadow: $shadow;
4
+ }
5
+ }
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // Breakpoints are defined as a map of (name: minimum width), order from small to large:
4
4
  //
5
- // (xs: 0, sm: 576px, md: 768px)
5
+ // (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)
6
6
  //
7
7
  // The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
8
8
 
@@ -10,9 +10,9 @@
10
10
  //
11
11
  // >> breakpoint-next(sm)
12
12
  // md
13
- // >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px))
13
+ // >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
14
14
  // md
15
- // >> breakpoint-next(sm, $breakpoint-names: (xs sm md))
15
+ // >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))
16
16
  // md
17
17
  @function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
18
18
  $n: index($breakpoint-names, $name);
@@ -21,7 +21,7 @@
21
21
 
22
22
  // Minimum breakpoint width. Null for the smallest (first) breakpoint.
23
23
  //
24
- // >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px))
24
+ // >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
25
25
  // 576px
26
26
  @function breakpoint-min($name, $breakpoints: $grid-breakpoints) {
27
27
  $min: map-get($breakpoints, $name);
@@ -31,7 +31,7 @@
31
31
  // Maximum breakpoint width. Null for the largest (last) breakpoint.
32
32
  // The maximum value is calculated as the minimum of the next one less 0.1.
33
33
  //
34
- // >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px))
34
+ // >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
35
35
  // 767px
36
36
  @function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
37
37
  $next: breakpoint-next($name, $breakpoints);
@@ -41,9 +41,9 @@
41
41
  // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront.
42
42
  // Useful for making responsive utilities.
43
43
  //
44
- // >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px))
44
+ // >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
45
45
  // "" (Returns a blank string)
46
- // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px))
46
+ // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
47
47
  // "-sm"
48
48
  @function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {
49
49
  @return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
@@ -78,10 +78,11 @@
78
78
  // Media that spans multiple breakpoint widths.
79
79
  // Makes the @content apply between the min and max breakpoints
80
80
  @mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {
81
- @include media-breakpoint-up($lower, $breakpoints) {
82
- @include media-breakpoint-down($upper, $breakpoints) {
83
- @content;
84
- }
81
+ $min: breakpoint-min($lower, $breakpoints);
82
+ $max: breakpoint-max($upper, $breakpoints);
83
+
84
+ @media (min-width: $min) and (max-width: $max) {
85
+ @content;
85
86
  }
86
87
  }
87
88
 
@@ -89,7 +90,16 @@
89
90
  // No minimum for the smallest breakpoint, and no maximum for the largest one.
90
91
  // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
91
92
  @mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
92
- @include media-breakpoint-between($name, $name, $breakpoints) {
93
- @content;
93
+ $min: breakpoint-min($name, $breakpoints);
94
+ $max: breakpoint-max($name, $breakpoints);
95
+
96
+ @if $min != null and $max != null {
97
+ @media (min-width: $min) and (max-width: $max) {
98
+ @content;
99
+ }
100
+ } @else if $max == null {
101
+ @include media-breakpoint-up($name)
102
+ } @else if $min == null {
103
+ @include media-breakpoint-down($name)
94
104
  }
95
105
  }
@@ -3,28 +3,25 @@
3
3
  // Easily pump out default styles, as well as :hover, :focus, :active,
4
4
  // and disabled options for all buttons
5
5
 
6
- @mixin button-variant($color, $background, $border) {
7
- $active-background: darken($background, 10%);
8
- $active-border: darken($border, 12%);
9
-
10
- color: $color;
6
+ @mixin button-variant($background, $border, $active-background: darken($background, 7.5%), $active-border: darken($border, 10%)) {
7
+ @include color-yiq($background);
11
8
  background-color: $background;
12
9
  border-color: $border;
13
10
  @include box-shadow($btn-box-shadow);
14
11
 
15
- // Hover and focus styles are shared
16
- @include hover {
17
- color: $color;
12
+ &:hover {
13
+ @include color-yiq($background);
18
14
  background-color: $active-background;
19
15
  border-color: $active-border;
20
16
  }
17
+
21
18
  &:focus,
22
19
  &.focus {
23
20
  // Avoid using mixin so we can pass custom focus shadow properly
24
21
  @if $enable-shadows {
25
- box-shadow: $btn-box-shadow, 0 0 0 2px rgba($border, .5);
22
+ box-shadow: $btn-box-shadow, 0 0 0 3px rgba($border, .5);
26
23
  } @else {
27
- box-shadow: 0 0 0 2px rgba($border, .5);
24
+ box-shadow: 0 0 0 3px rgba($border, .5);
28
25
  }
29
26
  }
30
27
 
@@ -38,7 +35,6 @@
38
35
  &:active,
39
36
  &.active,
40
37
  .show > &.dropdown-toggle {
41
- color: $color;
42
38
  background-color: $active-background;
43
39
  background-image: none; // Remove the gradient for the pressed/active state
44
40
  border-color: $active-border;
@@ -48,8 +44,8 @@
48
44
 
49
45
  @mixin button-outline-variant($color, $color-hover: #fff) {
50
46
  color: $color;
51
- background-image: none;
52
47
  background-color: transparent;
48
+ background-image: none;
53
49
  border-color: $color;
54
50
 
55
51
  @include hover {
@@ -60,7 +56,7 @@
60
56
 
61
57
  &:focus,
62
58
  &.focus {
63
- box-shadow: 0 0 0 2px rgba($color, .5);
59
+ box-shadow: 0 0 0 3px rgba($color, .5);
64
60
  }
65
61
 
66
62
  &.disabled,
@@ -79,8 +75,9 @@
79
75
  }
80
76
 
81
77
  // Button sizes
82
- @mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
78
+ @mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) {
83
79
  padding: $padding-y $padding-x;
84
80
  font-size: $font-size;
81
+ line-height: $line-height;
85
82
  @include border-radius($border-radius);
86
83
  }
@@ -1,7 +1,7 @@
1
1
  @mixin clearfix() {
2
2
  &::after {
3
3
  display: block;
4
- content: "";
5
4
  clear: both;
5
+ content: "";
6
6
  }
7
7
  }
@@ -1,39 +1,7 @@
1
- // Form validation states
2
- //
3
- // Used in _forms.scss to generate the form validation CSS for warnings, errors,
4
- // and successes.
5
-
6
- @mixin form-control-validation($color) {
7
- // Color the label and help text
8
- .form-control-feedback,
9
- .form-control-label,
10
- .col-form-label,
11
- .form-check-label,
12
- .custom-control {
13
- color: $color;
14
- }
15
-
16
- // Set the border and box shadow on specific inputs to match
17
- .form-control {
18
- border-color: $color;
19
-
20
- &:focus {
21
- @include box-shadow($input-box-shadow, 0 0 6px lighten($color, 20%));
22
- }
23
- }
24
-
25
- // Set validation states also for addons
26
- .input-group-addon {
27
- color: $color;
28
- border-color: $color;
29
- background-color: lighten($color, 40%);
30
- }
31
- }
32
-
33
1
  // Form control focus state
34
2
  //
35
3
  // Generate a customized focus state and for any input with the specified color,
36
- // which defaults to the `@input-border-focus` variable.
4
+ // which defaults to the `@input-border-color-focus` variable.
37
5
  //
38
6
  // We highly encourage you to not customize the default value, but instead use
39
7
  // this to tweak colors on an as-needed basis. This aesthetic change is based on
@@ -44,36 +12,70 @@
44
12
  // contrast against a dark gray background.
45
13
  @mixin form-control-focus() {
46
14
  &:focus {
47
- color: $input-color-focus;
48
- background-color: $input-bg-focus;
49
- border-color: $input-border-focus;
15
+ color: $input-focus-color;
16
+ background-color: $input-focus-bg;
17
+ border-color: $input-focus-border-color;
50
18
  outline: none;
51
- @include box-shadow($input-box-shadow-focus);
19
+ @include box-shadow($input-focus-box-shadow);
52
20
  }
53
21
  }
54
22
 
55
- // Form control sizing
56
- //
57
- // Relative text size, padding, and border-radii changes for form controls. For
58
- // horizontal sizing, wrap controls in the predefined grid classes. `<select>`
59
- // element gets special love because it's special, and that's a fact!
60
23
 
61
- @mixin input-size($parent, $input-height, $padding-y, $padding-x, $font-size, $line-height, $border-radius) {
62
- #{$parent} {
63
- height: $input-height;
64
- padding: $padding-y $padding-x;
65
- font-size: $font-size;
66
- line-height: $line-height;
67
- @include border-radius($border-radius);
24
+ @mixin form-validation-state($state, $color) {
25
+
26
+ .form-control,
27
+ .custom-select {
28
+ .was-validated &:#{$state},
29
+ &.is-#{$state} {
30
+ border-color: $color;
31
+
32
+ &:focus {
33
+ box-shadow: 0 0 0 .2rem rgba($color,.25);
34
+ }
35
+
36
+ ~ .invalid-feedback,
37
+ ~ .invalid-tooltip {
38
+ display: block;
39
+ }
40
+ }
68
41
  }
69
42
 
70
- select#{$parent} {
71
- height: $input-height;
72
- line-height: $input-height;
43
+
44
+ // TODO: redo check markup lol crap
45
+ .form-check-input {
46
+ .was-validated &:#{$state},
47
+ &.is-#{$state} {
48
+ + .form-check-label {
49
+ color: $color;
50
+ }
51
+ }
73
52
  }
74
53
 
75
- textarea#{$parent},
76
- select[multiple]#{$parent} {
77
- height: auto;
54
+ // custom radios and checks
55
+ .custom-control-input {
56
+ .was-validated &:#{$state},
57
+ &.is-#{$state} {
58
+ ~ .custom-control-indicator {
59
+ background-color: rgba($color, .25);
60
+ }
61
+ ~ .custom-control-description {
62
+ color: $color;
63
+ }
64
+ }
65
+ }
66
+
67
+ // custom file
68
+ .custom-file-input {
69
+ .was-validated &:#{$state},
70
+ &.is-#{$state} {
71
+ ~ .custom-file-control {
72
+ border-color: $color;
73
+
74
+ &::before { border-color: inherit; }
75
+ }
76
+ &:focus {
77
+ box-shadow: 0 0 0 .2rem rgba($color,.25);
78
+ }
79
+ }
78
80
  }
79
81
  }
@@ -17,8 +17,8 @@
17
17
  }
18
18
 
19
19
  @mixin gradient-directional($start-color: #555, $end-color: #333, $deg: 45deg) {
20
- background-repeat: repeat-x;
21
20
  background-image: linear-gradient($deg, $start-color, $end-color);
21
+ background-repeat: repeat-x;
22
22
  }
23
23
  @mixin gradient-x-three-colors($start-color: #00b3ee, $mid-color: #7a43b6, $color-stop: 50%, $end-color: #c3325f) {
24
24
  background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
@@ -3,14 +3,14 @@
3
3
  // Used only by Bootstrap to generate the correct number of grid classes given
4
4
  // any value of `$grid-columns`.
5
5
 
6
- @mixin make-grid-columns($columns: $grid-columns, $gutters: $grid-gutter-widths, $breakpoints: $grid-breakpoints) {
6
+ @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
7
7
  // Common properties for all breakpoints
8
8
  %grid-column {
9
9
  position: relative;
10
10
  width: 100%;
11
11
  min-height: 1px; // Prevent columns from collapsing when empty
12
-
13
- @include make-gutters($gutters);
12
+ padding-right: ($gutter / 2);
13
+ padding-left: ($gutter / 2);
14
14
  }
15
15
 
16
16
  @each $breakpoint in map-keys($breakpoints) {
@@ -22,7 +22,8 @@
22
22
  @extend %grid-column;
23
23
  }
24
24
  }
25
- .col#{$infix} {
25
+ .col#{$infix},
26
+ .col#{$infix}-auto {
26
27
  @extend %grid-column;
27
28
  }
28
29
 
@@ -36,6 +37,7 @@
36
37
  .col#{$infix}-auto {
37
38
  flex: 0 0 auto;
38
39
  width: auto;
40
+ max-width: none; // Reset earlier grid tiers
39
41
  }
40
42
 
41
43
  @for $i from 1 through $columns {
@@ -44,20 +46,9 @@
44
46
  }
45
47
  }
46
48
 
47
- @each $modifier in (pull, push) {
48
- @for $i from 0 through $columns {
49
- .#{$modifier}#{$infix}-#{$i} {
50
- @include make-col-modifier($modifier, $i, $columns)
51
- }
52
- }
53
- }
54
-
55
- // `$columns - 1` because offsetting by the width of an entire row isn't possible
56
- @for $i from 0 through ($columns - 1) {
57
- @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-xs-0
58
- .offset#{$infix}-#{$i} {
59
- @include make-col-modifier(offset, $i, $columns)
60
- }
49
+ @for $i from 1 through $columns {
50
+ .order#{$infix}-#{$i} {
51
+ order: $i;
61
52
  }
62
53
  }
63
54
  }
@@ -2,18 +2,12 @@
2
2
  //
3
3
  // Generate semantic grid columns with these mixins.
4
4
 
5
- @mixin make-container($gutters: $grid-gutter-widths) {
6
- position: relative;
7
- margin-left: auto;
5
+ @mixin make-container() {
8
6
  margin-right: auto;
9
-
10
- @each $breakpoint in map-keys($gutters) {
11
- @include media-breakpoint-up($breakpoint) {
12
- $gutter: map-get($gutters, $breakpoint);
13
- padding-right: ($gutter / 2);
14
- padding-left: ($gutter / 2);
15
- }
16
- }
7
+ margin-left: auto;
8
+ padding-right: ($grid-gutter-width / 2);
9
+ padding-left: ($grid-gutter-width / 2);
10
+ width: 100%;
17
11
  }
18
12
 
19
13
 
@@ -21,80 +15,33 @@
21
15
  @mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) {
22
16
  @each $breakpoint, $container-max-width in $max-widths {
23
17
  @include media-breakpoint-up($breakpoint, $breakpoints) {
24
- width: $container-max-width;
25
- max-width: 100%;
18
+ max-width: $container-max-width;
26
19
  }
27
20
  }
28
21
  }
29
22
 
30
- @mixin make-gutters($gutters: $grid-gutter-widths) {
31
- @each $breakpoint in map-keys($gutters) {
32
- @include media-breakpoint-up($breakpoint) {
33
- $gutter: map-get($gutters, $breakpoint);
34
- padding-right: ($gutter / 2);
35
- padding-left: ($gutter / 2);
36
- }
37
- }
38
- }
39
-
40
- @mixin make-row($gutters: $grid-gutter-widths) {
23
+ @mixin make-row() {
41
24
  display: flex;
42
25
  flex-wrap: wrap;
43
-
44
- @each $breakpoint in map-keys($gutters) {
45
- @include media-breakpoint-up($breakpoint) {
46
- $gutter: map-get($gutters, $breakpoint);
47
- margin-right: ($gutter / -2);
48
- margin-left: ($gutter / -2);
49
- }
50
- }
26
+ margin-right: ($grid-gutter-width / -2);
27
+ margin-left: ($grid-gutter-width / -2);
51
28
  }
52
29
 
53
- @mixin make-col-ready($gutters: $grid-gutter-widths) {
30
+ @mixin make-col-ready() {
54
31
  position: relative;
55
32
  // Prevent columns from becoming too narrow when at smaller grid tiers by
56
33
  // always setting `width: 100%;`. This works because we use `flex` values
57
34
  // later on to override this initial width.
58
35
  width: 100%;
59
36
  min-height: 1px; // Prevent collapsing
60
-
61
- @each $breakpoint in map-keys($gutters) {
62
- @include media-breakpoint-up($breakpoint) {
63
- $gutter: map-get($gutters, $breakpoint);
64
- padding-right: ($gutter / 2);
65
- padding-left: ($gutter / 2);
66
- }
67
- }
37
+ padding-right: ($grid-gutter-width / 2);
38
+ padding-left: ($grid-gutter-width / 2);
68
39
  }
69
40
 
70
41
  @mixin make-col($size, $columns: $grid-columns) {
71
42
  flex: 0 0 percentage($size / $columns);
72
- // width: percentage($size / $columns);
73
43
  // Add a `max-width` to ensure content within each column does not blow out
74
44
  // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
75
45
  // do not appear to require this.
76
46
  max-width: percentage($size / $columns);
77
47
  }
78
-
79
- @mixin make-col-offset($size, $columns: $grid-columns) {
80
- margin-left: percentage($size / $columns);
81
- }
82
-
83
- @mixin make-col-push($size, $columns: $grid-columns) {
84
- left: if($size > 0, percentage($size / $columns), auto);
85
- }
86
-
87
- @mixin make-col-pull($size, $columns: $grid-columns) {
88
- right: if($size > 0, percentage($size / $columns), auto);
89
- }
90
-
91
- @mixin make-col-modifier($type, $size, $columns) {
92
- // Work around the lack of dynamic mixin @include support (https://github.com/sass/sass/issues/626)
93
- @if $type == push {
94
- @include make-col-push($size, $columns);
95
- } @else if $type == pull {
96
- @include make-col-pull($size, $columns);
97
- } @else if $type == offset {
98
- @include make-col-offset($size, $columns);
99
- }
100
- }