Skip to content

Pseudo classes for the interestfor API #12154

Open
@mfreed7

Description

@mfreed7

{edited to rename interesttarget --> interestfor}

The explainer for interestfor 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:

<button interestfor=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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions