- From: L. David Baron <dbaron@dbaron.org>
- Date: Mon, 23 Mar 2015 15:40:17 -0700
- To: www-style@w3.org
- Message-ID: <20150323224017.GA1091@pescadero.dbaron.org>
I was trying to read selectors4 to determine whether a pseudo-element inside of :host-context() [1] made the selector invalid (or just never matched... I think). I reached http://dev.w3.org/csswg/selectors-4/#structure , and found that compound selectors do not include pseudo-elements, which I believe answers my question to my satisfaction (and matches Gecko's current implementation of :-moz-any()). However, I then noticed that nothing in that section mentions pseudo-elements at all, so it's not clear that my interpretation is correct. http://dev.w3.org/csswg/selectors-3/#selector-syntax , on the other hand, does say that pseudo-elements fit in at the "complex selector" level (level 3's "selector"), which makes it more clear that they're intentionally not included as part of a "compound selector". I think it would probably be good to have similar wording, and maybe even something clearer, in Level 4, so that it's clear that pseudo-elements are not part of a "compound selector" and thus their presence in a <compound-selector> [2] is a parse error. (Unless, of course, the opposite is intended, in which case that should be clear.) -David [1] http://dev.w3.org/csswg/css-scoping/#selectordef-host-context which links to [2] [2] http://dev.w3.org/csswg/selectors-4/#typedef-compound-selector -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla https://www.mozilla.org/ 𝄂 Before I built a wall I'd ask to know What I was walling in or walling out, And to whom I was like to give offense. - Robert Frost, Mending Wall (1914)
Received on Monday, 23 March 2015 22:40:41 UTC