Re: [csswg-drafts] [css-navigation-1] :link-to() pseudo-class for links that are related to the current navigation (#13163)

Also, one other high-level point I'd like to add about the complexity here:

The core use cases for `@navigation` (see #8209 for a significant piece of them) involve declarative ways to do something that is *possible* using Javascript (that intercepts the [`navigate` event](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/navigate_event)).  Having it in CSS makes it simpler for authors and also gives us the potential for browsers to optimize it better (for example, potentially by avoiding having to go to the main thread to run the JS).  However, it's really only useful to have it in CSS if developers will actually be able to do what they're doing using the CSS features for a large percentage of the time.  Otherwise we'll end up in a situation where:
* a significant percentage of developers who try to use the feature in CSS will run into a problem that they can't fix using CSS and they need to throw away what they've written in CSS and start over with Javascript interception of the navigations, and
* those developers will talk about this and advise other developers to avoid the CSS feature and just do it in Javascript because they're likely to have the same problem (even if only some of them actually will).

This situation means that when we're designing this feature in particular, the tradeoffs that we make between simplicity and covering more use cases are probably a bit different than normal.  In particular, I think this situation means that we should be more willing than normal to accept some complexity here in order to ensure that the feature covers most of the things that people will want to use it for.  (I think it's still the case that the (perhaps somewhat complex or dense) CSS expressions will be much smaller than the amount of Javascript needed to do the same thing.)

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


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

Received on Friday, 23 January 2026 15:40:13 UTC