W3C home > Mailing lists > Public > www-style@w3.org > April 2012

[css3-animations] Change to currentColor means it's no longer animatable?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 30 Apr 2012 12:37:15 -0700
Message-ID: <CAAWBYDCzxxdRmxt9+g_MVU_Rc7axV7MUKfXHMR-JV03+nK7f_A@mail.gmail.com>
To: www-style list <www-style@w3.org>
[A w3c-style discussion accidentally turned technical. I'm moving it
to www-style.]

For a few reasons, we're changing the definition of currentColor to
resolve to a definite color at used-value time rather than
computed-value time.
<http://lists.w3.org/Archives/Public/www-style/2012Jan/0521.html>
<http://lists.w3.org/Archives/Public/www-style/2012Jan/0936.html>

This changes the behavior of currentColor and Transitions.
Previously, if you had a set up like:

p {
  color: red;
  border-color: currentColor;
  transition: 1s border-color;
}
p:hover {
  color: blue;
}

...you would transition the border-color when you hover the element,
since at computed-value time (the point that transitions look at) it
was "red" or "blue", not "currentColor".

With this change, though, this would no longer occur, since the
border-color's computed value would be "currentColor" regardless.

Is this acceptable?  Or should we make an exception for currentColor
and transition it?  Conceptually, currentColor is still a
computed-time value - it doesn't require any layout information to
figure out.  We're only moving it to used-time so that it has better
inheritance behavior in some situations.

~TJ
Received on Monday, 30 April 2012 19:38:04 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:52 GMT