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

Re: UA's implementation of ::selection

From: David Hyatt <hyatt@apple.com>
Date: Sat, 15 May 2010 01:38:14 -0500
Cc: François REMY <fremycompany_pub@yahoo.fr>, www-style@w3.org
Message-id: <2D504368-70E5-4234-AAC2-BE05595156B7@apple.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
On May 14, 2010, at 11:10 PM, Boris Zbarsky wrote:

> On 5/15/10 12:04 AM, David Hyatt wrote:
>> The chosen colors for selection in the absence of any specified pseudo element come from the platform.  We have both active and inactive foreground and background colors (so 4 total possible different colors).  If the pseudo element specifies only a background color and not a foreground color, we'll use the platform foreground color (and vice versa).  Any specified selection colors in the pseudo element will be used in both the active and inactive states.
> That doesn't really explain the behavior I see with "background: none" vs "background: transparent"... (which should give equivalent specified values, note).

The way we handle shorthands is we reset the other values to "initial."  That amounts to being unset so we decide to use the platform selection background color for background-color: initial.  For case 10, the background color is explicitly set to transparent, so we respect it.

Arguably the correct behavior should be to always honor both background and foreground color from the pseudo element even when they are just set to initial values.

Received on Saturday, 15 May 2010 06:39:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:46 UTC