Jarzka / stylefy

Clojure(Script) library for styling user interface components with ease.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

modes nested in medias

paintparty opened this issue · comments

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!

Yes, this should be possible. There is also an example of this in the codebase:

::stylefy/media {mobile-media-query

Your code looks correct. Can you give me a full of example how you use it and what is the generated CSS output?

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!

Good to hear the problem is solved.