- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Sat, 28 Sep 2024 00:23:44 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-pseudo-4] ::self-link pseudo, for self-linking`. <details><summary>The full IRC log of that discussion</summary> <emilio> flackr: as TabAtkins wrote, it's a very common pattern (bikeshed etc mentioned)<br> <emilio> ... this adds a link to the heading that you can link to<br> <emilio> ... developers write tools to add these<br> <emilio> ... the proposal is to add a pseudo to generate this before the element<br> <emilio> ... long list of proposed behavior<br> <emilio> ... main one is it requires the content is linkable which means it has to have an ID attr<br> <Rossen9> ack fantasai<br> <emilio> fantasai: main issue, sometimes they want it at the start or at the end<br> <emilio> ... the other is sometimes you want a link to the container, not the heading itself<br> <emilio> ... e.g. <section id=foo><h1>...<br> <emilio> ... you could add the id to both but the desired thing is to target the section<br> <emilio> ... so I like the idea<br> <emilio> ... I don't think it's a problem to do it with CSS<br> <emilio> ... but needs a way of solving these two<br> <emilio> flackr: the second seems more tractable<br> <emilio> ... we could allow it to refer to the nearest ancestor with id<br> <emilio> fantasai: that won't get you reasonable behavior for the fifth heading in the section or something<br> <emilio> ... you'd be jumping too high<br> <emilio> ... maybe fine<br> <emilio> ... but if you have somewhat unpredictable markup...<br> <emilio> ... [missed]<br> <emilio> ... it's a bit tricky<br> <emilio> flackr: not sure I understand the use case<br> <emilio> ... isn't the <section> what you link the one you want?<br> <emilio> fantasai: the nearest element with an id might be <main> or what not<br> <emilio> flackr: ah because they forgot or something<br> <emilio> 1+<br> <emilio> q+<br> <emilio> flackr: I supposed if there was a functional pseudo you could use `attr(id)` to refer to yourself or something<br> <emilio> fantasai: that might be more practical<br> <Rossen9> ack emilio<br> <emilio> ... I think those are my two concerns<br> <fantasai> scribe+<br> <fantasai> emilio: Is it well-defined to have generated interactive content?<br> <dandclark> emilio: My question is is it well defined to have generated interactive content?<br> <dandclark> ...What's the click event target?<br> <dandclark> ...Might be fine but might need some work on DOM side as well<br> <emilio> flackr: there is common behavior when you click on pseudos that you dispatch on the outer element, not great but...<br> <emilio> ... it is at least targettable<br> <emilio> ... we could explain this in the future<br> <dandclark> emilio: But I think the targets @@@ is mostly an effect of the generated content. Not quite pointer events but sort of. Must be targetable. Thinking about user-select.<br> <emilio> flackr: not sure I have the answer about how to support before / after<br> <emilio> q+<br> <Rossen9> ack emilio<br> <dandclark> emilio: What if instead of making new pseudo you make it content function or something? That way you can use ::before and ::after, can target anything<br> <emilio> ... that way you could use content: self-link(self) or self-link(closest) or something<br> <emilio> ... and would solve the before / after issue<br> <emilio> flackr: yeah<br> <emilio> Rossen9: let's take it back to the issue<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10498#issuecomment-2380313183 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 28 September 2024 00:23:45 UTC