The example given by the sass map.set
documentation doesn't work, why is that?
@use "sass:map";
$font-weights: (
'regular': 400,
'medium': 500,
'bold': 700
);
map.set($font-weights, 'extra-bold', 900);
// ("regular": 400, "medium": 500, "bold": 700, "extra-bold": 900)
map.set($font-weights, 'bold', 900);
// ("regular": 400, "medium": 500, "bold": 900)
My sass
version is 1.32.5
.
The entire error message:
Syntax Error: SassError: expected "{".
╷
9 │ map.set($font-weights, 'extra-bold', 900);
│ ^
╵
src\assets\styles\variables.scss 9:42 @import
src\assets\styles\main.scss 4:9 root stylesheet
I expect the map to be set without throwing errors.