W3C home > Mailing lists > Public > www-style@w3.org > May 2014

Re: Self-referential link pseudo-class

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 14 May 2014 16:02:09 +0200
Message-ID: <CAAWBYDBVhs-HWRcAMmaTUqtuL2xmNJU+rHF2rnNY3YeTwaUdDg@mail.gmail.com>
To: Antony Kennedy <booshtukka@me.com>
Cc: Dave Kok <email@davekok.nl>, www-style list <www-style@w3.org>
On Wed, May 14, 2014 at 2:33 PM, Antony Kennedy <booshtukka@me.com> wrote:
>>> Preferably this pseudo-class would also be triggered for named anchors,
>>> <a name="foobar"></a> when the name is in the hash of the URL.
>> Wrong directionality - that's what :target does.
> I understand what :target does, but what about the link that links to the current target - how do we target that?

Note that <a name> is *not* a link.  It's just a legacy markup pattern
for defining anchors (which no one should use anymore since IDs have
defined anchors for years and years).

:local-link is meant to match the links that link to the current page.

>>> Personally I would like a more descriptive pseudo-class name more
>>> specific to this context. current and self could be used in many
>>> contexts. Perhaps current-uri or something like that.
>> "current-uri" seems pretty identical to "local-link", doesn't it?
> I find current-uri to be clearer than local-link.

Well, we don't use "uri" for web-facing names; it's always "url".  But
sure, opinions can differ. ^_^

> local-link sounds like it is local to the domain, current-uri sounds local to a specific URI. But if we want one pseudo-class to cover both scenarios, I’m not precious about it.

Unless it's actually confusing, I would like to have all the "link to
same page/folder/domain/etc" things under one name, for developer

Received on Wednesday, 14 May 2014 14:02:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:27 UTC