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

Re: UA's implementation of ::selection

From: Alan Gresley <alan@css-class.com>
Date: Sun, 16 May 2010 18:12:46 +1000
Message-ID: <4BEFA8FE.4020907@css-class.com>
To: François REMY <fremycompany_pub@yahoo.fr>
CC: David Hyatt <hyatt@apple.com>, "L. David Baron" <dbaron@dbaron.org>, Boris Zbarsky <bzbarsky@MIT.EDU>, www-style@w3.org
François REMY wrote:
> Why do you want to create a pseudo element for each
> element of the DOM? It would be sufficient to use a
> ::selection object for the root element. Or at least only
> one for each element of the DOM needing a special
> styling. It's not needed to create a new instance of
> the selection styling object for each element of the
> DOM. They can share the same.
> Or is that impossible ?

I am amazed to see 'selection' classed as a 'pseudo element' at all.

For me it behaves much like a 'dynamic pseudo class' or 'UI element 
states pseudo-class'. Both types for which there is a user action.

When I highlight text nodes, I see a different background-color (not 
the default selection color) when I use this.

*::selection {background:red;}

But since this happen by user action, I as a author would expect to be 
using something like this.

*:selection {background:red;}

Alan http://css-class.com/

Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
Received on Sunday, 16 May 2010 09:13:25 UTC

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