Default UA style for visited links

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Default UA style for visited links

Thaddee Tyl
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?

Reply | Threaded
Open this post in threaded view
|

Re: Default UA style for visited links

Cameron McCormack-4
Thaddee Tyl:

> 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?

Thanks for reporting this.  We are experimenting with having issue
discussion take place on GitHub, so I have copied your message to an
issue:

  https://github.com/w3c/svgwg/issues/47

I’ll follow up there.

Thanks,

Cameron

--
Cameron McCormack ≝ http://mcc.id.au/