All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rules.scsslint.IdSelector.html Maven / Gradle / Ivy

Go to download

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

There is a newer version: 2.1.0
Show newest version

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