Skip to content

[css-navigation-1] Move parameter resolution into <<route-location>> instead of :active-navigation#14119

Open
noamr wants to merge 4 commits into
mainfrom
css-nav-link-to
Open

[css-navigation-1] Move parameter resolution into <<route-location>> instead of :active-navigation#14119
noamr wants to merge 4 commits into
mainfrom
css-nav-link-to

Conversation

@noamr

@noamr noamr commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Parameter resolution refines a URL pattern by matching some parameters with a given URL.
Specify for keywords that match active navigation URLs.
Specify param matcing algorithm in detail

@noamr noamr requested review from bramus and dbaron and removed request for dbaron July 1, 2026 11:15
A <<route-location>> is defined to
<dfn for="route-location">match</dfn> a [=/URL=]-or-null <var>input</var> if <var>input</var> is non-null, and:
<dfn for="route-location">match</dfn> a [=/URL=]-or-null <var>input</var> if <var>input</var> is non-null,
and the corresponding statement is true when switching on <<route-location>>:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: It took me a while to grasp that you meant a switch here. The previous structure in which stuff was written like : the <<route-location>> is a … was more clear in that regard.

The <css>navigation-source-url</css> represents the [=current navigation URL=] given ''from''.
The <css>navigation-destination-url</css> represents the [=current navigation URL=] given ''to''.
The <css>navigation-current-url</css> represents the [=current navigation URL=] given ''at''.
The <css>navigation-peer-url</css> represents the [=current navigation URL=] given ''with''.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to add an ISSUE: here about the names for the keywords; or do you want to wait until after presenting this at the WG?

Comment on lines +431 to +432
'':link-to()'' can be used in conjunction with navigation URLs and the ''param()'' function,
to select links that match the current navigation using URL pattern params, without having to match the exact URL.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don’t have param() defined anywhere right now, so maybe best to leave it out (for now).

}

:active-navigation(to --movie-detail) {
:link-to(--movie-detail with (all from navigation-destination-url)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe best to add a small example here to does not use all from ….

:link-to(--movie-detail with (id: 123)) {
  …
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants