Re: [Selectors4] Semantic Pseudo Elements

On 5/11/11 5:08 AM, Øyvind Stenhaug wrote:
> On Tue, 10 May 2011 20:23:51 +0200, Tab Atkins Jr.
> <jackalmage@gmail.com> wrote:
>
>> Note that :link only
>> exists in the first place for legacy reasons, as attribute selectors
>> didn't exist in CSS1, but people wanted to style links differently
>> from named anchors (which both used the <a> element in HTML4). If we
>> were writing CSS from scratch today we wouldn't include it, as (a)
>> using @name to make anchors is deprecated, as @id on any element works
>> better, and (b) you can now just use a[href] to select <a> elements
>> that are specifically links.
>
> This is somewhat of a digression, but no, that's not actually the same
> thing. The :link pseudo-class only matches unvisited links, so it's
> still relevant.

Furthermore, just because an <a> element has an @href doesn't make it a 
link across all browsers.  Try this in Gecko:

   <a href="http://some spaces here">Is this a link?</a>

There's no way we can dereference that URI, so we say this is not a link.

-Boris

Received on Wednesday, 11 May 2011 15:34:21 UTC