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

Good comment from @jfkthame on https://bugzilla.mozilla.org/show_bug.cgi?id=1589539#c20

> Tend to agree with Emilio, the first thing to do here (given that AFAIK we haven't been getting reports of this all over the place, it's this particular site that has CSS that just doesn't make sense unless they really WANTED the selection to be invisible) is to push for people to follow the spec. It's clear enough on this point, and it shouldn't be hard for authors to use it.
>
> Defining special behavior for fillColor == backgroundColor for text selection gets messy; what about if the colors aren't exactly equal but differ by so little that it's not visible to the eye? We'd probably want to do this in terms of computing the contrast between them, not simple equality, and enforcing a minimum level of contrast. But then we'll end up with some author complaining that a subtle effect they're trying to achieve is impossible because the browser refuses to apply their colors as specified.


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


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

Received on Monday, 29 March 2021 00:15:06 UTC