dart-sass
dart-sass copied to clipboard
Extension doesn't trim `a > b` when superselector `a b` is present
Reopening https://github.com/sass/sass-spec/pull/1872 seems to have exposed a regression in dart-sass's behavior for trimming complex selectors.
The reproduction is:
a b {
@extend %c;
}
a > b {
@extend %c;
}
%c {
color: red;
}
which on the most recent version of dart-sass will produce
a b, a > b {
color: red;
}
The expected output (and what dart-sass emitted in a prior version) is
a b {
color: red;
}
This is because the presence of a b makes a > b redundant.
Marking this as cosmetic because it doesn't actually affect the CSS semantics.