Re: UA's implementation of ::selection

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 UTC