W3C home > Mailing lists > Public > www-style@w3.org > June 2012

Re: [css3-selectors] Valid syntax that never represents an element

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 7 Jun 2012 10:40:02 -0700
Message-ID: <CAAWBYDC9tx_S-8aVX9J5v0zXpXwV0qfrvCJ4HQyD4DUEvMjOcw@mail.gmail.com>
To: Lea Verou <leaverou@gmail.com>
Cc: www-style list <www-style@w3.org>
On Thu, Jun 7, 2012 at 9:35 AM, Lea Verou <leaverou@gmail.com> wrote:
> I recently got into two separate unrelated discussions [1] [2] about whether
> the failing (in WebKit) :nth-*(-n-1) tests in css3test.com [3] should be
> removed, as these selectors would never match any element so it's supposedly
> OK if browsers consider it invalid syntax. Apparently the confusion arose
> from this excerpt from css3-selectors [4]: “ The value a can be negative,
> but only the positive values of an+b, for n≥0, may represent an element in
> the document tree.”. I think it’s quite obvious that throwing an error on
> such cases is non-conforming, since the syntax is perfectly valid according
> to the grammar, but thought I’d ask just in case I’m misunderstanding the
> spec in some way. If not, it might be a good idea to make it more clear in
> css4-selectors since, apparently, implementors are confused too.

Yup, Bjoern's right - considering ":nth-child(-n-1)" as an invalid
selector is definitely wrong, unless the spec actually says that's
invalid.

That said, it sounds like that sentence from the spec has an incorrect
use of MAY.

~TJ
Received on Thursday, 7 June 2012 17:48:10 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:55 GMT