Re: [csswg-drafts] [selectors] :local-link should have a more precise name (#10975)

The varying behavior of `:local-link` is definitely part of the key here. On the one hand, varying behavior can be confusing, and my worry about that is increased by the fact that [your comment](https://github.com/w3c/csswg-drafts/issues/10975#issuecomment-2393729818) says it depends on the fragment-ness of the _page_, while the [spec](https://drafts.csswg.org/selectors-4/#the-local-link-pseudo) says it depends on the _link_. (Expert mixes up the description => novices are likely to mix up the understanding.) On the other hand, if authors tend to have multiple sets of links, some of which have fragments and some of which don't, and they want the same selector to work across both kinds of link-sets, this varying behavior could be helpful.

My understanding is that the fragment-ful behavior tends to be useful for single-page apps, where the fragment is used to distinguish pages, while the fragment-less behavior tends to be useful for multi-page apps. Is that correct? If so, it makes me doubt that the same set of selectors are likely to be used for both use cases. But this is something the WG would know better than I do.

In my brainstorming option in the OP, `:same-*-link`, the "same" has the same sort of meaning as in https://tess.oconnor.cx/2020/10/parties#proposal: the link is the "same" as its context. To the extent y'all think that analogy works, it's a reason to use the same term in both parts of the platform.

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


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

Received on Friday, 4 October 2024 15:53:14 UTC