W3C home > Mailing lists > Public > www-style@w3.org > November 2007

Re: [css3-selectors] ::selection

From: Daniel Glazman <daniel.glazman@disruptive-innovations.com>
Date: Mon, 26 Nov 2007 21:08:57 +0100
Message-ID: <474B27D9.1020407@disruptive-innovations.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: "www-style@w3.org" <www-style@w3.org>

Anne van Kesteren wrote:
> The Selectors Level 3 specification should probably go into more detail 
> on how boxes for ::selection are to be generated so that it's clear how 
> it interacts with other styles, etc. That would also help if someone 
> decides to support background-image for ::selection.
> WebKit and Gecko support it in such a way that it doesn't affect the 
> selection color of child elements. So if you have:
>   p::selection { background:lime }
>   <p>FOO<span>BAR</span>BAZ</p>
> and someone selects "FOOBARBAZ" "BAR" will have the default selection 
> color. I don't really care about how this is going to be done, but I'd 
> like it to be defined.

Right, and that behaviours is intentional. If you want better,
just write

   p::selection, p *::selection { background: lime };

Received on Monday, 26 November 2007 20:09:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:31 UTC