Skip to content

[css-pseudo-4] painting order of find-in-page highlights #10213

Closed
@delan

Description

@delan
  1. Where should they go in the highlight painting order? 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 [css-pseudo] priority of the native highlights #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; 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; cc @litherum, @smfr)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions