[css-scoping] Clarification about :host and pseudo-class combination usage

Hi,

Recently we had a discussion about how

(A) :host(::before) { ... }
(B) :host::before { ... }

should match.

Our local conclusion was that a pseudo-class (like ::before) works like a
combinator
and (A) should be rejected at CSS parser level as :host() can only contain
a compound selector, while (B) should match, like :host::shadow which is
already
in the spec (http://dev.w3.org/csswg/css-scoping/ , example 6).

However, we were not sure in which a pseudo element like ::before is
categorized,
as http://dev.w3.org/csswg/selectors4/, section 3.1 Structure and
Terminology, says
nothing about "pseudo element" (in contrast, pseudo class is a simple
selector).

Let us know your thoughts about (A) and (B) above.

Relevant Chromium bugs:
https://code.google.com/p/chromium/issues/detail?id=393490
https://code.google.com/p/chromium/issues/detail?id=393509

-- 
Takayoshi Kochi

Received on Friday, 25 July 2014 06:18:30 UTC