bootstrap-scss 5.2.0 → 5.2.1

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 (86) hide show
  1. package/README.md +1 -1
  2. package/_accordion.scss +7 -4
  3. package/_alert.scss +71 -71
  4. package/_badge.scss +38 -38
  5. package/_breadcrumb.scss +40 -40
  6. package/_button-group.scss +1 -1
  7. package/_buttons.scss +23 -8
  8. package/_card.scss +234 -234
  9. package/_carousel.scss +229 -229
  10. package/_close.scss +40 -40
  11. package/_containers.scss +41 -41
  12. package/_dropdown.scss +2 -1
  13. package/_forms.scss +9 -9
  14. package/_functions.scss +1 -1
  15. package/_grid.scss +33 -33
  16. package/_helpers.scss +10 -10
  17. package/_list-group.scss +6 -5
  18. package/_maps.scss +54 -54
  19. package/_mixins.scss +43 -43
  20. package/_modal.scss +1 -1
  21. package/_nav.scss +2 -2
  22. package/_navbar.scss +2 -0
  23. package/_offcanvas.scss +5 -4
  24. package/_pagination.scss +1 -1
  25. package/_placeholders.scss +51 -51
  26. package/_popover.scss +5 -5
  27. package/_progress.scss +59 -59
  28. package/_reboot.scss +610 -610
  29. package/_root.scss +73 -73
  30. package/_spinners.scss +85 -85
  31. package/_tables.scss +164 -164
  32. package/_toasts.scss +3 -2
  33. package/_tooltip.scss +120 -120
  34. package/_transitions.scss +27 -27
  35. package/_type.scss +106 -106
  36. package/_utilities.scss +647 -647
  37. package/_variables.scss +17 -16
  38. package/bootstrap-grid.scss +64 -64
  39. package/bootstrap-reboot.scss +9 -9
  40. package/bootstrap-utilities.scss +15 -15
  41. package/bootstrap.scss +51 -51
  42. package/forms/_floating-labels.scss +1 -0
  43. package/forms/_form-check.scss +175 -175
  44. package/forms/_form-control.scss +194 -194
  45. package/forms/_form-range.scss +91 -91
  46. package/forms/_form-select.scss +71 -71
  47. package/forms/_form-text.scss +11 -11
  48. package/forms/_input-group.scss +7 -4
  49. package/forms/_labels.scss +36 -36
  50. package/forms/_validation.scss +12 -12
  51. package/helpers/_clearfix.scss +3 -3
  52. package/helpers/_color-bg.scss +10 -10
  53. package/helpers/_colored-links.scss +12 -12
  54. package/helpers/_position.scss +36 -36
  55. package/helpers/_ratio.scss +26 -26
  56. package/helpers/_stacks.scss +15 -15
  57. package/helpers/_stretched-link.scss +15 -15
  58. package/helpers/_text-truncation.scss +7 -7
  59. package/helpers/_visually-hidden.scss +8 -8
  60. package/helpers/_vr.scss +8 -8
  61. package/mixins/_alert.scss +15 -15
  62. package/mixins/_backdrop.scss +14 -14
  63. package/mixins/_banner.scss +2 -2
  64. package/mixins/_border-radius.scss +78 -78
  65. package/mixins/_box-shadow.scss +18 -18
  66. package/mixins/_breakpoints.scss +127 -127
  67. package/mixins/_buttons.scss +70 -70
  68. package/mixins/_caret.scss +64 -64
  69. package/mixins/_clearfix.scss +9 -9
  70. package/mixins/_color-scheme.scss +7 -7
  71. package/mixins/_container.scss +11 -11
  72. package/mixins/_forms.scss +10 -10
  73. package/mixins/_gradients.scss +47 -47
  74. package/mixins/_grid.scss +151 -151
  75. package/mixins/_image.scss +16 -16
  76. package/mixins/_list-group.scss +24 -24
  77. package/mixins/_lists.scss +7 -7
  78. package/mixins/_pagination.scss +10 -10
  79. package/mixins/_reset-text.scss +17 -17
  80. package/mixins/_table-variants.scss +24 -24
  81. package/mixins/_transition.scss +26 -26
  82. package/mixins/_utilities.scss +1 -1
  83. package/mixins/_visually-hidden.scss +29 -29
  84. package/package.json +1 -1
  85. package/utilities/_api.scss +47 -47
  86. package/vendor/_rfs.scss +354 -354
