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

I am 

> Also, one other high-level point I'd like to add about the complexity here:
> 
> The core use cases for `@navigation` (see [#8209](https://github.com/w3c/csswg-drafts/issues/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.)

Thanks, I think this is a very good observation.
I think I am OK with the complexity of the syntax in [this comment](https://github.com/w3c/csswg-drafts/issues/13163#issuecomment-3601768296), and also we can provide some simplified versions, like `:link-to(--movie-details exact-match)` or something that doesn't force you to name each and every parameter.

-- 
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13163#issuecomment-3790948391 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:58:55 UTC