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

Re: [css-variables] Remaining Issues

From: François REMY <francois.remy.dev@outlook.com>
Date: Wed, 12 Jun 2013 13:00:02 +0200
Message-ID: <DUB120-DS15FD9D8FB1D88B52254C2CA5860@phx.gbl>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "Sylvain Galineau" <galineau@adobe.com>, "www-style list" <www-style@w3.org>
> > Or, change the color of all the elements on the page using a reference 
> > color (for example, bouncing a few times between 'var-player1-color: 
> > green' and 'var-player1-color: red' when the player of a 
> > Age-of-Empires-like game change of status from alley to enemy and having 
> > all the units & buildings of that player switch to red for the parts of 
> > the SVG using the var-player1-color as background)).
> Heh, this shows off even more strongly why we *can't* do reasonable
> custom property animation until we have type annotations.  "Colors"
> can be represented as an ident token, a hash token, or a function.
> None of these can be interpolated in any reasonable way unless you
> already know for a fact that they should be interpreted as colors.
> ~TJ

Not exactly. In a browser that has animatable custom properties but where 
the properties do not transition, the behavior is pretty close to what I 
expect: the color is green, switch red, switch green, switch red.

In a browser that can understand how to transition (for example with a type 
annoation), this would do the same thing but in a continuous motion.
Received on Wednesday, 12 June 2013 11:00:30 UTC

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