Skip to content

Conversation

@hugo-vrijswijk
Copy link
Contributor

Fixes #15799

This replaces the :root selector with :host in the @theme layer. This is necessary for the @theme layer to work correctly in shadow DOM.

Also updates the snapshots for the tests that were affected by this change (in a separate commit).

Fixes tailwindlabs#15799

This replaces the `:root` selector with `:host` in the `@theme` layer. This is necessary for the `@theme` layer to work correctly in shadow DOM.

Also updates the snapshots for the tests that were affected by this change (in a separate commit)
@hugo-vrijswijk hugo-vrijswijk requested a review from a team as a code owner January 28, 2025 15:01
@adamwathan
Copy link
Member

Hey! This appears to break all theme variables in the framework when used regularly without the shadow DOM:

https://play.tailwindcss.com/255UWngh2x?file=css

So going to close this one as-is, but welcome to open a PR that uses :root, :host { ... } instead which I think would work.

@adamwathan adamwathan closed this Jan 28, 2025
@hugo-vrijswijk
Copy link
Contributor Author

Hey! This appears to break all theme variables in the framework when used regularly without the shadow DOM:

https://play.tailwindcss.com/255UWngh2x?file=css

So going to close this one as-is, but welcome to open a PR that uses :root, :host { ... } instead which I think would work.

@adamwathan see #15975

@hugo-vrijswijk hugo-vrijswijk deleted the host-root branch January 28, 2025 15:47
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

Successfully merging this pull request may close these issues.

tailwindcss and shadow dom not working well (--spacing)

2 participants