You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is due to the order in which Sass parses different syntactic forms. When the parser first parses the document, it decides what each rule is—whether it's a style rule, a media directive, or something else entirely. Interpolation, like the #{$test} in your example, is classified as a style rule. Then when it executes the stylesheet, it tries to parse whatever the contents of the rule are as a selector. @media (max-width: 699px) isn't a valid selector, so this parsing fails.
If you're trying to dynamically choose between a selector or a media query, I suggest using a mixing with a @content directive.
Thanks for the documentation pointer, I'll read it over. The problem is that I wanted a single user defined variable to be used, and I wanted the user to be able to use either $hover-setting: '.custom-selector';
or $hover-setting: '@media (hover: hover);
why doesn't this work?
but a normal selector does:
The text was updated successfully, but these errors were encountered: