Comment by rafram

2 days ago

> There's no real standard to making web components look the way you want them to. You can't just use CSS (you have to have the shadow root "adopt" the styles).

Not exactly. There’s the ::part() pseudo-element selector, which allows you to target an element in the shadow tree that has a matching part attribute.

https://developer.mozilla.org/en-US/docs/Web/CSS/::part

Which is honestly kind of wild. You can't, as far as I know, customize pseudoelements of the part. You can't customize them in context (no striped table rows). You kind of have to just pray that custom properties work like you hope.