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

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