@@ -1,64 +1,64 @@
1
- // scss-docs-start caret-mixins
2
- @mixin caret-down {
3
- border-top: $caret-width solid;
4
- border-right: $caret-width solid transparent;
5
- border-bottom: 0;
6
- border-left: $caret-width solid transparent;
7
- }
8
-
9
- @mixin caret-up {
10
- border-top: 0;
11
- border-right: $caret-width solid transparent;
12
- border-bottom: $caret-width solid;
13
- border-left: $caret-width solid transparent;
14
- }
15
-
16
- @mixin caret-end {
17
- border-top: $caret-width solid transparent;
18
- border-right: 0;
19
- border-bottom: $caret-width solid transparent;
20
- border-left: $caret-width solid;
21
- }
22
-
23
- @mixin caret-start {
24
- border-top: $caret-width solid transparent;
25
- border-right: $caret-width solid;
26
- border-bottom: $caret-width solid transparent;
27
- }
28
-
29
- @mixin caret($direction: down) {
30
- @if $enable-caret {
31
- &::after {
32
- display: inline-block;
33
- margin-left: $caret-spacing;
34
- vertical-align: $caret-vertical-align;
35
- content: "";
36
- @if $direction == down {
37
- @include caret-down();
38
- } @else if $direction == up {
39
- @include caret-up();
40
- } @else if $direction == end {
41
- @include caret-end();
42
- }
43
- }
44
-
45
- @if $direction == start {
46
- &::after {
47
- display: none;
48
- }
49
-
50
- &::before {
51
- display: inline-block;
52
- margin-right: $caret-spacing;
53
- vertical-align: $caret-vertical-align;
54
- content: "";
55
- @include caret-start();
56
- }
57
- }
58
-
59
- &:empty::after {
60
- margin-left: 0;
61
- }
62
- }
63
- }
64
- // scss-docs-end caret-mixins
1
+ // scss-docs-start caret-mixins
2
+ @mixin caret-down {
3
+ border-top: $caret-width solid;
4
+ border-right: $caret-width solid transparent;
5
+ border-bottom: 0;
6
+ border-left: $caret-width solid transparent;
7
+ }
8
+
9
+ @mixin caret-up {
10
+ border-top: 0;
11
+ border-right: $caret-width solid transparent;
12
+ border-bottom: $caret-width solid;
13
+ border-left: $caret-width solid transparent;
14
+ }
15
+
16
+ @mixin caret-end {
17
+ border-top: $caret-width solid transparent;
18
+ border-right: 0;
19
+ border-bottom: $caret-width solid transparent;
20
+ border-left: $caret-width solid;
21
+ }
22
+
23
+ @mixin caret-start {
24
+ border-top: $caret-width solid transparent;
25
+ border-right: $caret-width solid;
26
+ border-bottom: $caret-width solid transparent;
27
+ }
28
+
29
+ @mixin caret($direction: down) {
30
+ @if $enable-caret {
31
+ &::after {
32
+ display: inline-block;
33
+ margin-left: $caret-spacing;
34
+ vertical-align: $caret-vertical-align;
35
+ content: "";
36
+ @if $direction == down {
37
+ @include caret-down();
38
+ } @else if $direction == up {
39
+ @include caret-up();
40
+ } @else if $direction == end {
41
+ @include caret-end();
42
+ }
43
+ }
44
+
45
+ @if $direction == start {
46
+ &::after {
47
+ display: none;
48
+ }
49
+
50
+ &::before {
51
+ display: inline-block;
52
+ margin-right: $caret-spacing;
53
+ vertical-align: $caret-vertical-align;
54
+ content: "";
55
+ @include caret-start();
56
+ }
57
+ }
58
+
59
+ &:empty::after {
60
+ margin-left: 0;
61
+ }
62
+ }
63
+ }
64
+ // scss-docs-end caret-mixins
@@ -1,9 +1,9 @@
1
- // scss-docs-start clearfix
2
- @mixin clearfix() {
3
- &::after {
4
- display: block;
5
- clear: both;
6
- content: "";
7
- }
8
- }
9
- // scss-docs-end clearfix
1
+ // scss-docs-start clearfix
2
+ @mixin clearfix() {
3
+ &::after {
4
+ display: block;
5
+ clear: both;
6
+ content: "";
7
+ }
8
+ }
9
+ // scss-docs-end clearfix
@@ -1,7 +1,7 @@
1
- // scss-docs-start mixin-color-scheme
2
- @mixin color-scheme($name) {
3
- @media (prefers-color-scheme: #{$name}) {
4
- @content;
5
- }
6
- }
7
- // scss-docs-end mixin-color-scheme
1
+ // scss-docs-start mixin-color-scheme
2
+ @mixin color-scheme($name) {
3
+ @media (prefers-color-scheme: #{$name}) {
4
+ @content;
5
+ }
6
+ }
7
+ // scss-docs-end mixin-color-scheme
@@ -1,11 +1,11 @@
1
- // Container mixins
2
-
3
- @mixin make-container($gutter: $container-padding-x) {
4
- --#{$prefix}gutter-x: #{$gutter};
5
- --#{$prefix}gutter-y: 0;
6
- width: 100%;
7
- padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
8
- padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
9
- margin-right: auto;
10
- margin-left: auto;
11
- }
1
+ // Container mixins
2
+
3
+ @mixin make-container($gutter: $container-padding-x) {
4
+ --#{$prefix}gutter-x: #{$gutter};
5
+ --#{$prefix}gutter-y: 0;
6
+ width: 100%;
7
+ padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
8
+ padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
9
+ margin-right: auto;
10
+ margin-left: auto;
11
+ }
@@ -135,16 +135,16 @@
135
135
  }
