Re: [selectors4] Proposal for extending Selectors Level 4 with possibility to select attributes

Le 05/11/2013 18:34, Tab Atkins Jr. a écrit :
> On Tue, Nov 5, 2013 at 10:05 AM, Simon Sapin <simon.sapin@exyr.org> wrote:
>> Le 05/11/2013 17:48, Tab Atkins Jr. a écrit :
>>> Yeah, the spec hasn't been updated yet, but we agreed that
>>> pseudo-elements *can* be followed by arbitrary other selectors.  This
>>> is only relevant for pseudo-elements that can contain content, like
>>> ::region or ::content (from Shadow DOM).
>>
>> That’s case-by-case for pseudo-element where it’s relevant, right?
>> `div::after p` will still be invalid?
>
> Depends on what you mean by "invalid".  We could either drop it, based
> on grammar mismatch, or just have it be allowed, but guaranteed to
> match nothing.  The only observable difference is that the rules will
> be preserved in the CSSOM in the latter case but not the former.

Invalid means the former: http://dev.w3.org/csswg/selectors4/#invalid

It affects CSSOM, and other selectors in the same selector list. It will 
affect @supports when we add testing for Selector support.

We shouldn’t gratuitously change some combinations of existing 
pseudo-element and other selector between invalid and not matching.

-- 
Simon Sapin

Received on Tuesday, 5 November 2013 18:52:36 UTC