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

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