Re: Link Destination Pseudo-classes

David Wagner a écrit:
 
> I would like to propose a collection of pseudo-classes for
> consideration.  These pseudo-classes all relate to styling links and
> improve document collection accessibility.  They apply only to
> documents and to elements which accept user input.
> 
> The general idea is to provide a means using CSS to indicate what the
> default user action (as defined by the document type and the UA) on an
> element would do.  For example, the :external pseudo class matches all
> elements for which the default user action results in fetching a
> resource from another domain.  This allows users to set preferences in
> their user stylesheets so they have a cue to, perhaps, look at the
> domain name of the link to decide whether or not to get the resource.

An equivalent proposal for local and external anchors is already in
the list of suggested extensions to CSS. See documents in
http://www.w3.org/Style/css

> [snip]
> :here and :reload
> These pseudo-classes match when the default user action on it results
> in navigation within the current resource.  The difference is :here
> does not involve refetching the current resource, while :reload does.

This :here is equivalent to my :local. The :reload is an interesting
concept, but I doubt it is really useful.

> :external
> This pseudo-class matches when the default user action on it would load
> or navigate to a resource in another domain.

Cf. supra. Only one point : if loading the document is done by a piece
of javascript code, there is no way the browser can handle that :external.

> :internal
> This pseudo-class matches when the default user action on it would load
> or naviagte to a resource in the same domain.

Cf. supra.

> :protocol()
> This pseudo-class matches when the default user action on it results in
> navigation to a different protocol.  Note it would be very useful to
> specify which protocol so they may all be styled differently, as in the
> line following.
>   *:protocol("mailto"):before { content : url(envelope.png) }

Interesting. Looks more or less like an attibute selector maching the first
chars of the value of the attribute... I'd rather see in CSS the regexps
that some contributors to this list call for :-)

> There are undoubtably better names and other useful pseudo-classes, but
> this may be a start. 

Yes ! Be sure that all contributions are highly welcome.

</Daniel>

Received on Saturday, 15 April 2000 10:28:08 UTC