- From: Grey Hodge <grey@thecloudygroup.com>
- Date: Mon, 30 Jul 2007 03:54:44 -0400
- To: www-style@w3.org
It's entirely possible I'm an idiot, however, I think I see an opportunity for a useful addition to the link pseudo-classes. http://www.w3.org/TR/CSS2/selector.html#x27 states: "The :link pseudo-class applies for links that have not yet been visited." "The :visited pseudo-class applies once the link has been visited by the user." Recently I've been building a site, and using a new idea on a navigation menu. Once you get beyond a few pages, it's tedious to manage a code block between pages, so one resorts to server side scripting to manage it. In this case, the current page's entry in the menu is styled differently than the rest to indicate the user's current location in the site. However, I realized that maybe rather than changing the menu HTML server side, I could just use a pseudo-class and style it differently, as one can have unvisited and visited links styled differently automatically by the browser. To my dismay, I discovered there is currently no method to do this. My idea, which I'm certain has been bandied about a dozen times before, is to add a :current (or some other name) pseudo-class that refers only to URLs that match the currently loaded page, and can be styled differently like :visited and :link. Already browsers have to determine if an URL is unvisited or not, so I don't really see that this additional check would be a greater onus than what they already do, and it could make life a little easier on developers, less server side scripting. Comments? I'd love to hear support, but also I'd like to hear why this would be a bad idea. Thanks. -- Grey Hodge email [ grey @ thecloudygroup.com ] web [ http://www.thecloudygroup.com ] motto [ Make everything as simple as possible, but no simpler. - Einstein ]
Received on Monday, 30 July 2007 15:18:37 UTC