- From: Mihai Alexandru Bīrsan <mihai.birsan@grapefruit.ro>
- Date: Tue, 31 Jul 2007 15:14:33 +0300
- To: <www-style@w3.org>
Hi! > I'd not be greedy. Sure they'd be more usefull than some other CSS but > just the :current would help loads. But if the rode is to be well paved, > it'd be nice to make difference between links leading off the site and > internal ones. At most pages you have to check the status bar to see if > the link leads away. Some do it server side or manually to show with a > little icon that it leads away... as on wikipedia for example. Perhaps > that could be done with a :relative pseudo class? or current-domain or > something. I'll happily leave dreaming up the name/syntax to someone > else. I'd be fancy with a friendly green default color for internal > links though... I find the :current-domain name much more appropriate. Since you can have absolute paths to your own domain, :relative would be inappropriate. As about the other :current-s I'd use :current to behave like :visited, :current-path to match the path w/o filename, :current-resource to match the path w/ filename. Aside naming preferences, I find a couple of issues: First, of :current and :focused which should have precedence when styling, and why? I believe it's hard to decide that. Second, I've seen a lot of website whose `/foo/bar` is the same resource as `/foo/bar/`. What happens when trying to match :current-resource or :current-path on any of those? Naturally we should get the same result. However, `/foo/bar`'s path is `/foo/`, but `/foo/bar/`'s path is `/foo/bar/`. The best way in implementing a proper solution for that would be a HEAD request on the server who could tell where the resource actually is. But I think that servers will start bleeding if that's gonna happen for every link on every a page, no? That's just 2 cents. :) -- Mihai Alexandru Bīrsan Developer GRAPEFRUIT tel/fax: + 40 232 233066, 233068 mobile: +40 724 363680 www.grapefruit.ro -----Original Message----- From: www-style-request@w3.org [mailto:www-style-request@w3.org] On Behalf Of Niklas Åkerlund Sent: Tuesday, July 31, 2007 11:58 To: www-style@w3.org Subject: Re: Suggestion for new link pseudo-class :current (or similar) Hello! > A feature does not need to be useful to everyone, merely to enough > people to warrant the work. Since this has been requested a number of > times here shows that enough people with a cup of brain matter to find > the list have bothered to speak up, and also shows that since only a > fraction of the populace bothers to speak up, there has to be a large > number of people who would use this. I'd even wager more people would > use this than a goodly number of other CSS features already in the > spec. I most certainly agree with you, Grey Hodge. It is a good idea and in my opinion should have been implemented along with the other link pseudo classes. If it had been implemented back then, and was being used as widely as the other a pseudo classes, I do believe people would take greater care with their back ends to present clients with proper locations. Alot of CSS features seems very useless to 99% of all web pages but just about ever page on the net has a-links. And among the first thing styled on a page are the links. > Good question. That's another point for discussion. Should it be > exact, matching URI and internal anchors, or not? In my opinion, it > should be a straight match. It should be treated the same way visited works.... ehh, that's exact, isn't it? > However, if one is to go down this road, one may as well pave it. If > :current gains traction, how about: :current-exact for what I describe > above :current-partial to match path and file > :current-path for only the domain.tld/path/ part > :current- I'd not be greedy. Sure they'd be more usefull than some other CSS but just the :current would help loads. But if the rode is to be well paved, it'd be nice to make difference between links leading off the site and internal ones. At most pages you have to check the status bar to see if the link leads away. Some do it server side or manually to show with a little icon that it leads away... as on wikipedia for example. Perhaps that could be done with a :relative pseudo class? or current-domain or something. I'll happily leave dreaming up the name/syntax to someone else. I'd be fancy with a friendly green default color for internal links though... Niklas Åkerlund
Received on Tuesday, 31 July 2007 12:11:38 UTC