diff options
| author | Gleb Mazovetskiy <[email protected]> | 2017-10-14 08:29:43 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-10-14 08:29:43 +0100 |
| commit | a9fa21e701536e84789169fec6a1f4a0f821ee3c (patch) | |
| tree | 83b8a7728900b2eff53a70566a4710516548a72c /scss | |
| parent | 71e60e1f85e3e822bb62a919bfb9b1d4e5d7f29b (diff) | |
| download | bootstrap-a9fa21e701536e84789169fec6a1f4a0f821ee3c.tar.xz bootstrap-a9fa21e701536e84789169fec6a1f4a0f821ee3c.zip | |
Escape SassScript in custom variable values (#24354)
This is required for Sass v3.5+ compatibility.
See https://github.com/sass/sass/blob/stable/doc-src/SASS_CHANGELOG.md#backwards-incompatibilities----must-read and https://github.com/sass/sass/issues/2383
Diffstat (limited to 'scss')
| -rw-r--r-- | scss/_root.scss | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/scss/_root.scss b/scss/_root.scss index 78ac03915..ad550df3b 100644 --- a/scss/_root.scss +++ b/scss/_root.scss @@ -1,16 +1,19 @@ :root { + // Custom variable values only support SassScript inside `#{}`. @each $color, $value in $colors { - --#{$color}: $value; + --#{$color}: #{$value}; } @each $color, $value in $theme-colors { - --#{$color}: $value; + --#{$color}: #{$value}; } @each $bp, $value in $grid-breakpoints { - --breakpoint-#{$bp}: $value; + --breakpoint-#{$bp}: #{$value}; } - --font-family-sans-serif: $font-family-sans-serif; - --font-family-monospace: $font-family-monospace; + // Use `inspect` for lists so that quoted items keep the quotes. + // See https://github.com/sass/sass/issues/2383#issuecomment-336349172 + --font-family-sans-serif: #{inspect($font-family-sans-serif)}; + --font-family-monospace: #{inspect($font-family-monospace)}; } |
