- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 12 Jun 2013 12:32:21 +0200
- To: François REMY <francois.remy.dev@outlook.com>
- Cc: Sylvain Galineau <galineau@adobe.com>, www-style list <www-style@w3.org>
On Tue, Jun 11, 2013 at 11:56 AM, François REMY <francois.remy.dev@outlook.com> wrote: >> Describing the kind of >> use-cases that would be 'completely broken' adds much more value. > > I just had another idea, which is more related to the traditional role of [css-variables] aka replacing constant-like color constants. > > I can clearly see how someone would love to animate the 'var-shadow-angle' property of a webpage showing a few objects and shadows generated for them based on a calculation depending on the sun position on the page. > > 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
Received on Wednesday, 12 June 2013 10:33:08 UTC