Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension doesn't trim a > b when superselector a b is present #1875

Open
connorskees opened this issue Jan 25, 2023 · 1 comment
Open

Extension doesn't trim a > b when superselector a b is present #1875

connorskees opened this issue Jan 25, 2023 · 1 comment
Labels
cosmetic Doesn't affects CSS semantics enhancement

Comments

@connorskees
Copy link
Contributor

Reopening sass/sass-spec#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.

@nex3 nex3 added enhancement cosmetic Doesn't affects CSS semantics labels Jan 30, 2023
@nex3
Copy link
Contributor

nex3 commented Jan 30, 2023

Marking this as cosmetic because it doesn't actually affect the CSS semantics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cosmetic Doesn't affects CSS semantics enhancement
Projects
None yet
Development

No branches or pull requests

2 participants