Skip to content

Conversation

@dbaron
Copy link
Member

@dbaron dbaron commented Nov 21, 2025

This adds an initial proposal for the :link-to() pseudo-class and a navigation-param() function that goes inside of it.

This also refactors some of the invocations of the URL pattern "match" algorithm to structure the parameters the way the algorithm expects (and be a little bit clearer that a base URL doesn't need to be provided).

…() function).

This adds an initial proposal for the :link-to() pseudo-class and a
navigation-param() function that goes inside of it.

This also refactors some of the invocations of the URL pattern "match"
algorithm to structure the parameters the way the algorithm expects
(and be a little bit clearer that a base URL doesn't need to be
provided).
@dbaron dbaron requested a review from noamr November 21, 2025 16:37
@dbaron dbaron self-assigned this Nov 21, 2025
[ "and" <<navigation-param-expression>> ]*
<dfn><<navigation-param-or>></dfn> = <<navigation-param-expression>>
[ "or" <<navigation-param-expression>> ]*
<dfn><<navigation-param>></dfn> = <<navigation-param-key-value>> | <<navigation-param-function>>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this mean that the syntax is :link-to(route-name with navigation-param(movie-id)) / :link-to(route-name with movie-id: 123) or some such?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it currently requires one more set of () for whatever is after the with, but otherwise yes. (This is changeable, though!)

Copy link
Collaborator

@noamr noamr left a comment

Choose a reason for hiding this comment

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

LGTM
Let's have some strawman proposals as part of the spec and revise them as we go along.

Thanks!

@dbaron dbaron merged commit 2cfa965 into w3c:main Nov 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants