Hacker News new | ask | show | jobs
by djrenren 928 days ago
This is a great approach for components that want to inherit all styling from their context.

In cases where you want to introduce just a little styling, the CSS Parts API is really cool: https://developer.mozilla.org/en-US/docs/Web/CSS/::part

1 comments

Thanks for pointing this out. I should probably mention this approach in my article for cases when you need to work with slotted elements but don't want to inherit all page styles.