diff options
| author | Bobby <[email protected]> | 2024-08-16 20:47:33 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-08-16 20:47:33 -0400 |
| commit | 6b28433d9cfde435be8ec2bd6cf91e6324d08865 (patch) | |
| tree | 8343c27b8b95ff5639233e81cf157f92e5688466 /scss/mixins/_grid.scss | |
| parent | d53094ec16ba385faae2973ddee648698b32ab24 (diff) | |
| parent | 048f56f51460df75e92a2f7b472e1c56baeb68f7 (diff) | |
| download | bootstrap-main.tar.xz bootstrap-main.zip | |
Diffstat (limited to 'scss/mixins/_grid.scss')
| -rw-r--r-- | scss/mixins/_grid.scss | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/scss/mixins/_grid.scss b/scss/mixins/_grid.scss index d6ac306b2..ea3073994 100644 --- a/scss/mixins/_grid.scss +++ b/scss/mixins/_grid.scss @@ -3,14 +3,14 @@ // Generate semantic grid columns with these mixins. @mixin make-row($gutter: $grid-gutter-width) { - --#{$variable-prefix}gutter-x: #{$gutter}; - --#{$variable-prefix}gutter-y: 0; + --#{$prefix}gutter-x: #{$gutter}; + --#{$prefix}gutter-y: 0; display: flex; flex-wrap: wrap; // TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed - margin-top: calc(-1 * var(--#{$variable-prefix}gutter-y)); // stylelint-disable-line function-disallowed-list - margin-right: calc(-.5 * var(--#{$variable-prefix}gutter-x)); // stylelint-disable-line function-disallowed-list - margin-left: calc(-.5 * var(--#{$variable-prefix}gutter-x)); // stylelint-disable-line function-disallowed-list + margin-top: calc(-1 * var(--#{$prefix}gutter-y)); // stylelint-disable-line function-disallowed-list + margin-right: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list + margin-left: calc(-.5 * var(--#{$prefix}gutter-x)); // stylelint-disable-line function-disallowed-list } @mixin make-col-ready() { @@ -22,9 +22,9 @@ flex-shrink: 0; width: 100%; max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid - padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list - padding-left: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list - margin-top: var(--#{$variable-prefix}gutter-y); + padding-right: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list + padding-left: calc(var(--#{$prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list + margin-top: var(--#{$prefix}gutter-y); } @mixin make-col($size: false, $columns: $grid-columns) { @@ -51,12 +51,12 @@ // Row columns // // Specify on a parent element(e.g., .row) to force immediate children into NN -// numberof columns. Supports wrapping to new lines, but does not do a Masonry +// number of columns. Supports wrapping to new lines, but does not do a Masonry // style grid. @mixin row-cols($count) { > * { flex: 0 0 auto; - width: divide(100%, $count); + width: percentage(divide(1, $count)); } } @@ -114,12 +114,12 @@ @each $key, $value in $gutters { .g#{$infix}-#{$key}, .gx#{$infix}-#{$key} { - --#{$variable-prefix}gutter-x: #{$value}; + --#{$prefix}gutter-x: #{$value}; } .g#{$infix}-#{$key}, .gy#{$infix}-#{$key} { - --#{$variable-prefix}gutter-y: #{$value}; + --#{$prefix}gutter-y: #{$value}; } } } @@ -138,7 +138,7 @@ } } - // Start with `1` because `0` is and invalid value. + // Start with `1` because `0` is an invalid value. // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible. @for $i from 1 through ($columns - 1) { .g-start#{$infix}-#{$i} { |
