Re: Self-referential link pseudo-class

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
readability.

~TJ

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