[selectors-4][css-pseudo-4] meaning of ::search-text:current(…), :past, :future (original) (raw)
We resolved that ::search-text (#3812) should have a :current (#10212) state for the active search result, but :current also has a functional form, where :current(x, y)
matches any current element (or innermost ancestor) that also matches x, y
, as well as the related pseudo-classes :past and :future.
- Is the list of compound selectors in :current(…) a ? On the one hand, selector lists are normally invalid when they contain an invalid selector, but on the other hand, “like ‘:is()’” suggests it should be forgiving. If so, we should also update this note.
- What does
::search-text:current(x, y)
mean? Does it mean the innermostx
ory
that contains the active search result (which we probably want to forbid, since it would allow highlights to affect layout), or the ::search-text of that innermostx
ory
(which may have tricky :has()-like perf implications), or something else? We propose that::search-text:current(…)
be invalid, for now. - What do
::search-text:past
and::search-text:future
mean? We propose that these also be invalid, for now, since no known UA distinguishes between search results on either “side” of :current.