Re: UA's implementation of ::selection

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.

Received on Saturday, 15 May 2010 20:22:35 UTC