Smarter preserve/remove [fr]
Open
- Dominant language
- JavaScript
- Stars
- 438
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
It would be great if:
- there was an option to preserve all non-inlineable CSS, which in addition to existing preserveMediaQueries would also preserve selectors like a:hover etc.
- removeHtmlSelectors would cooperate with the preserved CSS, so it would remove only classes that are not addressed in preserved CSS.
For example:
```html
.c1 { color: blue; }
.c1:hover { color: red }
.c2 { color: blue; }
@media (min-width: 100px) {
.c2 { color: red }
}
.c3: { color: blue; }
c1
c2
c3
```
would result:
```html
.c1:hover { color: red }
@media (min-width: 100px) {
.c2 { color: red }
}
Contributor guide
Assessment
This issue has not been assessed yet.