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

@rakina, the behaviors of the listed approaches are helpful, but not quite enough to help make a decision. In particular, you list a lot of things that are true for each approach, but we don't know whether they're true or not for the other approach.

For example, "Default style does not show up in shadowRoot.styleSheets" is listed as true for the fake shadow root approach when there is a real shadow root. But is it also true for when there is no real shadow root? Is it also true for the UA approach?

Also, a lot of things are listed that are not observable consequences, so are a bit confusing.

What would be most helpful is a list of observable consequences (perhaps with corresponding test cases for each), and a table that shows Y/N for the two approaches, or similar.

Here is my starting attempt:

||Fake SR|UA|
------|-------|---
|Selectors that work in the CE stylesheet|:host, :host() and :host-context()|Simple selectors (but only the element itself is ever matched)|
|::slotted still works in shadow stylesheets|Yes|Yes|
|Effect of !important in CE stylesheet|Overrides author styles applied from the outside, but not user styles|No effect|
|Effect on shadowRoot.styleSheets|No effect|No effect|

I'm sure there's much more. In particular I'm curious about my precedence order from [previously](https://github.com/w3c/webcomponents/issues/468#issuecomment-395147351). Is it correct, for the fake SR version? What is the version for the UA version? What other observable things could be different?

-- 
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-397434940

Received on Thursday, 14 June 2018 20:55:02 UTC