4 :visited { color: red }
5 :visited #l1 { color: green }
6 :visited
> #l2 { color: green }
7 :visited span :visited { color: green }
8 :link + #span1 { color: green }
9 :visited + #span1 { color: red }
10 :link ~ #span2 { color: green }
11 :visited ~ #span2 { color: red }
16 Test that visited style matches to the topmost link in a decendant selector.
17 The link should be green, with red underlining.
20 <a href=
""><span id=
"l1">Link
</span></a>
23 Test that visited style matches to the topmost link in a child selector.
24 The link should be green, with red underlining.
27 <a href=
""><span id=
"l2">Link
</span></a>
30 Test that visited style does not match to non-topmost links.
31 The link should be red, with red underlining.
34 <a href=
""><span><a href=
"" id=
"l3">Link
</a></span></a>
37 Test that direct adjacent selector doesn't match visited style.
38 The link should be red, with red underlining.
39 The span should be green.
43 <span id=span1
>Span
</span>
46 Test that indirect adjacent selector doesn't match visited style.
47 The link should be red, with red underlining.
48 The span should be green.
52 <span id=span2
>Span
</span>