Skip to content

Commit cb43114

Browse files
committed
fix Sass interpolation conflict
Color names in -palette need to be quoted to avoid conflict with Sass interpolation. In that case, the color white was returning an error.
1 parent f61f75c commit cb43114

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

_sass/foundation/_settings.scss

+14-7
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,21 @@ $global-font-size: 100%;
6969
$global-width: rem-calc(1200);
7070
$global-lineheight: 1.5;
7171
$foundation-palette: (
72+
// Color names needs to be quoted to avoid conflict with Sass interpolation
73+
// especially with "white" in that case.
74+
//
75+
// Error message:
76+
// You probably don't mean to use the color value white' in interpolation here.
77+
// It may end up represented as #ffffff, which will likely produce invalid CSS.
78+
// Always quote color names when using them as strings (for example, "white").
79+
7280
//primary: #1779ba,
73-
primary: #21784a,
74-
secondary: #767676,
75-
success: #3adb76,
76-
warning: #ffae00,
77-
alert: #cc4b37,
78-
// custom
79-
white: #ffffff,
81+
"primary": #21784a,
82+
"secondary": #767676,
83+
"success": #3adb76,
84+
"warning": #ffae00,
85+
"alert": #cc4b37,
86+
"white": #ffffff,
8087
);
8188
$light-gray: #e6e6e6;
8289
$medium-gray: #cacaca;

0 commit comments

Comments
 (0)