Web Components Community 🔷

Web Components Community 🔷 is a community of amazing users

The Community Platform for Web Components Users and Developers

Create account Log in

Discussion on: Tiny trick - :where() for easily overridden default CSS

Collapse
 
auroratide profile image
Timothy Foster

Neat trick!

For a typewritten-text component I published, I needed some styles in the Light DOM and ended up deciding to just release the stylesheet standalone so the developer can determine how to integrate it into their specific pipeline. This was to follow Open WC's recommendation to export side effects separately, which seemed tangentially related at the time.

Collapse
 
cjc profile image
Cameron Author

Thanks for that Open WC link, sounds like a good practice.

For this particular component there is so little styling involved that the <link> element would be larger than the CSS . The allure of elegance can make it hard to stick to your principles.

I'm rapidly discovering that a lot (all?) of the nuance for web components is in the packaging/delivery.