Re: [csswg-drafts] [selectors] :local-link should have a more precise name (#10975)

`URLPattern` could be a super interesting way to handle this. It could cover many (all?) use cases with just one argument, and might effectively reduce the selector syntax-space down to `:self-link(<string>)` where the `<string>` is the effective `URLPatternInput`. We could also crib from attirbute selectors allowing for `:self-link(<string> i)` for case-insensitive matches.

One slight concern might be perf, given how much more complex `URLPattern` is, but the selector will likely only match once per page (modulo calls to `pushState`/`replaceState`).

Is there a privacy concern? I don't think there is a way for a CSS file to currently effectively exfiltrate the current page the user is on. Allowing `URLPattern` matching selectors would make that a lot easier - is that a problem, though?

I really like the idea.

-- 
GitHub Notification of comment by keithamus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10975#issuecomment-2614013263 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 25 January 2025 16:03:49 UTC