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

(12/05/01 1:23), Boris Zbarsky wrote:
> On 4/30/12 12:56 PM, Tab Atkins Jr. wrote:
>  t = nextToken();
>  if (t.isIdent() or t.isDimension()) {
>    if (t.ident starts with "n-") {
>      push '-' and everything after it back into the scanner
>      set t.ident to "n"
>    } else if (t.ident starts with "-n-") {
>      push second '-' and everything after it back into the scanner
>      set t.ident to "-n"
>    }
>  }

Auxiliary data here:

IE9, Opera12apha: "-/**/n" is valid
Chromium18, Firefox12: "-/**/n" is not valid and dropped

(tested with

  data:text/html,<style>body:nth-child(-/**/n+2) { background: green;
}</style>)

The latter group is also the group that doesn't support "+n".

(tested with

  data:text/html,<style>body:nth-child(+n) { background: green; }</style>)


This is maybe related to the sign in NUMBER issue[1] - note that both
Chromium18 and Firefox12 doesn't support neither "-/**/1n". (IE9
supports "+/**/2n" in :nth-child() but not "+/**/2em" in general, and
Chromium18 is the opposite. WTF!)

Chromium18 and Firefox12 doesn't support "+n" either.

(tested with

  data:text/html,<style>body:nth-child(+n+2) { background: green; }</style>)



[1] http://lists.w3.org/Archives/Public/www-style/2012Apr/0639


Cheers,
Kenny

Received on Monday, 30 April 2012 18:38:19 UTC