[csswg-drafts] [css-highlight-api] Priority by number or some other method (#4591)

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

== [css-highlight-api] Priority by number or some other method ==
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?

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

Received on Friday, 13 December 2019 06:22:36 UTC