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

> I assume the second suggestion was :interest-invoker-partial ?

No, it was a functional pseudoclass that took a few keywords letting you indicate *exactly* what variety of interest you wanted to match on (while the non-functional one defaulted to some form of interest that we think is likely the most useful). So `:interest-invoker(partial)`.

> So it might be confusing to have :interest-target match not on the element with interesttarget, but instead on the target of that element.

I think that's fine - the `interesttarget` attribute indicates which element is the interest target. It doesn't indicate that the element with the attribute *is* the interest target.

> Hmm. I think that can be handled with [interesttarget]:not(:interest-invoker), no? Perhaps you just mean it might be convenient to have a shorthand for that?

I wasn't sure there was a way to express that; not all negative selectors actually can be written explicitly in a simple manner. I think a shorthand is convenient, yes, since you're likely writing your actual-interest selectors as just `:interest-invoker`, and having to add the `[interesttarget]` (to avoid `:not(:interest-invoker)` over-matching on the rest of the page) isn't super obvious.

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


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

Received on Sunday, 4 May 2025 19:51:41 UTC