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

RE: [css-variables] var() for non-custom properties

From: François REMY <francois.remy.dev@outlook.com>
Date: Sat, 23 May 2015 11:55:40 +0200
Message-ID: <DUB405-EAS7997DCF0F3F6DF51133717A5CF0@phx.gbl>
To: "'L. David Baron'" <dbaron@dbaron.org>, "'Bang Seongbeom'" <bangseongbeom@hotmail.com>
CC: <www-style@w3.org>
> De : L. David Baron [mailto:dbaron@dbaron.org]
> > Is there some reason that var() can not be used for non-custom
> properties?
> 
> Another reason (not already raised in this thread that I can see) is that var()
> depends on the textual representation of the property that is used as its
> argument being stored.  This would mean we would need to retain, cascade,
> and inherit the textual representations of
> *all* CSS properties in case they might be used inside a var().

We could specify that, in the case of non-custom properties, the serialization of the parsed tokens is returned instead, to alleviate this issue. You may not even retain this information, though, in which case this doesn't work (or, at least, it works after reserializing your internal data structure back to a list of tokens).
Received on Saturday, 23 May 2015 09:56:09 UTC

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