Bramus Van Damme walks through a CSS Route and Navigation Matching proposal that lets you style navigation declaratively instead of wiring it up in JavaScript. It adds a @route rule to name routes with URL patterns, a @navigation rule to react to a navigation’s from and to, a :nav-source pseudo-class for the triggering element, and a :link-to() selector to style links by destination.
bram.us/2026/07/30/styling-the-navigation-declarative-route-and-navigation-matching-in-css
