hayatoito/hayatoito.github.io

Custom Element v1 scoped styling

Closed this issue · 1 comments

Thanks for the site. Very useful.

One thing I didn't see was mention of Custom Element v1 scoped styling.
https://github.com/polymer/polymer/tree/2.0-preview#v1-custom-elements

Thanks for the feedback.

I think ::content, ::slotted,/deep/, and ::shadow are already mentioned.
Given that, I guess you meant :host-context() pseudo-selectors, right?

That page said:

:host-context() pseudo-selectors have been removed.

However, I think this sentence might be confusing. Blink has not removed :host-context(), which is now being defined in CSS Scoping spec. You can use :host-context() in Blink.

I guess that the intention is that "Polymer 2.0 is no longer using :host-context()".

As far as I know, Polymer folks decided to use :host(:dir(...)), instead of :host-context() because WebKit @did not have a plan to support :host-context().