parent-state
Allows to set a pseudo-element rules depending on its parent state right in the rule set of the pseudo-element itself.
Arguments
Name | Type | Default | Description |
---|---|---|---|
$states * | list | — | Pseudo-element parent state(s) (pseudo-classes, modifier classes, etc.). |
Example
@use 'more-sass' as more;
.element {
&::after {
@include more.parent-state(':hover', '.is-active') {
color: #f00;
}
}
}
.element:hover::after,
.element.is-active::after {
color: #f00;
}