W3C home > Mailing lists > Public > www-style@w3.org > June 2013

Re: [css-variables] Remaining Issues

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 19 Jun 2013 10:07:01 -0700
Message-ID: <CAAWBYDAvFcE4RoorDmNvSUA5LeLLQaMNpTfT00mj8dOttrt4SA@mail.gmail.com>
To: Sebastian Zartner <sebastianzartner@gmail.com>
Cc: Lea Verou <lea@w3.org>, www-style list <www-style@w3.org>
On Wed, Jun 19, 2013 at 2:11 AM, Sebastian Zartner
<sebastianzartner@gmail.com> wrote:
> Just to be clear here: Properties using var() will still be animatable and
> the transition will be smooth (as far as I understand), so most use-cases
> will already be covered anyway.
> To stick with the example above: "color: var(foo);" will fade between red
> and blue.

Yes.  By the time animation happens (computed value time), the
variables have already been replaced away, so you can't tell the
properties used var() at all.

> The use-case for animating custom properties is to animate parts of normal
> properties like "transform: rotate(var(rotation)) skewX(var(skew));"
> individually.

Yes (though as I keep saying, you can't get what you actually want
until we can type-hint the custom properties).

> Little unrelated question:
> It seems the standard also allows to have functions as custom property
> values, e.g. "transform: var(transform-function1)
> var(transform-function2);"? Is that correct?

Yes, you can have *anything* in a custom property (except for the few
little bits of invalid tokens).

~TJ
Received on Wednesday, 19 June 2013 17:07:48 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:12 UTC