cssinjs / jss

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

Fix media query issue #1523

Open mjeanroy opened 3 years ago

mjeanroy commented 3 years ago

Corresponding Issue(s):

1320

What Would You Like to Add/Fix?

The goal is to fix an issue regarding media query rules when defined in a nested & dynamic rule.

Todo

Expectations on Changes

/

Changelog

I already gave a detailed explanation here.

Please note that this PR is just a basic fix, it's probably not clean but I open this PR to get your feedback on this 🙏

kof commented 3 years ago

I am a bit surprised that this could be a fix for that linked bug. Can you please create a failing test? A test would be super valuable here to make sure we are fixing the same right thing.

Ideally right now we need a test that shows we are fixing the originally reported bug: in react-jss that would use a media query inside a function rule, like in the original description.

Later on we would need a test in plugin nested and in the core if we end up modifying/adding those methods, but for now we need a test in react-jss because that would make sure the entire integration works as expected.

kof commented 3 years ago

I think you are on a good path, we need tests and we need a much cleaner api.

hkar19 commented 3 years ago

may we have patch package for this commit please?

caitlinwhiteley commented 3 years ago

Hi, are there any updates on the status of this PR?