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

[csswg-drafts] Pull Request: Allow -n in an-b, allow comments within +n and -n

From: Manish Goregaokar via GitHub <sysbot+gh@w3.org>
Date: Sun, 04 Jun 2017 06:59:52 +0000
To: public-css-archive@w3.org
Message-ID: <pull_request.opened-123867675-1496559590-sysbot+gh@w3.org>
Manishearth has just submitted a new pull request for https://github.com/w3c/csswg-drafts:

== Allow -n in an-b, allow comments within +n and -n ==
Currently the grammar doesn't allow for `-n` within `:nth-child`, it only deals with `+n`. However, `-n` (and things like `-n+5`) are accepted by browsers.

This fixes the discrepancy.

Additionally, the parsing here is a bit tricky -- while the `+`/`-` and `n` are separate tokens, the spec does not allow for spaces between them. Chrome follows this, and as of  https://bugzilla.mozilla.org/show_bug.cgi?id=1364009, firefox does too. However, both allow comments. While this is probably implicit, I'm clarifying this within the spec.



See also: https://github.com/servo/rust-cssparser/issues/153,


r? @tabatkins @SimonSapin

See https://github.com/w3c/csswg-drafts/pull/1498
Received on Sunday, 4 June 2017 06:59:58 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:34 UTC