Re: Does :target pseudo-class apply to XML documents?

On Sat, 21 Apr 2001, Elliotte Rusty Harold wrote:

>The description of the :target pseudo-class in CSS3 module: W3C
>selectors leaves a number of questions open. In particular:
>
>1. Does it only work in HTML where there are well-defined target
>attributes, or does it work in XML too?

AFAIK, it's meant to work in any environment where the application is
capable of telling what a *:target is. In fact, HTML usually isn't one of
these, since the client will not always know which elements are pointed at
from another document. When the document is arrived at via a reference, then
we know, not otherwise.

>2. Why not just use the attribute selectors on target attributes?

:target and [class="id"] are two completely separate things. The first only
applies when the id is actually referenced.

>3. Is it perhaps because the target selector only works after you've
>followed a link from the referring URI to the targetted element?

Aye. Only, in some environments (like a closed HyTime system), the app will
know even if we're not following a link. XLink with detached link databases
is another example.

Sampo Syreeni, aka decoy, mailto:decoy@iki.fi, gsm: +358-50-5756111
student/math+cs/helsinki university, http://www.iki.fi/~decoy/front

Received on Sunday, 22 April 2001 06:37:32 UTC