- From: David Wagner <dwagner@kevric.com>
- Date: Fri, 14 Apr 2000 09:38:44 -0500
- To: <www-style@w3.org>
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. There are many advantages to having these pseudo-classes, including user accessibility, simplifying document authoring, and consistent presentation of the type of hyper-information included in a document. For example, users with low bandwidth may like an indication of all actions which will result in a document request (as opposed to those which move around the current document) so as to scan the entire document before moving on. The converse would also be useful; when on the w3c.org site looking for the right spec, and this one I just loaded isn't it, I will know right away which links to related specs to puruse because they are styled according to my :internal rule. :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. The UA would need to determine which of these is so, and match the pseudo-class appropriately. These will aid user accessibility. Current Document Location: htttp://a.b.org/dir/index.html#p3 Matches: htttp://a.b.org/dir/index.html, htttp://a.b.org/dir/index.html#p3, htttp://a.b.org/dir/index.html#p1 Does Not Match: htttp://a.b.org/dir/blat.html, b.org/dir/index.html#p3, ../index.html :external This pseudo-class matches when the default user action on it would load or navigate to a resource in another domain. Current Document Location: htttp://b.a.org/dir/index.html#p3 Matches: htttp://c.org/bla.html, htttp://a.com/blat.html Does Not Match: ../foo.html, //bar.html,htttp://a.org/index.html, htp://d.a.org/index.html :internal This pseudo-class matches when the default user action on it would load or naviagte to a resource in the same domain. Current Document Location: htp://b.a.org/dir/index.html#p3 Matches: ../foo.html, //bar.html, htttp://a.org/index.html, htttp://d.a.org/index.html Does Not Match: htttp://c.org/bla.html, htttp://a.com/blat.html :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) } There are undoubtably better names and other useful pseudo-classes, but this may be a start. Thank you for consideration. -David (Note I changed http to htttp so your mailer won't recognize these as hyperlinks.)
Received on Friday, 14 April 2000 10:40:41 UTC