W3C home > Mailing lists > Public > public-css-archive@w3.org > April 2017

Re: [csswg-drafts] [selectors-4] :nth-child and friends are either underdefined or defined wrong

From: Simon Sapin via GitHub <sysbot+gh@w3.org>
Date: Wed, 26 Apr 2017 22:36:23 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-297561127-1493246182-sysbot+gh@w3.org>
Ah, I was misled by assuming that “CSS Syntax Module” only described the syntax of An+B. Either way, I think it wouldn’t hurt for Selectors 4 to repeat that.

> The edge cases like A=0 are described in the next (though non-normative) section 6.1.

I think the part you quoted is sufficient. With A=0, An+B simplifies to B regardless of n, and so at most one element (the Bth) is represented.

The A=0 case would only be problematic if division by A was involved in the definition (as it is in my implementation, which therefore requires a code path dedicated to A=0).

GitHub Notification of comment by SimonSapin
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1292#issuecomment-297561127 using your GitHub account
Received on Wednesday, 26 April 2017 22:36:30 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:11 UTC