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

I like this idea a lot. One thing about it that it solves is the issue of wanting to supply a "UA stylesheet" for your custom elements. You can't just do something like `my-element { display: block; }` because this fails to reach inside shadow roots. When we had deep, you could do something like `my-element, * /deep/ * my-element { display: block; }`, but deep is gone. Also, both of these ideas are higher priority than the UA stylesheet, [as noted in HTML as Custom Elements](https://domenic.github.io/html-as-custom-elements/).

One thing I am still confused on is whether `:host` is the right name for the selector targeting the specific element being defined. Since we're specifically _not_ talking about inserting a shadow root, and `:host` is currently defined in terms of shadow DOM, it seems like a bad match to me, and I'd expect something new, more like `:element`. But others have told me `:host` is a good idea. If we sufficiently redefined `:host` as such (@TabAtkins, @hayatoito?) then maybe it's OK. I'd still like to understand why we'd do that though.


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

Received on Tuesday, 29 March 2016 19:54:08 UTC