Target rule
Indirectly affects all rules
Current behavior
Currently, if a postcss.Rule selector contains a SASS variable, it is simply skipped in all rules.
Proposed behavior
SASS does not provide the ability to find out the value of a variable via any API, but the simplest scenarios can be calculated independently.
Examples
.some-component {
$b: #{&};
$link: #{$b}__link;
&__element {
// This selector is currently omitted,
// but it can generally be calculated quite easily.
#{$link}:hover & {}
}
}
Additional context
This probably needs to be done at the resolve-nested-selector stage, which all rules rely on in one way or another.
Extra info to consider
postcss/postcss-bem-linter#132
Target rule
Indirectly affects all rules
Current behavior
Currently, if a
postcss.Ruleselector contains a SASS variable, it is simply skipped in all rules.Proposed behavior
SASS does not provide the ability to find out the value of a variable via any API, but the simplest scenarios can be calculated independently.
Examples
Additional context
This probably needs to be done at the
resolve-nested-selectorstage, which all rules rely on in one way or another.Extra info to consider
postcss/postcss-bem-linter#132