-
-
Notifications
You must be signed in to change notification settings - Fork 399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add failing test for 'toString' on media queries #45
Add failing test for 'toString' on media queries #45
Conversation
nice catch @markdalgleish will fix it asap |
huh you got me debugging for quite some time util I figured out you have used @media query differently, it has been designed to be like
where name is there to have this rule accessible via it. |
wait, there is another issue. |
I need to rethink at-rule syntax in jss ... I have tested this way
However in named style sheet, selector is generated. At-identifiers shouldn't be treated as selectors. |
The problem is if we go this way
It is possible to have rules with same name ... So rules within @media become unaccessible if you want to do sheet.getRule('a') |
I think ideally every rule should be still accessible via getRule and every rule should be able to be part of some @rule |
This issue is exists only in named style sheet. |
Semantically @media is a "conditional rule group" https://developer.mozilla.org/de/docs/Web/CSS/At-rule Potentially we could have following syntax for conditionals:
|
I have added your test but modified to unnamed style sheet 8ac23ec just to make sure this will work. As for named style sheet I need to sleep over it. Its actually not a bug, its a missing feature. |
I seem to have found a bug when calling
toString
on style sheets with media queries.I'm not sure yet how to fix this, but I figured I'd open a discussion by providing a failing test.
The current failing test case shows how this:
is erroneously compiled into this: