Re: [csswg-drafts] [css-pseudo-4] Ensuring selection foreground/background contrast (#6150)

The CSS Working Group just discussed `[css-pseudo-4] Ensuring selection foreground/background contrast`, and agreed to the following:

* `RESOLVED: Respect author colors in ::selection pseudo-elements, when given`

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> schenney: both blink and WebKit modify the selection color so if fully opaque<br>
&lt;emilio> ... my last comment in the issue summarizes things<br>
&lt;emilio> ... if we try to standardize modifications to the colors you run into all sorts of challenges<br>
&lt;emilio> q+<br>
&lt;emilio> ... turns out there's a WPT that relies on this behavior in Gecko<br>
&lt;emilio> ... there's also people complaining about getting the right selection color in Chromium<br>
&lt;emilio> ... authors can get around it by setting a semi-transparent color<br>
&lt;florian> q+<br>
&lt;emilio> ... so proposal is that if a color is specified in a selection pseudo authors should respect that color<br>
&lt;kbabbitt> +1 to UAs not modifying author specified colors<br>
&lt;astearns> ack emilio<br>
&lt;emilio> ... regardless of whether they're good or bad<br>
&lt;TabAtkins> emilio: to be clear, that's only if they actually specify the colors<br>
&lt;TabAtkins> emilio: so for default selection, the UA is still able to - if the color is blue and they're on blue background, the UA cna ivnert<br>
&lt;TabAtkins> schenney: yes<br>
&lt;TabAtkins> emilio: so that's gecko's behavior, right?<br>
&lt;TabAtkins> schenney: yes<br>
&lt;lea> q+<br>
&lt;astearns> ack florian<br>
&lt;TabAtkins> emilio: then yes  I agree, don't udnerstand why you'd mess with author colors<br>
&lt;emilio> florian: I completely agree, we're trying to put authors in charge of getting a good contrast and it should be predictable<br>
&lt;emilio> ... if everybody is trying to out-smart the authors in different ways then that's messy<br>
&lt;astearns> ack lea<br>
&lt;emilio> ... simplest way to match is just honor the author request<br>
&lt;emilio> lea: wanted to point out that (1) inverting color doesn't guarantee contrast<br>
&lt;emilio> ... specially as you get near grey<br>
&lt;emilio> ... contrast-color() seems a better approach<br>
&lt;emilio> fantasai: that's besides the point, the point is that if the author specifies the color, the UA should honor that<br>
&lt;emilio> ... they can do whatever they want in terms of the initial value<br>
&lt;emilio> schenney: I agree there's a need for contrast-color() would deal with that for authors<br>
&lt;emilio> astearns: seems like everyone agrees that UAs should respect colors in ::selection pseudos<br>
&lt;emilio> schenney: yeah you could say "when colors are given"<br>
&lt;emilio> RESOLVED: Respect author colors in ::selection pseudo-elements, when given<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6150#issuecomment-1944439234 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 14 February 2024 19:14:39 UTC