Skip to content

[V4] nesting rules doesn't behave well for pseudoelements and parts #17930

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

Closed
lucax88x opened this issue May 8, 2025 · 2 comments
Closed

[V4] nesting rules doesn't behave well for pseudoelements and parts #17930

lucax88x opened this issue May 8, 2025 · 2 comments

Comments

@lucax88x
Copy link

lucax88x commented May 8, 2025

What version of Tailwind CSS are you using?

For example: v4.1.5

What build tool (or framework if it abstracts the build tool) are you using?

For example: Vite 6.3.0

What version of Node.js are you using?

For example: v22.0.0

What browser are you using?

For example: Chrome, Firefox

What operating system are you using?

For example: macOS

Reproduction URL

https://stackblitz.com/edit/lit-element-ba85x7bn?file=src%2Findex.js,index.html,package.json

Describe your issue

In dev mode, so with nested css, there's a breaking change IF we use parts AND pseudo elements.

In the reproducion url you can see that if I do

my-element::part(text)::after {}

the pseudo elements works fine

but if I do

my-element::part(text) {
        &::after {}
}

the pseudo element doesn't show up.

Now, to be clear, this looks like a chrome/firefox bug/limitation/something but indeed, just wanted to raise for those people having the same issue.

might be related also to #16418

@philipp-spiess
Copy link
Member

Hey! Thanks for that. I think too that this is related to #16418, so going to merge this together for now.

@lucax88x
Copy link
Author

lucax88x commented May 8, 2025

@philipp-spiess I created a duplicate because the bug happens also on firefox, but up to you!

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