Replies: 2 comments 5 replies
-
|
Stylus is dynamically scoped. While this might sound like weird advice, if you need this kind of behaviour, it's probably better to use a CSS variable. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I think this goes without saying. You can't set a compile-time variable with a runtime condition. That's what CSS custom properties are for. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Can you usefully set Stylus variables inside media queries? For example:
I tried, and it seemed not to work, which makes sense (unless Stylus propagated the
@mediaquery everywhere the variable was used, which seems really verbose).If it won't work, then the Stylus @media doc at https://stylus-lang.com/docs/media.html should mention that limitation.
Beta Was this translation helpful? Give feedback.
All reactions