modes nested in medias
paintparty opened this issue · comments
paintparty commented
Is it currently possible to do this? I couldn't get it to work...
(use-style {::stylefy/media {{:max-width "699px"} {::stylefy/mode {:hover :red}}}})
Use case is I would like to apply a certain hover state, but only at a specific breakpoint.
Thanks!
Jari Hanhela commented
Yes, this should be possible. There is also an example of this in the codebase:
Your code looks correct. Can you give me a full of example how you use it and what is the generated CSS output?
paintparty commented
Now looking at this again ... I see the error in my example code^.
{:hover :red}
should be {:hover {:color :red}}
.
You are right, this works as expected. Thank you for the link to example in codebase, very helpful!
Jari Hanhela commented
Good to hear the problem is solved.