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

We resolved that :current(…) will never match inside ::search-text, but there are still some unanswered questions:

0. **Outside of highlight pseudos, is the list of compound selectors in [:current(…)](https://drafts.csswg.org/selectors/#selectordef-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](https://drafts.csswg.org/selectors/#typedef-forgiving-selector-list).

1. **Is `::search-text:current(…)` also an [invalid selector](https://drafts.csswg.org/selectors/#invalid-selector), or just a selector that never matches?** In other words, does a rule like `a, ::search-text:current(b) {}` match `a`? Per [selectors #pseudo-element-states](https://drafts.csswg.org/selectors/#pseudo-element-states), pseudo combinations that are not explicitly allowed are [invalid selectors](https://drafts.csswg.org/selectors/#invalid-selector), so we propose that this be an invalid selector.

2. **What about :past and :future?** We propose that these be [invalid selectors](https://drafts.csswg.org/selectors/#invalid-selector) under ::search-text.

-- 
GitHub Notification of comment by delan
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10298#issuecomment-2244212138 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 23 July 2024 04:08:27 UTC