Replies: 1 comment
-
Also tacking on support for https://github.com/KonnorRogers/tailwindcss-plugin-custom-elements/blob/main/exports/state-plugin.js |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
tl;dr
add part psuedo selector and all unset for unstyling and styling within custom-elements.
Explanation:
Within custom-elements you can style the shadowRoot by the use of the part selector.
This is commonly used to expose certain parts from your custom element to the outside world.
Also the normalize/css reset template does not reach within shadowRoot of a custom-element.
There are more webcomponent frameworks right nog and we solve this problem in Tailwind 3 by using
With this you can style the custom element with tailwind.
And now we can use tailwind to unstyle and style the default button within the shadowroot.
since custom-elements and parts are natively supported I think it should be part of tailwind default pseudo selector. including the all-unset for unsetting styles of default components within shadowRoots.
Beta Was this translation helpful? Give feedback.
All reactions