W3C home > Mailing lists > Public > www-style@w3.org > February 2014

Re: [selectors4][css-syntax] Pseudo-elements vs. combinators

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 6 Feb 2014 16:51:10 -0800
Message-ID: <CAAWBYDA8YxApn2iK_Zfp9+7uH+Xo1ep+qCsLEOzg-q+7ppNd9Q@mail.gmail.com>
To: Peter Moulder <pjrm@mail.internode.on.net>
Cc: www-style list <www-style@w3.org>
On Thu, Feb 6, 2014 at 1:29 PM, Peter Moulder
<pjrm@mail.internode.on.net> wrote:
> The CSS 2.1 parsing rules (section 4.1.7 paragraph 4 and following) say that if
> any comma-separated component of a ruleset's selectors is not valid CSS 2.1,
> then the whole ruleset must be dropped.  This seems to be true of css-syntax /
> css-selectors-4 too (except that the comma-separated components have slightly
> looser requirements than CSS 2.1, e.g. having some additional combinators).
> This suggests that the best choice of <combinator-prefix> is actually ‘:’.

You're misreading that.  It's stricter than you're implying - using an
unknown pseudo-class invokes the "doesn't match the grammar"

So using : is no safer than using anything else.  (And it's way more
confusing, given the double-duty it's already pulling as an indicator
of pseudo-classes and pseudo-elements.)

The actual restrictions we're working under are just that the new
syntax be compatible with CSS's general syntax, which pretty much only
disallows using {, or using ( without a ).  (We can't use [ in any
case, since it's already used for attr selectors, unless we do
something weird like [[shadow]].)

Received on Friday, 7 February 2014 00:52:00 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:18 UTC