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

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

From: Rune Lillesveen <rune@opera.com>
Date: Tue, 13 Jan 2015 14:13:51 +0100
Message-ID: <CANz6XvR0+qfB8MH9tgo8-Bg7WdywePWUBAnNC6kyn8a5pKu3iA@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
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.

> 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?

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

[1] http://lists.w3.org/Archives/Public/www-style/2010May/0366.html

Rune Lillesveen
Received on Tuesday, 13 January 2015 13:14:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:50 UTC