Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[selectors-4][css-pseudo-4] meaning of ::search-text:current(…), :past, :future #10298

Open
delan opened this issue May 9, 2024 · 0 comments
Labels
Agenda+ css-pseudo-4 Current Work selectors-4 Current Work

Comments

@delan
Copy link
Contributor

delan commented May 9, 2024

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.

  1. Is the list of compound selectors in :current(…) a <forgiving-selector-list>? 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.

  2. What does ::search-text:current(x, y) mean? Does it mean the innermost x or y 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 innermost x or y (which may have tricky :has()-like perf implications), or something else? We propose that ::search-text:current(…) be invalid, for now.

  3. 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.

@delan delan added selectors-4 Current Work css-pseudo-4 Current Work Agenda+ labels May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agenda+ css-pseudo-4 Current Work selectors-4 Current Work
Projects
Status: Wednesday afternoon
Development

No branches or pull requests

1 participant