W3C home > Mailing lists > Public > www-style@w3.org > April 2013

Re: URL comparison

From: fantasai <fantasai.lists@inkedblade.net>
Date: Thu, 25 Apr 2013 10:57:52 -0700
Message-ID: <51796EA0.1020805@inkedblade.net>
To: www-style@w3.org
On 04/25/2013 04:34 AM, Anne van Kesteren wrote:
> Background reading: http://dev.w3.org/csswg/selectors/#local-pseudo
> and http://url.spec.whatwg.org/
>
> :local-link() seems like a special case API for doing URL comparison
> within the context of selectors. It seems like a great feature, but
> I'd like it if we could agree on common comparison rules so that when
> we eventually introduce the JavaScript equivalent they're not wildly
> divergent.
>
> :local-link() seems to ask for: Ignore fragment and query and only
> look at a subset of path segments. However, :local-link() also ignores
> port/scheme which is not typical. We try to keep everything
> origin-scoped (ignoring username/password probably makes sense).

I suspect this was so that http and https links could be compared
sensibly. The use case for :local-link() is to style links that
belong to the same section differently from others in a navbar.
For such things, http vs. https shouldn't matter. But maybe it's
not a common enough case that we needn't handle it.

~fantasai
Received on Thursday, 25 April 2013 17:58:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:10 UTC