-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite :visited rules to match reality, based on dbaron's spec. #2105
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with suggestion
selectors-4/Overview.bs
Outdated
previously visited ones. Selectors | ||
provides the pseudo-classes <dfn id='link-pseudo'>:link</dfn> and | ||
<dfn id='visited-pseudo'>:visited</dfn> to distinguish them: | ||
User agents commonly display unvisited <a href="#the-any-link-pseudo">hyperlinks</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say "User agents commonly render unvisited hyperlinks" or "Visual user agents commonly display unvisited hyperlinks".
Now instead of messing with the spec and creating a dirty implementation that works in weird ways (like explained in dbarons blog) why could the standards body not simply remove/deprecate Then to enable the use case (notify users of a link that has already been visited) browser vendors could implement a tool-tip that is rendered ontop of the canvas not reachable by getComputedStyle, PointerEvents or anything else as it is a OS-tooltip, which would somehow notify the user about the state of visit. Now this is not the most convenient for users, but it is the most secure. Another way around this would be security profiles where :visited would always work on urls of the same domain, maybe even across subdomains of the same domain, but never onto foreign domains. Foreign domains could then implement something like access control origin where they declare which domains would show the users visiting history, users could then accept those shared history suggestions/lists. While all these are just bits of ideas, I am pretty sure at some point in future dbarons implementation will bite back because some browser API want's to read what's the pure render color below the mouse pointer or whatnot. |
:visited already exists and is commonly used; dropping it entirely isn't realistic. There've been discussions (off-list, I think) about figuring out ways to expose :visited styling "safely" in some contexts: allow it to work normally for same-origin links; or remember what links you actually clicked from a given domain, or visited from with a Referer header (and thus, what history could have been snooped on via JS or server code anyway), and let it work normally for those links, etc. |
Regarding "In full, the behavior is actually that the '':link'' pseudo-class applies to all links, ": I don't think "applies to all links" sounds right here. It might be better to restructure this somehow to say that (But it seems like this PR is pretty messed up... the "Files changed" view for the PR as a whole doesn't have the first commit in it... and trying to comment on the commit with the actual changes fails with "Start commit oid is not part of the pull request".) |
Yeah, I have no clue what the PR is doing; I'll have to manually reconstruct it. |
(I was going to continue to review further... but I haven't actually read further yet.) |
It looks like the substantive parts of this PR were merged in some other fashion |
Per #2037, adapts dbaron's spec into more generic language, and adds several examples and some surrounding verbiage.