Re: [w3c/webcomponents] Provide a lightweight mechanism to add styles to a custom element (#468)

> > * Styling elements that do not otherwise need a shadow root
> Could you give us a concrete list of those elements?

This is an unbounded set of author-created elements, so no, a "concrete list of those elements" can't be provided.  Justin can probably give a few examples from their own code, tho.

> The solution here is to attach a shadow root on a custom element where such rules need to be applied. 

As Justin said, in cases where you don't actually need a shadow tree (your custom element is a container with special powers, that doesn't need to provide any special shadow structure), requiring a shadow root + style element is a cost without a benefit.

> Could you list a concrete use case and what those undesirable side effects are?

We're just talking about standard specificity battles.  You don't have to worry about fighting with another selector when overriding UA styles; they lay the default groundwork, and you can override freely; even if they respond to state in some way, which would require higher-specificity selectors, you can still override without worry.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/468#issuecomment-214966064

Received on Wednesday, 27 April 2016 04:20:36 UTC