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

On Friday 2015-05-22 00:05 +0900, Bang Seongbeom wrote:
> 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 probably defer the cascading and inheritance, at the cost
of making our variables implementation more complicated, but there
would still be increased memory usage for all CSS properties in
order to allow this.

Given that only a small percentage of the values are likely to be
used inside variables, I don't think that's worth it.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Saturday, 23 May 2015 03:31:26 UTC