Hacker News new | past | comments | ask | show | jobs | submit login

Yes but it doesn't leak CSS when you want it to, I've never figured how to setup a CSS only dark theme using a top-level classname like Tailwind does for instance



CSS custom properties are what you’re looking for here.

They cascade into the ShadowDOM without any issues.


If you want classnames:

- <my-component class="dark"

- :host(.dark) to style inside the component




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: