WICG / WICG/declarative-partial-updates

The :navigating-to() pseudo-class feels awkward

Open
#49 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Bikeshed
Stars
135
Forks
13
Avg merge
12m
Merged PRs (30d)
3

Description

The initial "What if it could look like this?" example in the route matching explaner uses a :navigating-to() pseudo-class, although this isn't otherwise discussed.

While the power of a :navigating-to() pseudo-class seems like it could be useful in some cases, this example seems unappealing in one way since it looks like a case where dealing with multiple links requires repetitive separate styles for each link.

That said, I see two different options for resolving this, and it's not clear to me if only one is needed or if both are needed:

  • a pseudo-class indicating that this link is being navigated because the user activated it
  • a pseudo-class indicating that the target of this link is being navigated to, whether via this link or another (in-page, for security/privacy!) mechanism

I'm reasonably confident that in the cases where the above two differ, that some developers would want the first. I'm less sure of whether or not other developers would want the second.

Given that this isn't a fleshed-out feature I expect you're planning further work on this in the future, but I figured I'd write this down in an issue since I was thinking about it as I read the explainer.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read route-matching-explainer.md, especially the initial “What if it could look like this?” example and its use of :navigating-to(). Compare the two pseudo-class behaviors described in the issue; done means the intended behavior is decided and the explainer documents the chosen direction.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
documentation, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.