W3C home > Mailing lists > Public > www-style@w3.org > May 2010

Re: UA's implementation of ::selection

From: François REMY <fremycompany_pub@yahoo.fr>
Date: Sat, 15 May 2010 21:59:42 +0200
Message-ID: <BE2911E1C11341C882054D65FACC9EB8@FREMY2>
To: "Brad Kemper" <brad.kemper@gmail.com>
Cc: "David Hyatt" <hyatt@apple.com>, "Boris Zbarsky" <bzbarsky@MIT.EDU>, <www-style@w3.org>
From: "Brad Kemper" <brad.kemper@gmail.com>
>
> On May 15, 2010, at 12:41 PM, François REMY wrote:
>
>> Well, it's. When you specify a selection color,
>> you should not rely on the "default" selection
>> background-color.
>>
>> Imagine we're on an OS for which the default
>> selection highlight is white text on black bg.
>
> Somehow I doubt that such a retro, 2-bit UA is going to pay much attention 
> to my ::Selection rule anyway.
>
>> Your rule may end up by having no readable
>> text on the screen when the selection occur.
>>
>> By forcing the developer to specify a background
>> color, we avoid this problem (at least, we suppose
>> the author will use a readable bg/color combination).
>>
>> Please note it's the behavior of both IE and Opera.
>
> Well, that sucks. I should be able to change the foreground color without 
> changing the background color (of a pseudo-element's normal coloring). 
> That's why they are two properties, not one. Authors specify one without 
> the other all the time.

Not for a selection. And, BTW, we don't need to be so extreme.
On my old computer, the selection was white on a dark green
background. If I used a browser with your rule, I would have
had great difficulties to read any selected text because my
usual selection would require a light text and not a dark text. 
Received on Saturday, 15 May 2010 20:00:14 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:27 GMT