- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Mon, 30 Apr 2012 09:49:17 -0700
- To: "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
- Cc: WWW Style <www-style@w3.org>
On Mon, Apr 30, 2012 at 9:06 AM, Kang-Hao (Kenny) Lu
<kennyluck@csail.mit.edu> wrote:
> 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?
It's a browser bug. To restrict it in the Grammar, we'd have to have
context-sensitive placement of comments. I'd have to preserve comment
tokens in my parser. ^_^
~TJ
Received on Monday, 30 April 2012 16:50:08 UTC