[csswg-drafts] [css-pseudo-4] painting order of find-in-page highlights (#10213)

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

== [css-pseudo-4] painting order of find-in-page highlights ==
> 2. **Where should they go in the highlight [painting order](https://drafts.csswg.org/css-pseudo/#highlight-painting)?** We propose that they paint over everything except maybe ::selection, because they reflect an explicit user intent to identify the search string, even more so than ::target-text (see also #4594).

#3812 suggests adding new highlight pseudos for find-in-page search results, but does not specify the painting order.

We propose that find-in-page highlights paint on top of all existing highlights, for three reasons:

- painting them over ::target-text reflects an explicit user intent to identify the search string that is stronger than ::target-text (for ::target-text, you only need to click on a link)
- painting them over ::selection improves compat with current Firefox behaviour of eagerly moving the selection with the active match (see [my comment in #3812](https://github.com/w3c/csswg-drafts/issues/3812#issuecomment-2047241516); cc @emilio)
- painting them over ::selection improves compat with current Safari behaviour of painting the active match in a special topmost overlay (see [my comment in #3812](https://github.com/w3c/csswg-drafts/issues/3812#issuecomment-2047241516); cc @litherum, @smfr)

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


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

Received on Tuesday, 16 April 2024 04:29:50 UTC