Media queries
See original GitHub issueHi, I’m currently looking for something that will remove duplicate css properties accross media queries. Does this project do that?
for example:
h1 {
font-size: 25px;
font-weight: bold;
color: black;
}
@media screen and (min-width: 1000px) {
h1 {
font-size: 30px;
font-weight: bold;
color: black;
}
}
I’m hoping the second font weight and color would be discarded. I’m currently using css purge but it doesn’t seem to reliably do this http://rbtech.github.io/css-purge/
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Using media queries - CSS: Cascading Style Sheets | MDN
A media query is composed of an optional media type and any number of media feature expressions, which may optionally be combined in...
Read more >Responsive Web Design Media Queries - W3Schools
Media query is a CSS technique introduced in CSS3. It uses the @media rule to include a block of CSS properties only if...
Read more >A Complete Guide to CSS Media Queries
CSS Media queries are a way to target browser by certain characteristics, features, and user preferences, then apply styles based on those ...
Read more >Media queries - web.dev
Media queries are initiated with the @media keyword (a CSS at-rule), and can be used for a variety of use cases. Target different...
Read more >Media Queries
A collection of inspirational websites using media queries and responsive web design. Curated by Eivind Uggedal (@uggedal). A Twitter account is needed to ......
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 Free
Top 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
Hi, purgecss does not support this at the moment, but this is a really good idea! We might implement this feature in the futute
@garygreen good point but we could add an option to run cssnano after purgecss has completed, this would make implementation of both a lot easier for consumers.
My proposal: by default it is set to false, you can either pass true for default config or pass the options