Detect duplicate selectors
Hello! I'd like to propose an additional check that detects duplicate CSS selectors and displays a warning regarding code maintainability/redundancy.
For example:
#content {
border: 1px solid black;
}
#content {
color: #fff;
}
Will be detected with a suggestion to either merge the two together or remove one of the selectors.
Thoughts?
I'd also like to see this. Right now I'd have some use for it at work, so if I can convince the customer that it's worthwhile, I might even be able to implement it.
Me too, with the additional requirement that it be able to detect such duplicates when they appear in different css files. Currently csslint appears to treat each file as an independent unit.
@matthew-dalton-sirca That seems out of scope of the linter unless it was only doing that for css imports. But parsing html files to see which css files coexist seems out of scope