aboutsummaryrefslogtreecommitdiff
path: root/scss
diff options
context:
space:
mode:
authorFĂ©lix Saparelli <[email protected]>2017-10-02 17:00:24 +1300
committerMark Otto <[email protected]>2017-10-01 21:00:24 -0700
commit67d7e26e05f23bc240f3c411a134d60a7e78a798 (patch)
tree60a37730c92a76943e1b7ab442250eec34aa0be6 /scss
parent3ca4d3f88d8a2e5d43e6796c10630ad4b42ec045 (diff)
downloadbootstrap-67d7e26e05f23bc240f3c411a134d60a7e78a798.tar.xz
bootstrap-67d7e26e05f23bc240f3c411a134d60a7e78a798.zip
Generate CSS variables for colors, breakpoints, fonts (#23761)
* Generate CSS variables See #23349 Supersedes #23446 * Ignore _root.scss for linting
Diffstat (limited to 'scss')
-rw-r--r--scss/_root.scss16
-rw-r--r--scss/bootstrap.scss1
2 files changed, 17 insertions, 0 deletions
diff --git a/scss/_root.scss b/scss/_root.scss
new file mode 100644
index 000000000..78ac03915
--- /dev/null
+++ b/scss/_root.scss
@@ -0,0 +1,16 @@
+:root {
+ @each $color, $value in $colors {
+ --#{$color}: $value;
+ }
+
+ @each $color, $value in $theme-colors {
+ --#{$color}: $value;
+ }
+
+ @each $bp, $value in $grid-breakpoints {
+ --breakpoint-#{$bp}: $value;
+ }
+
+ --font-family-sans-serif: $font-family-sans-serif;
+ --font-family-monospace: $font-family-monospace;
+}
diff --git a/scss/bootstrap.scss b/scss/bootstrap.scss
index 648f446b6..f83914dc3 100644
--- a/scss/bootstrap.scss
+++ b/scss/bootstrap.scss
@@ -8,6 +8,7 @@
@import "functions";
@import "variables";
@import "mixins";
+@import "root";
@import "print";
@import "reboot";
@import "type";