- From: Christian Roth <roth@visualclick.de>
- Date: Mon, 18 Oct 2004 17:09:11 +0200
- To: "www-style Mailing List" <www-style@w3.org>
CSS21 is about to allow identifiers to start with a dash (minus sign)
[1]. This has the funny consequence that ordinary (i.e., not vendor
specific) functions may not have a unary minus.
Example:
Assuming some CSS version will define the function sum( a , b ), then:
-sum( 2cm , 4cm )
will not be handled as the negative value of sum( 2cm, 4cm ), but as a
function call to a function named "-sum", as the leading dash is
attributed to the {ident} macro used to define the FUNCTION token.
The problem seems solvable by writing it as
- sum( 2cm , 4cm )
That, however, is not allowed according to the grammar [2, 'term'
production], which is normative.
It seems that allowing {ident} to start with a dash makes it impossible
to add a unary minus to non-vendor specific functions.
[1] <http://www.w3.org/TR/CSS21/syndata.html#tokenization>
[2] <http://www.w3.org/TR/CSS21/grammar.html#q1>
Regards, Christian.
Received on Monday, 18 October 2004 15:09:48 UTC