rules.scsslint.IdSelector.html Maven / Gradle / Ivy
Details
Avoid using ID selectors.
Bad: highly-specific styling for a single element via ID
#submit-button {
...
}
Good: reusable class
.submit-button {
...
}
While the CSS specification allows for multiple elements with the same ID to
appear in a single document, in practice this is a smell. ID selectors should
never be used for
the purposes of styling an element, as it leads to overly specific styles that
aren't easily shared with other elements.