Incorrect media query concats
See original GitHub issue@import "ignore.css" (min-width: 25em);
/* ignore.css */
@import "http://css-screen" screen;
Becomes :
@import "http://css-screen" (min-width: 25em) and screen;
Should be :
@import "http://css-screen" screen and (min-width: 25em);
It might be interesting to adopt our media query parser : https://github.com/csstools/postcss-plugins/tree/postcss-preset-env--v8/packages/media-query-list-parser#readme
It has a typed object model which makes it easier to avoid these issues.
Alternatively it is possible to “special case” these keywords :
screen
print
all
not
And then sorting the media query lists :
- these keywords first
- everything else later
- join with
and
Issue Analytics
- State:
- Created 10 months ago
- Comments:8
Top Results From Across the Web
Media Queries breakpoint at wrong value - css - Stack Overflow
I checked my reset css, I have the latest version of normalize.css... I have already used that structure of media query previously and...
Read more >Media Queries Level 5 - W3C
A media query is a logical expression that is either true or false. A media query is true if: the media type, if...
Read more >Beginner's guide to media queries - Learn web development
The CSS Media Query gives you a way to apply CSS only when the browser and device environment matches a rule that you...
Read more >How to Use Email Media Queries Across Different Email Clients
Learn how to use email media queries to create responsive email for different screen sizes and mobile devices. See email client support for...
Read more >Logic in CSS Media Queries (If / Else / And / Or / Not)
My problem is that the last Media Query is overriding everything. I can't seem to figure out why. I would have thought that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for trusting me with this package 🎉
Yes I also prefer to do PR’s, it so valuable to have another opinion on changes 😃
In that case, I think I’ll merge your regex hack and see if anyone complains 😉