You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Native CSS nesting syntax fails to transpile correctly in certain edge cases when used with scoped styles in the light DOM, particularly for direct child selectors. This occurs when child selectors are used without the & symbol.
Steps to Reproduce
Transpiles Correctly: CSS with class selectors and the & symbol for child selectors:
Thanks for such a detailed bug report! Native CSS nesting is a pretty new feature in browsers, so I'm not surprised there's cases that don't work quite right.
Description
Native CSS nesting syntax fails to transpile correctly in certain edge cases when used with scoped styles in the light DOM, particularly for direct child selectors. This occurs when child selectors are used without the
&
symbol.Steps to Reproduce
&
symbol for child selectors:&
symbol for child selectors:h2
) and without the&
symbol for child selectors:In this case, the output includes an incorrect concatenation of class and type selectors, which fails to target the intended elements properly.
Expected Results
CSS nesting should transpile correctly for direct child selectors, even when using type selectors without the
&
symbol. For example:Browsers Affected
All browsers supporting CSS nesting. Please refer to caniuse for browser compatibility infomation.
Version
Possible Solution
Consider removing the scoping hash from nested selectors, as the top-most ancestor selector is already scoped.
The text was updated successfully, but these errors were encountered: