[csswg-drafts] Pseudo classes for the `interesttarget` API (#12154)

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

== Pseudo classes for the `interesttarget` API ==
The [explainer](https://open-ui.org/components/interest-invokers.explainer/) for `interesttarget` proposes four new pseudo classes:
- `:has-interest` - matches on the *invoker* when the user is currently showing interest in that invoker. 
- `:has-partial-interest` - matches on the *invoker* when the user is currently showing *partial* interest in that invoker. (They have merely focused the invoker, but haven't fully-activated it via the hot-key.)
- `:target-of-interest` - matches on the *target* of the invoker when the user is showing interest in the *invoker* for this target.
- `:target-of-partial-interest` - matches on the *target* of the invoker when the user is showing *partial* interest in the invoker for this target.

To hopefully help with the terminology:
```html
<button interesttarget=foo>The *invoker*</button>
<div popover id=foo>The *target* of the invoker</div>
```

A few notes:
- It felt slightly easier to understand if `:has-interest` means "has any kind of interest" (including partial), and `:has-partial-interest` means "specifically only has partial interest". But suggestions appreciated.
- @dbaron pointed out that these names are kind of ambiguous, and also that there is actually a third permutation (match on the invoker but describe the target) but I’m not sure there are use cases for that third set, so I'm not proposing it at this point.
- As always, the names need bikeshedding. E.g. `:has-interest` or just `:interest`? And `target-of-interest` is somewhat descriptive but still leaves something to be desired. Maybe it’s ok.

Thoughts?



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


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

Received on Friday, 2 May 2025 21:16:42 UTC