NEW 73422
System colors for text and background on ::selection doesn't apply when only text-shadow is specified
https://bugs.webkit.org/show_bug.cgi?id=73422
Summary System colors for text and background on ::selection doesn't apply when only ...
Lev Solntsev
Reported 2011-11-30 03:23:19 PST
It seems that ::seletion doesn't apply any system color if at least one property is specified. In my case (see the attached testcase) I'm using ‘:selection { text-shadow:none }’ to remove ugly white text-shadow on selection which have white text color by default. In Safari 5.1 and Chrome there is no visible selection except removing test-shadow. I strongly believe it's a bug and this behavior isn't intended by any author.
Attachments
::selection and text-shadow test (483 bytes, text/html)
2011-11-30 03:24 PST, Lev Solntsev
no flags
Lev Solntsev
Comment 1 2011-11-30 03:24:01 PST
Created attachment 117163 [details] ::selection and text-shadow test
Ahmad Saleem
Comment 2 2023-12-15 18:17:13 PST
It might be platform specific since on macOS 14.2 with Safari 17.2, the selection is similar to Chrome Canary 122 and Firefox Nightly 122. CCing - @Fuji to check, if it might be 'Windows' specific since it was filed for PC and Windows 7.
Lev Solntsev
Comment 3 2023-12-16 01:57:49 PST
I don't know about platform specific, but yes it reproduces in Firefox 120 and Chrome 120, both on Windows 10 as well as in Mac OS, including Safari 17.1. Probably any selection declaration shouldn't overwrite colors if they weren't specified. Couldn't find any mentions in the spec.
Note You need to log in before you can comment on or make changes to this bug.