Open JacobDB opened 7 years ago
I realize this could be complicated, but it'd be fantastic if you could even parse a combined background rule and remove everything except the color. For example:
.example {
background: url("../media/some-background.jpg") center center / cover no-repeat #ff0000;
// or
background: url("../media/some-background.jpg") center center / cover no-repeat rgb(255,0,0);
// or
background: url("../media/some-background.jpg") center center / cover no-repeat red;
// etc...
}
// becomes
.example {
background: #ff0000;
// or
background: rgb(255,0,0);
// or
background: red;
// etc...
}
This module is working pretty well, but it appears that it's remove an entire ruleset instead of just removing the
background-image
rules. For example, I have this code:That entire rule is getting removed because of the
background-position
,background-repeat
, andbackground-size
rules. I need theflex-grow
,height
,margin
, andposition
rules all to remain for my critical CSS.