[Feature]: support for shadow dom in Twind v1?
See original GitHub issueDescribe the problem
How to add Tailwind classes inside shadow dom?
Describe the proposed solution
There was a nice documentation about adding support for shadow DOM for the beta version https://twind.dev/usage-guides/web-components.html, but the required classes create and  cssomSheet are not present in the latest version. This is also not mentioned in the migration guide.
Alternatives considered
No response
Importance
I cannot use Twind without it
Additional Information
No response
Issue Analytics
- State:
- Created 9 months ago
- Comments:5
 Top Results From Across the Web
Top Results From Across the Web
Shadow DOM (V1) | Can I use... Support tables for ... - CanIUse
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >[Feature] Support Shadow DOM v1 #403 - basecamp/trix
I am requesting support for Shadow DOM as a feature because there are just too many bugs to try to describe. When Trix...
Read more >Shadow DOM v1 - Self-Contained Web Components
Shadow DOM allows web developers to create compartmentalized DOM and CSS for web components.
Read more >Use with Web Components - Twind
Custom Elements and Shadow DOM. This example shows how Custom Element can have its styles separated without having the side effect of polluting...
Read more >Using shadow DOM - Web Components | MDN
Shadow DOM allows hidden DOM trees to be attached to elements in the regular DOM tree — this shadow DOM tree starts with...
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

@sastan, thanks; it seems to be working for me. I also wrote small guide in case others are looking for the solution https://gourav.io/blog/tailwind-in-shadow-dom
@sastan I’ll give you some context… I’m developing a chrome extension and need to show some UI using shadow DOM on web pages so that the styles don’t get leaked to the page. You’re right that
@twind/with-web-componentswon’t be helpful in my case as I’m not using lit or web components. If you could provide@twind/with-shadow-rootthat abstracts away the code, that’d be nice.