rules.scsslint.IdSelector.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-web-frontend-scss Show documentation
Show all versions of sonar-web-frontend-scss Show documentation
Consume reports generated by scsslint for code quality. Also consume reports for code duplication (either simian or cpd). The information generated by reports are added in Sonar
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.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy