A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/w3c/csswg-drafts/issues/6853 below:

[css-pseudo] Safari’s ::selection “wash” and UA tweaks to highlight colors · Issue #6853 · w3c/csswg-drafts · GitHub

Safari has a special approach to painting text ::selection, where it only paints a “wash” on top of the text being selected (see #6022 irc log, “blue wash”, “magic transluscent”). The way this is achieved is interesting: iff the author sets the ::selection background to a fully-opaque color, Safari overrides the alpha value to make the color translucent (demo).

But @fantasai says:

UA cannot do these weird things when the author has specified colors. They have to use the author-specified colors with no modification. But when using UA-chosen colors, they can choose anything.

I don’t think we can allow Safari to paint ::selection as a translucent “wash” and forbid Safari from making opaque ::selection backgrounds translucent, because any author unaware of Safari’s different approach might set the ::selection background to an opaque color (such as a named color or other color without alpha) while expecting the selected text to stay legible.

I want to agree with @fantasai here and forbid all UA tweaks to author highlight colors (see also #6150). But I think I’m biased here, because I also feel like we should forbid the “text wash”, because both of these would make it easier to specify and test highlight painting precisely.

(@smfr, @mrego)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3