Example from readme fails
Closed this issue · 6 comments
The example from the readme fails, the options doesn't work wel with nested maps.
$colors: (
'blue': (
100: #e5f1fd,
200: #b0d6f9,
300: #7bbaf6,
400: #469ff2,
500: #1183ee,
600: #0d66b9,
700: #094984,
800: #062c4f,
900: #020f1a,
)
);
.text {
@include options($colors, 'hover' 'group-hover') using ($value) {
color: $value;
}
}
I ran it with an @error rule and this is what I got back:
Dart Sass failed with this error: (100: #e5f1fd, 200: #b0d6f9, 300: #7bbaf6, 400: #469ff2, 500: #1183ee, 600: #0d66b9, 700: #094984, 800: #062c4f, 900: #020f1a) isn't a valid CSS value.
╷
34 │ @error "Property #{$value}";
│ ^^^^^^
╵
style.scss 34:28 @content
../../node_modules/@snug/core/src/snug.scss 258:11 @content
../../node_modules/@snug/core/src/snug.scss 197:5 @content
../../node_modules/@snug/core/src/snug.scss 144:7 @content
../../node_modules/@snug/core/src/snug.scss 130:7 @content
../../node_modules/@snug/core/src/snug.scss 102:5 render()
../../node_modules/@snug/core/src/snug.scss 129:5 render-inline()
../../node_modules/@snug/core/src/snug.scss 143:5 render-variants()
../../node_modules/@snug/core/src/snug.scss 196:3 variants()
../../node_modules/@snug/core/src/snug.scss 257:9 options()
style.scss 33:5 root stylesheet
What version of snug are you using? From the error it looks like the 1.0.0-rc.0
where nested maps were not working.
Did you by any chance install it via npm
? It seems like the tags there are messed up right now.
yes, installed it via npm and indeed version 1.0.0-rc.0
Ok the latest
tag should now point to the currect version
Now I am on version 1.0.0-rc.1, but I still get the same error.
I'm using codekit generate which uses version 1.32.7 of Dart Sass to compile the scss.
Somehow the published version was not up to date.
The latest version (1.0.0-rc.2) available on npm
is now up to date.
Got to test it this morning and it works, so this is fixed.