Dynamic setting of @media constraint in css

Hi,

Say I wanted to make css rules dependent on a variable from my vuex store (in this case the app’s max-width). How can I achieve this dynamically?
Something like:

@media all and (min-width: *myVariable*) {
[...]  
}

thanks,
Niko

I don’t know is it possible or not.But I think this article can help you.

Hi Rabby,
Thank you for the link! good stuff!
I ended up solving my problem with a different strategy…
-Niko

1 Like