Skip to content

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

@dbaron

Description

@dbaron

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions