I'm hitting a error when I use a variable for a media query. I have trivially reproed the issue here:
$media-xs: screen and (max-width: 480px);
// no errors
@media screen and (max-width: 480px) {
.blu { color: blue; }
}
// throws error
@media #{$media-xs} {
.blu { color: blue; }
}
The output when I run this via CLI is:
$ sass test.scss test.css
Error: (max-width: 480px) isn't a valid CSS value.
╷
13 │ @media #{$media-xs} {
│ ^^^^^^^^^
╵
test.scss 13:10 root stylesheet