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

The CSS Working Group just discussed ``Pseudo classes for the `interestfor` API``.

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> masonf: we talked a bit about this API in the past for `interest-{show,hide}-delay`<br>
&lt;emilio> ... fyi the attribute is probably going to get renamed to `interestfor`<br>
&lt;emilio> ... so these are things that match while the user shows interest (e.g. hover or keyboard focus)<br>
&lt;emilio> ... there are two pseudo-classes in the last comment, the `invoker` and the `target`<br>
&lt;emilio> ... then there are two levels<br>
&lt;emilio> ... partial (with keyboard focus) and full interest<br>
&lt;emilio> ... also another proposal to suggest possible interest<br>
&lt;astearns> q+<br>
&lt;astearns> ack fantasai<br>
&lt;emilio> ... so current proposal is two functional pseudo-classes `:interest-{target,invoker}()`<br>
&lt;lea> partial interest seems like a confusing concept. Reading the explainer, perhaps something around "delayed" or "future" interest? Is there partial interest that is not around that?<br>
&lt;emilio> ... with values of `possible`, `partial`, and `total`<br>
&lt;emilio> ... you can use them without the parens<br>
&lt;emilio> ... which means `(total)`<br>
&lt;emilio> ... qs are general shape<br>
&lt;emilio> ... questions about the "possible"<br>
&lt;emilio> q+<br>
&lt;emilio> ... e.g. should the target exist and be valid<br>
&lt;emilio> ... also whether the target should support possible<br>
&lt;emilio> ... that'd require to know whether something points to it<br>
&lt;astearns> ack astearns<br>
&lt;emilio> astearns: so possible should be only for valid interestfor values...?<br>
&lt;bkardell> q+<br>
&lt;emilio> ... anything less than that is not a possible match<br>
&lt;astearns> ack emilio<br>
&lt;emilio> masonf: I think that makes sense<br>
&lt;masonf> q+<br>
&lt;bkardell> q-<br>
&lt;bkardell> q+<br>
&lt;emilio> emilio: I think we shouldn't do possible<br>
&lt;emilio> ... since it seems it'd require / want to check whether something is focusable / hoverable as well, and that's trivially cyclic?<br>
&lt;emilio> ... unless there's a very strong use case for it I'd at the very least defer it<br>
&lt;emilio> masonf: The cyclic part is a great observation I hadn't noticed<br>
&lt;emilio> ... the possible value was discussed in the middle of the issue<br>
&lt;emilio> ... was brought up as sugar for `[interestfor]`<br>
&lt;astearns> q+<br>
&lt;astearns> ack masonf<br>
&lt;emilio> ... it was not brought up whether it actually needs to be focusable or so<br>
&lt;emilio> ... I'm agnostic to the possible value so if it causes issues I'm ok dropping it<br>
&lt;astearns> ack bkardell<br>
&lt;emilio> bkardell: the possible thing does seem a little dizzy to me too<br>
&lt;emilio> ... we don't have a hoverable / focusable pseudo-class<br>
&lt;emilio> ... I kinda wish we did?<br>
&lt;astearns> s/dizzy/dicey<br>
&lt;emilio> ... but I'd rather have those than this<br>
&lt;masonf> :-)<br>
&lt;lea> +1 to bkardell, a :focusable class is sorely needed, and very hard to emulate<br>
&lt;emilio> astearns: Is `partial` actually needed?<br>
&lt;astearns> ack astearns<br>
&lt;emilio> ... could we start with the non-functional versions, then decide partial / etc?<br>
&lt;emilio> masonf: that one was the genesis of the pseudo-class<br>
&lt;lea> q?<br>
&lt;bkardell> lea: it would need more than that I guess, since you can have things that have nuance too - what does it mean to be focusable isn't necessarily just binary<br>
&lt;emilio> ... in the partial interest state the popover wants to have a hint text<br>
&lt;bkardell> q+<br>
&lt;emilio> ... so we wanted to provide that hint in the UA stylesheet<br>
&lt;emilio> ... and we'd rather not do magic<br>
&lt;emilio> astearns: haven't thought about it too deeply, but that interest-partial thing is the interesttarget, then there's the second level of "i've done a thing to show something else"<br>
&lt;emilio> masonf: if the popover contains a button the user would have to do something else to get to the button<br>
&lt;astearns> ack bkardell<br>
&lt;emilio> bkardell: not sure if we're talking about this but there's some disagreement over whether this is currently possible, because FF and apple don't support this if we can't find a way to actually do it on mobile<br>
&lt;emilio> ... there was a thing added the other day to add a pseudo-element<br>
&lt;emilio> ... does this relate to that?<br>
&lt;emilio> q+<br>
&lt;emilio> bkardell: if we have that pseudo-element, does the pseudo-classes apply?<br>
&lt;emilio> masonf: there are issues for this, those are rather unrelated<br>
&lt;emilio> ... all of these pseudo-classes apply in the same way<br>
&lt;bkardell> but wouldn't the pseudo be the thing that got interest?<br>
&lt;lea> q+<br>
&lt;lea> qq+<br>
&lt;astearns> ack fantasai<br>
&lt;emilio> ... whether the pseudo exists<br>
&lt;bkardell> the apple webkit team at least :)<br>
&lt;emilio> fantasai: we want to echo the concerns about making this work on mobile on the feature over-all, on the naming question I think interest-target is a bit ambiguous, because the target of your interest is the invoker<br>
&lt;emilio> masonf: the attribute is not interesttarget anymore, it's interestfor<br>
&lt;emilio> fantasai: you're proposing `:interest-target`<br>
&lt;lea> +1 fantasai<br>
&lt;bkardell> woof<br>
&lt;emilio> ... which represent that things that triggered the interest which is the invoker<br>
&lt;astearns> ack lea<br>
&lt;Zakim> lea, you wanted to react to bkardell<br>
&lt;astearns> ack lea<br>
&lt;fantasai> maybe :interest-details?<br>
&lt;emilio> lea: wanted to ask about the pseudo-element<br>
&lt;emilio> ... IIUC that'd be a pseudo-element that would go from the target to the popover<br>
&lt;emilio> ... that'd be a pseudo-element on the invoker<br>
&lt;emilio> ... to provide a button on the side for touch-screen users<br>
&lt;bkardell> it is like a (?) button<br>
&lt;emilio> masonf: it'd be a button that shows e.g. the context menu<br>
&lt;emilio> lea: Oh I thought that it went from the invoker to the popup<br>
&lt;emilio> ... which would be a combinator<br>
&lt;emilio> ... which would also be useful<br>
&lt;fantasai> s/which represent that things that triggered the interest which is the invoker/but the target of your interest is :interest-invoker, and not :interest-target; so that's confusing/<br>
&lt;emilio> masonf: had not heard that suggestion, can open one<br>
&lt;bkardell> there is a long /for/ thing going back like 100 years<br>
&lt;fantasai> scribe+ fantasai<br>
&lt;bkardell> I don't see why this would be diff<br>
&lt;astearns> ack emilio<br>
&lt;fantasai> emilio: trying to keep about pseudo-classes in particular. Are there other use cases for this other than telling the user how to fully activate the popover?<br>
&lt;fantasai> emilio: if not, I'm doubtful of the pseudo-element approach in the style sheet<br>
&lt;fantasai> emilio: if we use an existing pseudo-element, authors may want to use fo rother thing<br>
&lt;fantasai> emilio: Also don't want to show it all the time, once the user has opened doesn't need instructions anymore<br>
&lt;lea> q?<br>
&lt;fantasai> emilio: Just doesn't seem useful to have the partial option<br>
&lt;fantasai> masonf: primary use case is that<br>
&lt;fantasai> masonf: 2 things: instructions for the user -- which could be handled by UA -- but the problem with that is that the site might know whether it's needed or covered elsewhere or already known by user etc.<br>
&lt;fantasai> masonf: also styleability, e.g. fading in/out<br>
&lt;fantasai> emilio: Should the unparenthesized pseudo-class match both partial and total. Is there a reason for the default to be full interest?<br>
&lt;fantasai> masonf: Subtle question of whether full interest includes partial.<br>
&lt;fantasai> masonf: prototype is that full is a superset of partial<br>
&lt;fantasai> masonf: reason for that is it feels more useful<br>
&lt;fantasai> masonf: partial interest is a corner case<br>
&lt;bkardell> it does seem like pseudo classes generally are more like the way Emilio mentions<br>
&lt;fantasai> masonf: does this thing have interest at all or not<br>
&lt;fantasai> masonf: so I thought shorthand should be total<br>
&lt;fantasai> emilio: That's not how I would have expected total to work?<br>
&lt;fantasai> &lt;fantasai> +1<br>
&lt;fantasai> emilio: I would expect total to only match when not partial<br>
&lt;fantasai> emilio: I would expect partial and total to be exclusive<br>
&lt;fantasai> emilio: and unparenthesized one to match both<br>
&lt;fantasai> &lt;fantasai> +1<br>
&lt;fantasai> masonf: Third state, empty args with parens<br>
&lt;astearns> zakim, close queue<br>
&lt;Zakim> ok, astearns, the speaker queue is closed<br>
&lt;fantasai> masonf: main usage will be unparenthesized, and that should match either partial or full<br>
&lt;fantasai> masonf: I think as long as way to do this, it's ok<br>
&lt;astearns> ack fantasai<br>
&lt;fantasai> masonf: Does what emilio suggested make sense?<br>
&lt;fantasai> astearns: It does constrain us if we want to add other parameters<br>
&lt;fantasai> astearns: would need to also match with no-parens to be consistent<br>
&lt;bkardell> Maybe that would/should be a separate issue<br>
&lt;emilio> masonf: I don't think that'd be very useful if we add partial<br>
&lt;bkardell> just like I said with focusable and hoverable<br>
&lt;fantasai> astearns: Go back to issue, and consider additional parameters<br>
&lt;emilio> astearns: let's take it back to the issue and move partial to a separate one<br>
</details>


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


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

Received on Wednesday, 2 July 2025 16:28:39 UTC