Closed proyb6 closed 6 years ago
Hi there, since in the global scope, the duplicate rules will be reduced, within @media queries, the rules will also be reduced. The actual media queries themselves will not be reduced by default because the "bypass_media_rules" option is true.
Removing duplicates is at the core of CSS-Purge, so its a bit strange to want it to not reduce duplicates, if you can provide a small example of CSS to motivate your scenario to disable reduction, I may consider creating an option for it.
Here's an example of what I'm talking about...
.panel {
background-color: blue;
}
.panel {
background-color: red;
}
@media (max-width: 320px) {
.panel {
background-color: green;
}
.panel {
background-color: red;
}
}
@media (max-width: 320px) {
.panel {
background-color: green;
}
.panel {
background-color: red;
}
}
Will become...
.panel {
background-color: red;
}
@media (max-width:320px) {
.panel {
background-color: red;
}
}
@media (max-width:320px) {
.panel {
background-color: red;
}
}
Using the example config, how do you retain CSS with
@media ...
which is being strip away after CSS purge.For responsive CSS, if I have mb2 classes in global scope and the same classes name is in
@media...
scope, now do you retain 2 duplicates classes for responsive website?