W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2019

Re: [csswg-drafts] Make it easier to express ranges for <An+B> selectors (#4140)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Thu, 17 Oct 2019 14:58:02 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-543215243-1571324281-sysbot+gh@w3.org>
@SebastianZ In your example table your proposal seems to fit much better to the description. But that's because all the cases are expressed in the same way, the one which works better with your proposal. But as @Crissov says the proposals represent different use cases, or maybe different ways of thinking.

Then `:nth-child(2n <= 8)` represents "Match every even element up to the eighth", but `:nth-child(2n, n <= 4)` means "Match the first 4 even elements".

@tabatkins "the fact that N goes over 0-Inf is already kinda confusing". Precisely, if we put a condition on `n`, authors can override this confusing behaviour with another one that makes more sense for them. Adding conditions on the result of `an+b` would presumably keep `n >= 0`, so it may become even more confusing.

On the other hand counting from the end seems interesting and I agree that it seems more suited for constraints on `an+b` than on `n`.

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4140#issuecomment-543215243 using your GitHub account
Received on Thursday, 17 October 2019 14:58:05 UTC

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