rules.scsslint.PlaceholderInExtend.html Maven / Gradle / Ivy
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.