- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 15 Dec 2021 18:37:57 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `Compat risk for ::selection defaulting one color from originating element`. <details><summary>The full IRC log of that discussion</summary> <fantasai_> Topic: Compat risk for ::selection defaulting one color from originating element<br> <fantasai_> github: https://github.com/w3c/csswg-drafts/issues/6774<br> <delan> https://github.com/w3c/csswg-drafts/issues/2474<br> <fantasai_> delan: The highlight inheritance and cascade in the spec is a pretty big change compared to processing model in implementations right now<br> <fantasai_> delan: previously our position was that we consider the compat risk of this big change to be acceptable<br> <fantasai_> delan: because the old model that exists in old browsers is kindof useless and broken<br> <fantasai_> delan: the styles don't inherit so you have the set them everywhere, unless writing a really awkward selector<br> <fantasai_> delan: while implementing in Blink, we found a WPT that broke as a result of turning on highlight inheritance<br> <fantasai_> delan: unclear if aware of that breakage, are we still happy with the compat risk?<br> <delan> span { background-color: red; color: fuchsia; }<br> <fantasai_> delan: what the test did is essentially it has the originating element with colors of fuchsia on red<br> <delan> span::selection { background-color: green; }<br> <fantasai_> delan: there's a selection rule that just sets a gree background color<br> <fantasai_> delan: paired cascade from earlier means that because one of the two highlight properties<br> <fantasai_> delan: there is no UA default for 'color', so we use whatever color we get normally<br> <fantasai_> delan: existing model in browsers has ::selection inherit styles from originating element<br> <fantasai_> delan: so test expects color to be fuchsia<br> <fantasai_> delan: but now the test fails<br> <fantasai_> delan: because under new rules, we don't inherit color, it's black<br> <Rossen_> q?<br> <fantasai_> fantasai: I think the test is correct, actually, and paired cascading is also correct<br> <fantasai_> fantasai: inheriting all the way up, should get currentColor, not black<br> <fantasai_> fantasai: though I'm not sure the spec is clear about that<br> <fantasai_> emilio: Goes back to currentColor discussion<br> <fantasai_> emilio: all implementations resolve 'color: currentColor' to an actual color<br> <fantasai_> emilio: so I think we need to solve the problem of 'initial' and 'currentColor' being different<br> <fantasai_> emilio: and we need a resolved color<br> <fantasai_> emilio: I think the computed value is wrong, and it uses a computed color<br> <fantasai_> emilio: nobody implements that, it has terrible perf implications<br> <fantasai_> florian: Delan, can you point out to which bit of the spec made you think that you would go to black rather than originating element?<br> <fantasai_> florian: wondering if it's ambiguous or wrong<br> <fantasai_> delan: ... value found by inheritance ... do we say what happens when we get to the top?<br> <fantasai_> delan: I don't think it says what to do if you get all the way to the root<br> <fantasai_> delan: was it wrong to assume it would work the same way as in the the normal tree?<br> <fantasai_> emilio: I think the spec is right<br> <fantasai_> emilio: but if everything worked by spec, color is initial which is currentColor and it would work<br> <fantasai_> emilio: but that's not how it works right now<br> <fantasai_> delan: so we'd change spec so that for highlights, we get to root, and have a value we get essentially what currentColor does now<br> <fantasai_> emilio: per spec should get currentColor as computed value<br> <fantasai_> emilio: so I think the spec for the color property is wrong<br> <fantasai_> delan: if we did that for all properties ...<br> <fantasai_> emilio: I think the only issue is with the color property<br> <fantasai_> emilio: all current impls store as computed color<br> <fantasai_> emilio: otherwise need to go figure it out every time resolving a color for a given style<br> <fantasai_> emilio: I think the spec doesn't reflect that<br> <fantasai_> emilio: didn't make a difference until now, that we want currentColor to behave specially<br> <fantasai_> Rossen: so do we need to move this discussion back to GH?<br> <fantasai_> delan: I suppose these questions are useful and interesting, but I'm not sure they necessarily change the original question, which was do we still want to move to paired cascade<br> <fantasai_> s/paired cascade/new cascading and inheritance model/<br> <fantasai_> emilio: I think we want the testcase to continue to pass<br> <fantasai_> emilio: Depending on how we resolve the issue<br> <fantasai_> delan: so can take to GH<br> <fantasai_> emilio: this seems complex enough discussion<br> <fantasai_> emilio: per spec everything works magically and it's great<br> <fantasai_> emilio: but I don't think that's reasonable<br> <fantasai_> emilio: so we should figure out the solution that works as we want<br> <fantasai_> delan: ok sounds good<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6774#issuecomment-995065953 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 15 December 2021 18:37:59 UTC