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

Re: Negative numbers in core grammar

From: Peter Moulder <peter.moulder@monash.edu>
Date: Sat, 01 Oct 2011 23:19:28 +1000
To: www-style@w3.org
Message-id: <20111001131928.GA30283@bowman.infotech.monash.edu.au>
On Sat, Oct 01, 2011 at 02:43:13PM +0200, Bjoern Hoehrmann wrote:
> * 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).

Konqueror & WebKit also treat them the same.

pjrm.


<!DOCTYPE html>
<html>
<head>
<title>Test of comments between sign and number</title>
</head>
<body>
<div style="font-size: +/**/100px">Test</div>
<div style="margin-top: -/**/100px">line2</div>
</body>
</html>
Received on Saturday, 1 October 2011 13:19:56 GMT

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