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:26:37 +0200
Message-ID: <CAAWBYDBT5mXbtKtF7O2fi_bvnGGk1Bs0FZP+yHiHObS31wnmkA@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 4:15 PM, Antony Kennedy <booshtukka@me.com> wrote:
> On 14 May 2014, at 15:02, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> 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).
> I understand that. I mean if the URL is http://www.domain.com#id how do we target <a href=“#id”>link</a>? I’m not talking about the named anchor.

Ah, gotcha.  We don't yet have a "links to the :target element" bit.
This is part of why we punted :local-link to the next level, as I
think there is more work to be done.  Being able to match on "same
page + target" seems maybe useful.

>>> 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.
> Fine, I don’t dispute that. But if we’re targeting links the “-link” part seems unnecessary. What about :local?

Personally seems insufficiently clear about what it's about, but I'm
not completely opposed to that.

Received on Wednesday, 14 May 2014 14:27:25 UTC

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