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

[v4] Expose CSS properties also to :host #14478

Open
lubomirblazekcz opened this issue Sep 20, 2024 · 1 comment
Open

[v4] Expose CSS properties also to :host #14478

lubomirblazekcz opened this issue Sep 20, 2024 · 1 comment

Comments

@lubomirblazekcz
Copy link
Contributor

What version of Tailwind CSS are you using?

For example: v4.0.0-alpha.21

Describe your issue

Currently the @theme CSS properties are exposed to :root, which is great but it would be also good to expose it to :host, like this :root, :host {}. This way the CSS properties are also available in web components.

Lets say you have a widget as web component <custom-widget></custom-widget> and inside there is CSS and tailwindcss classes in shadowroot, :root will not work - in this scenario the :host is the :root for the web component.

Eg. how it's done in Winduum here - https://github.com/winduum/winduum/blob/next/src/base/theme/default.css

@KennethHoff
Copy link

Speaking of, you should probably like/post your feedback to this CSS proposal

w3c/csswg-drafts#11000

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