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

[selectors4][css3-syntax] an+b corner case

From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
Date: Tue, 01 May 2012 00:06:59 +0800
Message-ID: <4F9EB8A3.5030300@csail.mit.edu>
To: WWW Style <www-style@w3.org>
The prose for this part, used for :nth-child, etc., is

  # The argument to :nth-child() must match the grammar below, where
  # INTEGER matches the token [0-9]+ and the rest of the tokenization
  # is given by the Lexical scanner in section 10.2:
  #
  # nth
  #    : S* [ ['-'|'+']? INTEGER? {N} [ S* ['-'|'+'] S* INTEGER ]? |
  #           ['-'|'+']? INTEGER | {O}{D}{D} | {E}{V}{E}{N} ] S*
  #    ;

. This couldn't quite explain why ":nth-child(1/**/n)" is ignored in all
the browsers I tested (IE9, Firefox 12, Chromium 18, Opera12alpha) with
a case like

  data:text/html,<style>body:nth-child(1/**/n) { color: red; }</style>Test

. Should we consider this browser bugs or should the spec match browsers
here?



Cheers,
Kenny
Received on Monday, 30 April 2012 16:07:32 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:14 UTC