cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.06k stars 397 forks source link

Media queries are not updated dynamically #1451

Open synedra-mpe opened 3 years ago

synedra-mpe commented 3 years ago

Expected behavior: Using function rules I want to be able to create media queries which depend on props and get updated on props change.

Describe the bug: Media queries dont get updated on props change.

Reproduction: https://codesandbox.io/s/react-jss-playground-forked-ekg58?file=/index.js Clicking the Toggle Button changes the breakpoint for the media query. console.log shows, that the string gets generated, but the change is not reflected in the html output. Try changing the width of the output html view. Before clicking the toggle button, breakpoint width is 720px, where bakcground color changes red/blue. After clicking toggle button, it should be 480px.

Versions ():

humandad commented 3 years ago

I'm having this same issue. Is this intended behavior or a bug?

kof commented 3 years ago

Duplicate of https://github.com/cssinjs/jss/issues/1434 can be seen as a bug or as a missing feature