-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Nested selectors with pseudo-elements result in invalid selectors #3119
Comments
As far as I can tell, pseudo-elements deliberately don't work with CSS nesting according to the CSS nesting specification (https://www.w3.org/TR/css-nesting-1/#ref-for-matches-pseudo%E2%91%A0):
So I believe esbuild is working correctly here. Both |
@evanw Thanks for the quick and precise response. |
I'll ask for clarification on this behavior. Right now there is only one implementation of this (Chrome) so it's hard to say what's a bug and what isn't. The CSS nesting specification is also still being actively changed so it's hard to say what the eventual behavior of CSS nesting is going to end up being. We'll have to wait and see. I know the people on CSS nesting want to remove this restriction. It sounds like they want to fix this by changing |
I'm reopening this because it looks like you're right. That part of the specification only applies to pseudo-elements that come in through the |
@evanw thanks! |
esbuild version: 0.17.19
Suppose you enter the following CSS:
expected transform css
actual transform css
Because of the specification that pseudo-elements cannot be placed in the
:is()
selector, it is treated as an invalid selector in the current implementation.The text was updated successfully, but these errors were encountered: