W3C home > Mailing lists > Public > www-style@w3.org > December 2015

Re: [css-variables] Is making a property negative via `-var(--width)` valid syntax?

From: Chris Lilley <chris@w3.org>
Date: Fri, 18 Dec 2015 13:39:51 +0100
Message-ID: <217056874.20151218133951@w3.org>
To: "Simon Pieters" <simonp@opera.com>, "Philip Walton" <philip@philipwalton.com>, "Tab Atkins Jr." <jackalmage@gmail.com>
CC: "www-style list" <www-style@w3.org>
Hello Simon,

Friday, December 18, 2015, 12:05:53 PM, you wrote:

> But it seems to me you're only likely to want it for var(). Since this
> appears to be a pattern people use in the preprocessor world, should we
> just support it? It wouldn't be difficult to define a new -var(x) function
> as calc(-1 * var(x)), right? Too much of a hack? Slippery slope?

Doesn't -var() mean either:

a) the vendor-prefixed () for the var vendor, or
b) a parse error because the vendor prefix should end with a - as well

otherwise, defining it as syntactic sugar for calc seems okay. But
then authors will expect to negate other functions in a similar way,

Best regards,
 Chris  Lilley
 Technical Director, W3C Interaction Domain
Received on Friday, 18 December 2015 12:39:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:59 UTC