[css-pseudo] ::selection style propagation section doesn't reflect reality in any way. · Issue #2474 · w3c/csswg-drafts · GitHub
Skip to content

[css-pseudo] ::selection style propagation section doesn't reflect reality in any way. #2474

Closed
@emilio

Description

https://drafts.csswg.org/css-pseudo/#highlight-pseudos currently says in https://drafts.csswg.org/css-pseudo/#highlight-cascade:

Each element draws its own portion of the highlight overlay, which receives the styles specified by the highlight pseudo-element styles for which that element or one of its ancestors is the originating element. When multiple styles conflict, the winning style is the one belonging to the innermost element after cascading.

Note that even the spec example doesn't work as described on current browsers (the highlight background is definitely not green throughout).

What happens at least in WebKit, Blink and Gecko (haven't tested IE / Edge) is that the closest element ancestor's selection style is matched, inheriting from the ancestor style, and nothing else.

This is nice because what the spec specifies is kind of slow, and changing impls right now may be tedious and prone to compat bugs.

Can we update the spec to reflect reality please?

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions