1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-31 00:59:51 +02:00

Add bs- prefixes to custom properties (#30591)

This commit is contained in:
Martijn Cuppens
2020-04-15 18:52:16 +02:00
committed by GitHub
parent f0abe26b98
commit 8cdb057111
6 changed files with 20 additions and 20 deletions

View File

@@ -3,13 +3,13 @@
// Generate semantic grid columns with these mixins.
@mixin make-row($gutter: $grid-gutter-width) {
--grid-gutter-x: #{$gutter};
--grid-gutter-y: 0;
--bs-gutter-x: #{$gutter};
--bs-gutter-y: 0;
display: flex;
flex-wrap: wrap;
margin-top: calc(var(--grid-gutter-y) * -1); // stylelint-disable-line function-blacklist
margin-right: calc(var(--grid-gutter-x) / -2); // stylelint-disable-line function-blacklist
margin-left: calc(var(--grid-gutter-x) / -2); // stylelint-disable-line function-blacklist
margin-top: calc(var(--bs-gutter-y) * -1); // stylelint-disable-line function-blacklist
margin-right: calc(var(--bs-gutter-x) / -2); // stylelint-disable-line function-blacklist
margin-left: calc(var(--bs-gutter-x) / -2); // stylelint-disable-line function-blacklist
}
@mixin make-col-ready($gutter: $grid-gutter-width) {
@@ -21,9 +21,9 @@
flex-shrink: 0;
width: 100%;
max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
padding-right: calc(var(--grid-gutter-x) / 2); // stylelint-disable-line function-blacklist
padding-left: calc(var(--grid-gutter-x) / 2); // stylelint-disable-line function-blacklist
margin-top: var(--grid-gutter-y);
padding-right: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-blacklist
padding-left: calc(var(--bs-gutter-x) / 2); // stylelint-disable-line function-blacklist
margin-top: var(--bs-gutter-y);
}
@mixin make-col($size, $columns: $grid-columns) {
@@ -104,12 +104,12 @@
@each $key, $value in $gutters {
.g#{$infix}-#{$key},
.gx#{$infix}-#{$key} {
--grid-gutter-x: #{$value};
--bs-gutter-x: #{$value};
}
.g#{$infix}-#{$key},
.gy#{$infix}-#{$key} {
--grid-gutter-y: #{$value};
--bs-gutter-y: #{$value};
}
}
}