W3C home > Mailing lists > Public > www-style@w3.org > April 2014

Re: CSS variable syntax

From: Chris Eppstein <chris@eppsteins.net>
Date: Thu, 3 Apr 2014 09:42:02 -0700
Message-ID: <CANyEp6Vf4mufBmdFhF0Q6PK2-NEukjG5hhvHhxDNa3faNU5nXQ@mail.gmail.com>
To: Mark Volkmann <r.mark.volkmann@gmail.com>
Cc: Simon Sapin <simon.sapin@exyr.org>, "Jens O. Meiert" <jens@meiert.com>, W3C WWW Style <www-style@w3.org>
On Thu, Apr 3, 2014 at 9:11 AM, Mark Volkmann <r.mark.volkmann@gmail.com>wrote:

> I'm not familiar with what @ is being used for.

 At rules.  (@media, @supports, @charset)

Why couldn't variables start with @?

Because then they would look like at-rules.

> Why would it be difficult to implement this so that --foo in a property
> value means get the value of the foo property, making var(--foo)
> unnecessary?

As I understand it, it's very complicated to change the core grammar of
CSS. This syntax works within the existing grammar and so it is viewed more
favorably by implementors. Also, I think this syntax stands out as a
runtime resolved value instead of as a simple substitution done once.
Received on Thursday, 3 April 2014 16:42:29 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:39 UTC