Re: [csswg-drafts] [css-pseudo] highlight pseudos and non-applicable properties (#7591)

We would like to re-open this issue at the F2F as the chromium implementation has diverged and the result seems to give more intuitive results.

As currently implemented in chromium an element with any highlight pseudo, including ::selection, will use font dependent metrics from _the originating element_ when resolving lengths (such as 1em). As delan says, this aligns with the current spec for ‘forced-color-adjust’ and forced colors mode (see https://github.com/w3c/csswg-drafts/issues/7264).

The existing resolution talks about the root element, saying that font metrics should be taken from the element for highlight rendering, but does not say what would happen at other elements. The implementation in chromium expands the approach to every element in the tree. This avoids unexpected behavior when ::selection would pull metrics from the root while *::selection would pull from the initial value.



-- 
GitHub Notification of comment by schenney-chromium
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7591#issuecomment-1634689510 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 13 July 2023 18:15:15 UTC