Default UA style for visited links

The SVG 1.1 and 2 specs mention that implementations must respect CSS2
(resp. 2.1) pseudo-classes including :visited
(https://www.w3.org/TR/SVG2/styling.html#RequiredCSSFeatures).

The default UA style sheet does not specify a :visited rule
(https://www.w3.org/TR/SVG/styling.html#DefaultStyleSheetLanguage).
There doesn't seem to be an explicit requirement not to have a
:visited rule, even though the absence of a requirement could be
interpreted as a hint not to do so.

Regardless, Blink has a default :visited rule (or the behavior of
one), causing incompatibilities
(https://code.google.com/p/chromium/issues/detail?id=352912, see also
https://jsbin.com/nixexe/ for example).
In Gecko and WebKit, <g fill="#00ff00"><a
xlink:href="http://google.com">Text</a></g> will show as green.
In Blink, it will only be green if the link has not been visited,
black otherwise, leading to subtle bugs.

As stated on the bug report, the Blink authors justify their
implementation with the spec's ambiguity:

> Yes, it could be argued that the UA style for <svg:a> should be the same as <html:a> (although that's not mandated by the spec AFAIK.)

In order to erase that ambiguity and prevent future incompatibilities,
we should specify that default UA style rules not present in 6.16
should not be enforced by default by UAs.

What are your opinions?

Received on Sunday, 14 February 2016 15:25:20 UTC