- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 12 Jun 2024 09:03:47 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-properties-and-values-api] Resolved value of registered <color> custom properties.`, and agreed to the following: * `RESOLVED: <color> values returned by getComputedStyle() on standard CSS properties or registered custom properties is the used value` * `RESOLVED: computed <color> values returned by TypedOM are the actual computed value` <details><summary>The full IRC log of that discussion</summary> <jarhar> emilio: i recently noticed that what computed style returns for some properties is inconsistent. for most places it seems like tests expected the computed and not resolved color as any other color would.<br> <dbaron> ScribeNick: jarhar<br> <ChrisL> q+<br> <futhark> q+<br> <jarhar> emilio: but then ? expects some legacy rgb color result. i think we should decide on one. all engiens are exposing the computed and not resolve dcolor so if they did currentcolor and so on i think its fine to be doing that but i think it would be good to clarify that<br> <TabAtkins> +1 from me<br> <jarhar> ChrisL: i agree that they should do that. i see that mozilla made changes to wpt so that either is accepted as a pass. this is not a good situation. i think we should have a form that presserves currentcolor it means you get the right color instead of hard coding the color. i dont see why legacy rgb was accepted and why currentcolor should be<br> <jarhar> resolved so eagerly<br> <lea> +q<br> <lea> q+<br> <jarhar> emilio: this coudl be due to some animation implementation in webkit or blink but im not sure if blink and webkit actually interpolate including currentcolor like firefox does. if you interpolate curretncolora s asomething else then firefox will get the right behavior and im not sure if the others can do that but i think thats a bug in webkit<br> <jarhar> ChrisL: it would be good to ? from those implementors, firefox has donet he right thing while theres a spec ambiguity but id liek to hear if theres an objection to making the value be the one that includes currentcolor with color mix. i think thats the best one currently<br> <ChrisL> So color-mix(in srgb, currentcolor, rgb(200, 200, 200)) for example<br> <ChrisL> s/?/get feedback/<br> <jarhar> futhark: i can speak for blink. internally we should be using currentcolor inherit currentcolor. any other - if there are behaviors that are differnet that can be considered bugs. in computedstyle we always return the result color which is the used color that does not include currentcolor. our goal is to return currentcolor in the ?om api but we<br> <jarhar> currently dont do that but thats something we want to change<br> <emilio> q+<br> <jarhar> lea: chris you mnetnioedn that if we dont resolve currentcolor then that can be inerhited. is that the intent? i have come across cases where authors are registering custom properties as colors and then expecting it to resolve and inherit the textcolor of that element down to descendant rather than resolinv currentcolor the same was as you can<br> <jarhar> register a length asnd then set 1em as that and ?? expect it to resolve as colors<br> <jarhar> emilio: and that works the same anywhere<br> <jarhar> lea: there shouldnt be any special behavior for color mix ai agree<br> <futhark> q+<br> <jarhar> emilio: my understanding is that lbink actualy does return correct color from getcomputedstyle for these properties already. its just with animations where you dont<br> <jarhar> emilio: so if you look at the first link in the issue, the test does pass in blink and yeah it expects the getcomputedstyle value to not resolve, which is inconsistent with other color properties<br> <jarhar> futhark: i dont think thats intentional, or maybe it is when you do the interpolation im not sure if thats intentiona.,<br> <jarhar> emilio: i agree its weird which is why we should - im fine saying that we should always resolve them. i think we resolve them mostly for compat<br> <jarhar> futhark: i was looking at the spec and the cssom spec limits using the resolved value for certain colors but ? currentcolor not listed in the cssom spec. it would make sense for all colros to resolve for getcomputedstyle api and also be consistent with custom properties to do the same thing. that sounds like a consistent way for me. and then the<br> <jarhar> typedom return the current color version<br> <emilio> sgtm<br> <jarhar> fantasai: i believe we have a proposed resolution which is that getcomputedstyle returns a resolved color including custom registered properties<br> <jarhar> futhark: yes<br> <jarhar> ChrisL: but then its different in typedom? lets capture that<br> <emilio> q+<br> <jarhar> florian: so its not the used value and its not the computed value?<br> <jarhar> futhark: the cssom spec says that its the used value i think<br> <jarhar> florian: i think resolved is defined to be either the comptued or used depending onwhat it is<br> <jarhar> florian: the current proposed resolution is circular<br> <jarhar> fantasai: please type in a proposed resolution<br> <kbabbitt> q+ to rephrase the resolution<br> <jarhar> kbabbitt: im going to take a swing at rephrasing to say that the resolve dvalue fo ra registered custom proeprty of type color is the used value to be consistent with the used value of typed color on a non custom proeprty<br> <jarhar> fantasai: go further and include non standard properties<br> <jarhar> kbabbitt: that makes sense. and then in typedom we return the current value<br> <Zakim> kbabbitt, you wanted to rephrase the resolution<br> <fantasai> RESOLVED: <color> values returned by getComputedStyle() on standard CSS properties or registered custom properties is the used value<br> <jarhar> ChrisL: values in list of properties needs to be removed or ? or whatever. was it just removing that list?<br> <fantasai> RESOLVED: computed <color> values returned by TypedOM are the actual computed value<br> <jarhar> emilio: my other question is how would this animated value serialize. should it serialize with legacy rgb or the color function, but i guess this is somewhat - we could move this to a separate issue maybe<br> <ChrisL> It is related to https://github.com/w3c/csswg-drafts/issues/10087<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10371#issuecomment-2162491973 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 12 June 2024 09:03:48 UTC