136
136
  }
137
137
 
138
- .input-group .form-control,
139
- .input-group .form-select {
140
- @include form-validation-state-selector($state) {
141
- @if $state == "valid" {
142
- z-index: 1;
143
- } @else if $state == "invalid" {
144
- z-index: 2;
145
- }
146
- &:focus {
147
- z-index: 3;
138
+ .input-group {
139
+ > .form-control:not(:focus),
140
+ > .form-select:not(:focus),
141
+ > .form-floating:not(:focus-within) {
142
+ @include form-validation-state-selector($state) {
143
+ @if $state == "valid" {
144
+ z-index: 3;
145
+ } @else if $state == "invalid" {
146
+ z-index: 4;
147
+ }
148
148
  }
149
149
  }
150
150
  }
@@ -1,47 +1,47 @@
1
- // Gradients
2
-
3
- // scss-docs-start gradient-bg-mixin
4
- @mixin gradient-bg($color: null) {
5
- background-color: $color;
6
-
7
- @if $enable-gradients {
8
- background-image: var(--#{$prefix}gradient);
9
- }
10
- }
11
- // scss-docs-end gradient-bg-mixin
12
-
13
- // scss-docs-start gradient-mixins
14
- // Horizontal gradient, from left to right
15
- //
16
- // Creates two color stops, start and end, by specifying a color and position for each color stop.
17
- @mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
18
- background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
19
- }
20
-
21
- // Vertical gradient, from top to bottom
22
- //
23
- // Creates two color stops, start and end, by specifying a color and position for each color stop.
24
- @mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: null, $end-percent: null) {
25
- background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
26
- }
27
-
28
- @mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) {
29
- background-image: linear-gradient($deg, $start-color, $end-color);
30
- }
31
-
32
- @mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
33
- background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
34
- }
35
-
36
- @mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
37
- background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
38
- }
39
-
40
- @mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) {
41
- background-image: radial-gradient(circle, $inner-color, $outer-color);
42
- }
43
-
44
- @mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
45
- background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
46
- }
47
- // scss-docs-end gradient-mixins
1
+ // Gradients
2
+
3
+ // scss-docs-start gradient-bg-mixin
4
+ @mixin gradient-bg($color: null) {
5
+ background-color: $color;
6
+
7
+ @if $enable-gradients {
8
+ background-image: var(--#{$prefix}gradient);
9
+ }
10
+ }
11
+ // scss-docs-end gradient-bg-mixin
12
+
13
+ // scss-docs-start gradient-mixins
14
+ // Horizontal gradient, from left to right
15
+ //
16
+ // Creates two color stops, start and end, by specifying a color and position for each color stop.
17
+ @mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
18
+ background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
19
+ }
20
+
21
+ // Vertical gradient, from top to bottom
22
+ //
23
+ // Creates two color stops, start and end, by specifying a color and position for each color stop.
24
+ @mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: null, $end-percent: null) {
25
+ background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
26
+ }
27
+
28
+ @mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) {
29
+ background-image: linear-gradient($deg, $start-color, $end-color);
30
+ }
31
+
32
+ @mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
33
+ background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
34
+ }
35
+
36
+ @mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
37
+ background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
38
+ }
39
+
40
+ @mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) {
41
+ background-image: radial-gradient(circle, $inner-color, $outer-color);
42
+ }
43
+
44
+ @mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
45
+ background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
46
+ }
47
+ // scss-docs-end gradient-mixins
package/mixins/_grid.scss CHANGED
@@ -1,151 +1,151 @@
1
- // Grid system
2
- //
3
- // Generate semantic grid columns with these mixins.
4
-
5
- @mixin make-row($gutter: $grid-gutter-width) {
6
- --#{$prefix}gutter-x: #{$gutter};
7
- --#{$prefix}gutter-y: 0;
8
- display: flex;
9
- flex-wrap: wrap;
10
- // TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed
11
- margin-top: calc(-1 * var(--#{$prefix}gutter-y)); // stylelint-disable-line function-disallowed-list
12
- margin-right: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list
13
- margin-left: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list
14
- }
15
-
16
- @mixin make-col-ready() {
17
- // Add box sizing if only the grid is loaded
18
- box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);
19
- // Prevent columns from becoming too narrow when at smaller grid tiers by
20
- // always setting `width: 100%;`. This works because we set the width
21
- // later on to override this initial width.
22
- flex-shrink: 0;
23
- width: 100%;
24
- max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
25
- padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
26
- padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
27
- margin-top: var(--#{$prefix}gutter-y);
28
- }
29
-
30
- @mixin make-col($size: false, $columns: $grid-columns) {
31
- @if $size {
32
- flex: 0 0 auto;
33
- width: percentage(divide($size, $columns));
34
-
35
- } @else {
36
- flex: 1 1 0;
37
- max-width: 100%;
38
- }
39
- }
40
-
41
- @mixin make-col-auto() {
42
- flex: 0 0 auto;
43
- width: auto;
44
- }
45
-
46
- @mixin make-col-offset($size, $columns: $grid-columns) {
47
- $num: divide($size, $columns);
48
- margin-left: if($num == 0, 0, percentage($num));
49
- }
50
-
51
- // Row columns
52
- //
53
- // Specify on a parent element(e.g., .row) to force immediate children into NN
54
- // number of columns. Supports wrapping to new lines, but does not do a Masonry
55
- // style grid.
56
- @mixin row-cols($count) {
57
- > * {
58
- flex: 0 0 auto;
59
- width: divide(100%, $count);
60
- }
61
- }
62
-
63
- // Framework grid generation
64
- //
65
- // Used only by Bootstrap to generate the correct number of grid classes given
66
- // any value of `$grid-columns`.
67
-
68
- @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
69
- @each $breakpoint in map-keys($breakpoints) {
70
- $infix: breakpoint-infix($breakpoint, $breakpoints);
71
-
72
- @include media-breakpoint-up($breakpoint, $breakpoints) {
73
- // Provide basic `.col-{bp}` classes for equal-width flexbox columns
74
- .col#{$infix} {
75
- flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
76
- }
77
-
78
- .row-cols#{$infix}-auto > * {
79
- @include make-col-auto();
80
- }
81
-
82
- @if $grid-row-columns > 0 {
83
- @for $i from 1 through $grid-row-columns {
84
- .row-cols#{$infix}-#{$i} {
85
- @include row-cols($i);
86
- }
87
- }
88
- }
89
-
90
- .col#{$infix}-auto {
91
- @include make-col-auto();
92
- }
93
-
94
- @if $columns > 0 {
95
- @for $i from 1 through $columns {
96
- .col#{$infix}-#{$i} {
97
- @include make-col($i, $columns);
98
- }
99
- }
100
-
101
- // `$columns - 1` because offsetting by the width of an entire row isn't possible
102
- @for $i from 0 through ($columns - 1) {
103
- @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
104
- .offset#{$infix}-#{$i} {
105
- @include make-col-offset($i, $columns);
106
- }
107
- }
108
- }
109
- }
110
-
111
- // Gutters
112
- //
113
- // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
114
- @each $key, $value in $gutters {
115
- .g#{$infix}-#{$key},
116
- .gx#{$infix}-#{$key} {
117
- --#{$prefix}gutter-x: #{$value};
118
- }
119
-
120
- .g#{$infix}-#{$key},
121
- .gy#{$infix}-#{$key} {
122
- --#{$prefix}gutter-y: #{$value};
123
- }
124
- }
125
- }
126
- }
127
- }
128
-
129
- @mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {
130
- @each $breakpoint in map-keys($breakpoints) {
131
- $infix: breakpoint-infix($breakpoint, $breakpoints);
132
-
133
- @include media-breakpoint-up($breakpoint, $breakpoints) {
134
- @if $columns > 0 {
135
- @for $i from 1 through $columns {
136
- .g-col#{$infix}-#{$i} {
137
- grid-column: auto / span $i;
138
- }
139
- }
140
-
141
- // Start with `1` because `0` is and invalid value.
142
- // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.
143
- @for $i from 1 through ($columns - 1) {
144
- .g-start#{$infix}-#{$i} {
145
- grid-column-start: $i;
146
- }
147
- }
148
- }
149
- }
150
- }
151
- }
1
+ // Grid system
2
+ //
3
+ // Generate semantic grid columns with these mixins.
4
+
5
+ @mixin make-row($gutter: $grid-gutter-width) {
6
+ --#{$prefix}gutter-x: #{$gutter};
7
+ --#{$prefix}gutter-y: 0;
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+ // TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed
11
+ margin-top: calc(-1 * var(--#{$prefix}gutter-y)); // stylelint-disable-line function-disallowed-list
12
+ margin-right: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list
13
+ margin-left: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list
14
+ }
15
+
16
+ @mixin make-col-ready() {
17
+ // Add box sizing if only the grid is loaded
18
+ box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);
19
+ // Prevent columns from becoming too narrow when at smaller grid tiers by
20
+ // always setting `width: 100%;`. This works because we set the width
21
+ // later on to override this initial width.
22
+ flex-shrink: 0;
23
+ width: 100%;
24
+ max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
25
+ padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
26
+ padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list
27
+ margin-top: var(--#{$prefix}gutter-y);
28
+ }
29
+
30
+ @mixin make-col($size: false, $columns: $grid-columns) {
31
+ @if $size {
32
+ flex: 0 0 auto;
33
+ width: percentage(divide($size, $columns));
34
+
35
+ } @else {
36
+ flex: 1 1 0;
37
+ max-width: 100%;
38
+ }
39
+ }
40
+
41
+ @mixin make-col-auto() {
42
+ flex: 0 0 auto;
43
+ width: auto;
44
+ }
45
+
46
+ @mixin make-col-offset($size, $columns: $grid-columns) {
47
+ $num: divide($size, $columns);
48
+ margin-left: if($num == 0, 0, percentage($num));
49
+ }
50
+
51
+ // Row columns
52
+ //
53
+ // Specify on a parent element(e.g., .row) to force immediate children into NN
54
+ // number of columns. Supports wrapping to new lines, but does not do a Masonry
55
+ // style grid.
56
+ @mixin row-cols($count) {
57
+ > * {
58
+ flex: 0 0 auto;
59
+ width: divide(100%, $count);
60
+ }
61
+ }
62
+
63
+ // Framework grid generation
64
+ //
65
+ // Used only by Bootstrap to generate the correct number of grid classes given
66
+ // any value of `$grid-columns`.
67
+
68
+ @mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
69
+ @each $breakpoint in map-keys($breakpoints) {
70
+ $infix: breakpoint-infix($breakpoint, $breakpoints);
71
+
72
+ @include media-breakpoint-up($breakpoint, $breakpoints) {
73
+ // Provide basic `.col-{bp}` classes for equal-width flexbox columns
74
+ .col#{$infix} {
75
+ flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
76
+ }
77
+
78
+ .row-cols#{$infix}-auto > * {
79
+ @include make-col-auto();
80
+ }
81
+
82
+ @if $grid-row-columns > 0 {
83
+ @for $i from 1 through $grid-row-columns {
84
+ .row-cols#{$infix}-#{$i} {
85
+ @include row-cols($i);
86
+ }
87
+ }
88
+ }
89
+
90
+ .col#{$infix}-auto {
91
+ @include make-col-auto();
92
+ }
93
+
94
+ @if $columns > 0 {
95
+ @for $i from 1 through $columns {
96
+ .col#{$infix}-#{$i} {
97
+ @include make-col($i, $columns);
98
+ }
99
+ }
100
+
101
+ // `$columns - 1` because offsetting by the width of an entire row isn't possible
102
+ @for $i from 0 through ($columns - 1) {
103
+ @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
104
+ .offset#{$infix}-#{$i} {
105
+ @include make-col-offset($i, $columns);
106
+ }
107
+ }
108
+ }
109
+ }
110
+
111
+ // Gutters
112
+ //
113
+ // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
114
+ @each $key, $value in $gutters {
115
+ .g#{$infix}-#{$key},
116
+ .gx#{$infix}-#{$key} {
117
+ --#{$prefix}gutter-x: #{$value};
118
+ }
119
+
120
+ .g#{$infix}-#{$key},
121
+ .gy#{$infix}-#{$key} {
122
+ --#{$prefix}gutter-y: #{$value};
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+
129
+ @mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {
130
+ @each $breakpoint in map-keys($breakpoints) {
131
+ $infix: breakpoint-infix($breakpoint, $breakpoints);
132
+
133
+ @include media-breakpoint-up($breakpoint, $breakpoints) {
134
+ @if $columns > 0 {
135
+ @for $i from 1 through $columns {
136
+ .g-col#{$infix}-#{$i} {
137
+ grid-column: auto / span $i;
138
+ }
139
+ }
140
+
141
+ // Start with `1` because `0` is and invalid value.
142
+ // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.
143
+ @for $i from 1 through ($columns - 1) {
144
+ .g-start#{$infix}-#{$i} {
145
+ grid-column-start: $i;
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
@@ -1,16 +1,16 @@
1
- // Image Mixins
2
- // - Responsive image
3
- // - Retina image
4
-
5
-
6
- // Responsive image
7
- //
8
- // Keep images from scaling beyond the width of their parents.
9
-
10
- @mixin img-fluid {
11
- // Part 1: Set a maximum relative to the parent
12
- max-width: 100%;
13
- // Part 2: Override the height to auto, otherwise images will be stretched
14
- // when setting a width and height attribute on the img element.
15
- height: auto;
16
- }
1
+ // Image Mixins
2
+ // - Responsive image
3
+ // - Retina image
4
+
5
+
6
+ // Responsive image
7
+ //
8
+ // Keep images from scaling beyond the width of their parents.
9
+
10
+ @mixin img-fluid {
11
+ // Part 1: Set a maximum relative to the parent
12
+ max-width: 100%;
13
+ // Part 2: Override the height to auto, otherwise images will be stretched
14
+ // when setting a width and height attribute on the img element.
15
+ height: auto;
16
+ }