DEV Community

Discussion on: JSSheet - A javascript to css parser

nicolalc profile image
Nicola Author

I'm still thinking about a solution.
The first idea in my mind is the following:

Add a mediaQuery property for an object:

  mediaQuery: [
    selector: 'screen and (max-width: 600px)',

So this will render a @media rule for each object.

What do you think about this proposal?

Another solution is to create a separate jss file (e.g. body-600.js) wich defines the media query for the body partial.