
rules.scsslint.PlaceholderInExtend.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
Always use placeholder selectors in @extend
.
Bad: extending a class
.fatal {
@extend .error;
}
Good: extending a placeholder
.fatal {
@extend %error;
}
Using a class selector with the @extend
directive usually results in more
generated CSS than when using a placeholder selector. Furthermore, Sass
specifically introduced placeholder selectors in order to be used with
@extend
.
See Mastering Sass extends and placeholders.
If you want to prevent the use of the @extend
directive entirely, see the
ExtendDirective linter.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy