W3C home > Mailing lists > Public > www-style@w3.org > June 2008

[CSS3-selectors] ::selection pseudo

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Fri, 27 Jun 2008 19:16:05 -0700
Message-ID: <48659EE5.5070703@terrainformatica.com>
To: www-style <www-style@w3.org>

About ::selection pseudo, in particular "Applies to the portion of a 
document that has been highlighted by the user." [1]

Is it selector that defines some global object or is it supposed to be 
applied to particular elements too?

If later then what are the cascading/inheritance rules?

Let's say we have some <richtext> or just <div contenteditbale> on the 
page.
Then what would mean the following?:

richtext::selection
{
  background-color: highlight;
  color: highlight-text;
}

And how it will interact with say:

richtext p::selection
{
  color: white;
}

?

Will p::selection pseudo-element inherit background-color: highlight;
value or not? It appears that ::selection elements shall establish their
own inheritance chain so p::selection pseudo will inherit *all* attributes
of any ::selection object defined upstream.

I think that styleable ::selection in principle is a good thing,
just want to clarify how it can be used/implemented.


[1] http://dev.w3.org/csswg/selectors3/#UIfragments

-- 
Andrew Fedoniouk.

http://terrainformatica.com
Received on Saturday, 28 June 2008 02:17:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:07 GMT