Skip to content
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 (max-width: Npx) queries parsed incorrectly #26

Open
Daedalon opened this issue Nov 19, 2016 · 0 comments
Open

@media (max-width: Npx) queries parsed incorrectly #26

Daedalon opened this issue Nov 19, 2016 · 0 comments

Comments

@Daedalon
Copy link

Daedalon commented Nov 19, 2016

Media queries with max-width are parsed incorrectly, leading to errors in page display. May affect more than just those with max-width. For example

.class3 { margin: 0; } @media (max-width: 123px) { .class1, .class2 { width: 100% !important; max-width: 100% !important; } .class3 { font-size: 80%; } }

Becomes wrongly sqwished as:

.class3{font-size:80%;margin:0}@media (max-width:123px){max-width:100%!important;.class1,.class2{width:100%!important}}

Two issues:

  1. The max-width rule for class1&2 is placed before the class selector where it doesn't have any effect.
  2. The rule for class 3 is removed from the @media query and combined with the non-media-queried rule, where it has an effect even when it shouldn't.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant