From: Gleb Mazovetskiy Date: Sat, 14 Oct 2017 07:29:43 +0000 (+0100) Subject: Escape SassScript in custom variable values (#24354) X-Git-Tag: v4.0.0-beta.2~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9fa21e701536e84789169fec6a1f4a0f821ee3c;p=thirdparty%2Fbootstrap.git 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 --- diff --git a/scss/_root.scss b/scss/_root.scss index 78ac03915d..ad550df3b4 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)}; }