W3C home > Mailing lists > Public > www-style@w3.org > March 2008

[css3-values] calc(), whitespace, and DIMENSION tokens

From: fantasai <fantasai.lists@inkedblade.net>
Date: Tue, 11 Mar 2008 15:42:23 -0700
Message-ID: <47D70ACF.3040007@inkedblade.net>
To: www-style@w3.org

The spec for calc() currently doesn't talk about whitespace at all. Perhaps
it's implied somewhere else, but I'm not familiar enough with the grammar to
know where.

I'll note that
will be parsed as a single DIMENSION token and
   3cm -2cm
will be parsed as two DIMENSION tokens. Is that what we want? Is whitespace
required around minus and plus signs to treat them like operators or is
tokenization different inside calc() like it is inside :nth-child()?

I think it's fine to require white space around plus and minus signs in
calc() expressions, since that helps emphasize that they're lower precedence
than * and /. However, if we're requiring white space around these operators
in calc(), then we should at least allow white space around them in :nth-child().


Received on Tuesday, 11 March 2008 22:41:49 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:34 UTC