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.

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.

Received on Monday, 30 April 2012 19:38:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:15 UTC