diff options
| author | Félix Saparelli <[email protected]> | 2017-10-02 17:00:24 +1300 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2017-10-01 21:00:24 -0700 |
| commit | 67d7e26e05f23bc240f3c411a134d60a7e78a798 (patch) | |
| tree | 60a37730c92a76943e1b7ab442250eec34aa0be6 | |
| parent | 3ca4d3f88d8a2e5d43e6796c10630ad4b42ec045 (diff) | |
| download | bootstrap-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
| -rw-r--r-- | .scss-lint.yml | 3 | ||||
| -rw-r--r-- | scss/_root.scss | 16 | ||||
| -rw-r--r-- | scss/bootstrap.scss | 1 |
3 files changed, 20 insertions, 0 deletions
diff --git a/.scss-lint.yml b/.scss-lint.yml index eabc8a358..552168dda 100644 --- a/.scss-lint.yml +++ b/.scss-lint.yml @@ -3,6 +3,9 @@ scss_files: - "scss/**/*.scss" - "docs/assets/scss/**/*.scss" +exclude: + - "scss/_root.scss" + plugin_directories: ['.scss-linters'] # List of gem names to load custom linters from (make sure they are already 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"; |
