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

emilio has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-pseudo] ::selection style propagation section doesn't reflect reality in any way. ==
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?

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2474 using your GitHub account

Received on Sunday, 25 March 2018 15:27:39 UTC