W3C home > Mailing lists > Public > www-style@w3.org > March 2003

Re: :here for Links

From: Ernest Cline <ernestcline@mindspring.com>
Date: Sun, 30 Mar 2003 12:55:55 -0500
To: www-style@w3.org
Message-ID: <3E86E95B.16158.8816A2@localhost>

On 29 Mar 2003 at 11:27, Chris Vincent wrote:

> I'm not sure if it's an idea which has been brought up yet, but I think 
> it would be useful to have a pseudo element called :here or something 
> similar.  The purpose is to select only hypertext links link point to 
> the current page.  This way, web developers don't have to go to the 
> navigation device on every page and make the links have special classes 
> or anything like that.

That can already be done with CSS3 Selectors. The selector a[href^="#"] would 
select all links that begin with "#" and hence point to the current page.
If the author uses the practice of using just "#" as a placeholder for links 
manipulated by a scripting language then a[href^="#"]:not([href="#"]) would 
have the rule avoid them if desired. The only advantage I can see to using 
something like :here would be if on the page there were links that 
incorporated part or all of the path as well as the #id part, then :here would 
presumably also select them. However that would be a decision on the part of 
the web author to include the nonessential part of the URI. Since such a 
decision would seem to indicate a desire to emphasize that the link will 
always be in that place as opposed to that the link will always be on this 
page, it is a limitation I can live with. I think it can be safely said that 
there is no need for a :here pseudo-class
Received on Sunday, 30 March 2003 12:55:33 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:06 UTC