-
Notifications
You must be signed in to change notification settings - Fork 747
Description
The auto
and currentColor
values of the caret-color
property compute to themselves as a keywords, rather than to an RGB(A) value, because otherwise that would mess with inheritance.
However, (unless I am misunderstanding how transitions and animations work) this also means that you cannot smoothly transition or animate betweenauto
or currentColor
and another color.
While it is not the end of the world, it seems a little unfortunate. Code like this for example, while probably not a major use case, doesn't look unreasonable, and it'd be nicer if the transition worked without discontinuity:
.foo {
color: initial; /* or whatever */
caret-color: auto;
transition: all 1s;
}
.foo:hover {
color: green;
caret-color: lime;
}
Preserving sanity of inheritance is much more important than that, but @mrego ’s first try and implementing caret-color
in Blink actually got both: for inheritance and getComputedStyle()
purposes, auto
and currentColor
compute to themselves as keywords, but at the same time, they still animate.
Is the ability to do that unique to Blink's internals, or can other browsers do it too? Do we have a concept in the spec that allows to express this? If yes to both, should we do it? Did I misunderstand something?