bem-modifiers

Allows to use multiple modifiers in a single selector while using BEM methodology.

Arguments

NameTypeDefaultDescription
$modifiers *listA list of additional modifiers.

Example

@use 'more-sass' as more;

.block {
    &__element {
        @include more.bem-modifiers('--modifier-one', '--modifier-two', '--modifier-three') {
            color: #f00;
        }
    }
}
.block__element--modifier-one.block__element--modifier-two.block__element--modifier-three {
    color: #f00;
}
Edit this page on GitHub Updated at Mon, Jan 30, 2023