Skip to content

[css-highlight-api] Priority by number or some other method #4591

@frivoal

Description

@frivoal

Since multiple highlights can exist, we need to know which is on top of which (and then https://drafts.csswg.org/css-pseudo-4/#highlight-painting tells us how painting works). The current spec proposes doing that by assigning a number (and when the number is the same, by comparing the time of insertion into CSS.highlights).

This is simple to understand and to specify, but it's not clear to me that this is actually great to use. Should we drop priority by numbers system, and replace it with some other ordering mechanism? Experience with BASIC line number or z-index does not give much confidence that ordering by number is a good idea.

Is placing in an ordered data-structure instead of a map better? Should authors be able to express a desired to be placed above/below other named highlights, and let the UA figure it out? Something else?

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