html icon indicating copy to clipboard operation
html copied to clipboard

Update UA stylesheet rules to use `:any-link` instead of `:visited` or `:link`

Open Ahmad-S792 opened this issue 1 year ago • 6 comments

What is the issue with the HTML Standard?

Hi Team,

While looking into UA stylsheets rules across browsers (WebKit & Blink primiarly), both have:

a:any-link or a:-webkit-any-link

While in the web-spec [1]:

:link, :visited { text-decoration: underline; cursor: pointer; }

[1] https://html.spec.whatwg.org/multipage/rendering.html#phrasing-content-3

Should we update web-spec to use any-link, just a suggestion.

NOTE: SVG2 Web-Spec also have this issue, so we can update it as well.

Thanks!

Ahmad-S792 avatar Feb 10 '24 15:02 Ahmad-S792

For SVG please file an issue over at https://github.com/w3c/svgwg/issues/new.

cc @zcorpan

annevk avatar Feb 10 '24 15:02 annevk

@annevk - Done for SVG2 Spec as well - https://github.com/w3c/svgwg/issues/933 (for reference).

Ahmad-S792 avatar Feb 10 '24 15:02 Ahmad-S792

This seems OK. Gecko also uses :any-link: https://searchfox.org/mozilla-central/source/layout/style/res/ua.css#151

zcorpan avatar Feb 12 '24 15:02 zcorpan

Does this have any observable effect? If this is just a style choice then I'd prefer we avoid the churn.

domenic avatar Feb 12 '24 20:02 domenic

It's not observable to web content.

zcorpan avatar Feb 12 '24 21:02 zcorpan

I don't think it's a priority or anything, but aligning with implementations makes sense to me for ease of ongoing maintenance.

annevk avatar Feb 13 '24 12:02 annevk