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

> 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