W3C home > Mailing lists > Public > www-style@w3.org > October 2011

Re: Negative numbers in core grammar

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 01 Oct 2011 14:43:13 +0200
To: "Anne van Kesteren" <annevk@opera.com>
Cc: "CSS WG" <www-style@w3.org>
Message-ID: <eh2e87tuge22godb12tqes8aunu1rg635h@hive.bjoern.hoehrmann.de>
* Anne van Kesteren wrote:
>I was asked the other day where the tokenization rules in  
>http://www.w3.org/TR/CSS2/syndata.html#tokenization handle negative  
>numbers. The production of num is [0-9]+|[0-9]*\.[0-9]+ which seems to  
>handle non-negative numbers only. (It does not seem to allow for a "-"  
>character, or for a "+" character for that matter.)

The unary operator is a token on its own, meaning

  <p style='font-size: +/**/100px'>Test</p>
  <p style='font-size:     +100px'>Test</p>

are the same (and they are in Internet Explorer and Opera; not in
Firefox though).
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Saturday, 1 October 2011 12:43:40 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:45 GMT