-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Media query ordering changes when converting to object #69
Comments
Can you create a smaller example to understand what is happening? |
Sure thing. I've edited my original issue to include the bare minimum to reproduce. |
I got the problem, it happens because you have 2 media queries. JS object doesn’t allow having 2 properties with the same key, so we try to collapse them. There will not be a proper solution for this limit. Here is what we can do:
|
The third option is to change But maybe this strategy will create less issue. If you want to you try to help me creating a PR. |
Could a possible fourth option be to output an array of objects instead of an object? I know that Tailwind (which is my use case) accepts this syntax (see very end of that page for example). I'm not sure how widely acceptable that would be, though. |
We can generate array in case when we have different media with the same params. |
The |
I have a problem where a given rule's default definition (
.leoButton.isSecondary
) gets placed after the media query, which changes the behavior of the rendering. As such, the default overrides the media query, and the media query never takes effect.Is this a known bug? Is there any known fix for this?
Input
Output
The text was updated successfully, but these errors were encountered: