-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-ui-3] caret-color animations, 'auto' and 'currentColor' #781
Comments
Sorry but I was wrong, my initial implementation animates from Anyway I agree it'd be nice to be able to find a good solution for this. |
Sorry for coming back to this question, but would it be possible that the computed value of
That would probably simplify the implementations, just having to accept |
No. Computed value of As for I think, |
Making |
I also started on the assumption that it was not ideal but the best we can do. @mrego 's experience while implementing made me wonder if there was a way to do better. If there isn't, I think we can keep the spec as it is and close this issue. It'd be nice to get a couple more comments from other people, but I'm leaning towards closing as no-change. |
Mmm, so let me ask a few questions. In the browsers I've tested if you use Apart from that, reading your comment I understand that the following CSS won't be interpolable: .foo {
caret-color: auto;
transition: caret-color 1s;
}
.foo:hover {
caret-color: lime;
} But using .foo {
caret-color: currentcolor;
transition: caret-color 1s;
}
.foo:hover {
caret-color: lime;
} Is that the expected behavior for Thanks! |
This is a testcase for whether In this testcase,
|
Yes. |
Thanks for the detailed explanation!
So now thinking on |
It depends on what we would say in the CSSOM spec for resolved value of this property. If the resolved value of I don't have strong opinion here what the behavior should be, but I tend to think |
Some tests for caret-color will need updating if #566 is resolved the way you suggest and the resolved value of color properties including caret-color should be the used value, as they currently follow the current test of CSSOM (which doesn't have color properties in the list of properties for which the resolved value is the used value). Not objecting, just writing it down to remember: |
If we can make |
I guess the only difference between
|
Yes. My patch to implement |
Right, that's what it's for. It ought to be pretty cheap to implement if you don't want to do anything special, and it opens up the door for smarter behavior or aligning with whatever unusual thing an OS might have as a native behavior. It also enables some extra flexibility when/if we later add more properties that relate to the caret. For instance, level4 proposes Anyway, I don't think this is essential, but it seems nice to have a low cost. |
In Chromium we're not planning to implement anything special for If the CSS WG is fine with those changes I'll update the tests and the Blink implementation. Regarding the animations, considering that the suggested changes to make |
If we are keeping the independent |
@upsuper I agree with that. I am not an animation expert, but I believe the spec is correctly written if that's what we want. Do you agree, or are there any change / clarification that would be appropriate? |
I think the current text of this spec should be fine for this. Interpolating between |
Thank you very much for the detailed answers. I guess the only change we need on the tests and maybe on the specs is related to use the "used value" as "resolved value" for |
As discussed on issue w3c/csswg-drafts#781, I'm updating the tests so that caret-color behaves similar to the rest of color properties.
As discussed on issue w3c/csswg-drafts#781, I'm updating the tests so that caret-color behaves similar to the rest of color properties.
Added 2 new tests to check that "caret-color: auto" isn't interpolatible, but "caret-color: currentcolor" is. See w3c/csswg-drafts#781 for more information.
So the consensus on this thread is no change, and the people who raised the issue (me and @mrego) are OK with this. Given that the spec is in CR and for DoC purposes, we probably want a group decision anyway rather than a decision by the editor, but at the same time I am not sure this is worth teleconf time given the apparent agreement. What do we do? Can you do a Call for Consensus to www-style, or should I Agenda+ anyway, or is a decision by the Editor actually OK even though the spec is in CR? |
As discussed on issue w3c/csswg-drafts#781, I'm updating the tests so that caret-color behaves similar to the rest of color properties. Build from revision 5b3a864679e8b965513bd285487b7af640fb3f30
Added 2 new tests to check that "caret-color: auto" isn't interpolatible, but "caret-color: currentcolor" is. See w3c/csswg-drafts#781 for more information. Build from revision 7af5a49dc68b5efefa3dd93012a07a4fb9392968
As discussed on issue w3c/csswg-drafts#781, I'm updating the tests so that caret-color behaves similar to the rest of color properties. Build from revision 5b3a864679e8b965513bd285487b7af640fb3f30
As discussed on issue w3c/csswg-drafts#781, I'm updating the tests so that caret-color behaves similar to the rest of color properties. Build from revision 5b3a864679e8b965513bd285487b7af640fb3f30
The
auto
andcurrentColor
values of thecaret-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 between
auto
orcurrentColor
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:
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 andgetComputedStyle()
purposes,auto
andcurrentColor
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?
The text was updated successfully, but these errors were encountered: