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

Nesting CSS with > only applies to the deepest rule #3046

Closed
ectudor opened this issue Apr 9, 2023 · 1 comment
Closed

Nesting CSS with > only applies to the deepest rule #3046

ectudor opened this issue Apr 9, 2023 · 1 comment

Comments

@ectudor
Copy link

ectudor commented Apr 9, 2023

version: 0.17.5

Input

.a {
  color: red;
  > .b {
    color: green;
     > .c {
       color: blue;
       > .d {
        color: blue;
      }
    }
  }
}

Output

.a {
  color: red;
}
.a > .b {
  color: green;
}
.a .b > .c {
  color: blue;
}
.a .b .c > .d {
  color: blue;
}

I expected it to be a. > .b > .c like the example in https://developer.chrome.com/articles/css-nesting/.
I'm not sure what's the impact because my simple css rules still works as expected.

@evanw
Copy link
Owner

evanw commented Apr 9, 2023

Thanks for the report. This is indeed a bug with esbuild.

@evanw evanw closed this as completed in 8b885fd Apr 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants