W3C home > Mailing lists > Public > www-style@w3.org > January 2015

Re: [css-pseudo] element::selection and descendants

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 13 Jan 2015 13:10:57 -0800
Message-ID: <CAAWBYDA11TnE4f=bORzK+bWyxESU0OBupUUkQW9ac44-PXQ9Vw@mail.gmail.com>
To: Rune Lillesveen <rune@opera.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
On Tue, Jan 13, 2015 at 5:13 AM, Rune Lillesveen <rune@opera.com> wrote:
> On Mon, Jan 12, 2015 at 8:48 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> Ah, that's a fascinating way to handle it, and seems like it would be
>> pretty effective.  It cuts out a lot of the confusion about how things
>> inherit, I think.
>
> For reference (not as a proposal), there is a description of the
> Presto implementation in more detail in an earlier mail [1]. A lot of
> discussion about ::selection in the same thread. It describes some
> weird stuff about currentColor and inheritance which I don't remember
> why we had.
> [1] http://lists.w3.org/Archives/Public/www-style/2010May/0366.html

Cool.

>> It does involve some weirdness, like the fact that in the rule
>> "p::selection, div { background-color: pink; }", this sets the
>> 'background-color' for div, but the 'selection-background-color' for
>> p::selection.  But maybe that's not too horrible.
>
> Has it been discussed whether selection styling should be done through
> a pseudo element at all?

Well, we already have multiple browsers implementing a pseudo-element,
though in non-interoperable ways.

> Why couldn't it just be separate properties instead, also from the
> author's point of view?
>
> It's probably fine if you support color and background-color only, but
> you'd get a lot of duplication when more properties are supported, I
> guess.

Yeah.  Dunno if we plan to do anything past color/bg-color.

~TJ
Received on Tuesday, 13 January 2015 21:11:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:56 UTC