Skip to content

Commit 5fd800c

Browse files
committed
[selectors] Remove one :local-link issue that's clear in URL. Rephrase another one to be clearer.
1 parent 83a8544 commit 5fd800c

2 files changed

Lines changed: 14 additions & 23 deletions

File tree

selectors/Overview.html

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2804,18 +2804,13 @@ <h3 id=local-pseudo><span class=secno>8.3. </span> The local link
28042804
belong to a hierarchical scheme, the functional pseudo-class matches
28052805
nothing.
28062806

2807-
<p class=issue> Should a <code>:local-link(2)</code> match a link from the
2808-
document <code>http://example.com/foo</code> to itself? (This would make
2809-
Style 5 apply to Link 4.) (Relatedly, should a link from a document at an
2810-
opaque URL to itself also match?)
2811-
2812-
<p class=issue> If you're on a server architecture that allows both files
2813-
and folders of the same name at a given level, so that
2814-
"http://example.com/2011" and "http://example.com/2011/" are completely
2815-
different, it seems weird that (as currently specced), they'd both match
2816-
the document's url to 1 path level, even though they don't actually share
2817-
any path segments on your server. Should check with Anne and make sure we
2818-
match the URL spec.
2807+
<p class=issue> It's clear that, if the document URL has at least N
2808+
segments, then <code>:local-link(N)</code> only matches links whose URL
2809+
has at least N segments. (This lets you assign consistent semantics to
2810+
:local-link so that, for example, :local-link(2) means a "within-repo"
2811+
link on GitHub.) What about if the document url has less than N segments,
2812+
and the link is same-page? Should "null segments" count as matching, or
2813+
not?
28192814

28202815
<h3 id=the-target-pseudo><span class=secno>8.4. </span> The target
28212816
pseudo-class <a href="#target-pseudo"><code>:target</code></a></h3>

selectors/Overview.src.html

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,17 +1883,13 @@ <h3 id="local-pseudo">
18831883
the functional pseudo-class matches nothing.
18841884

18851885
<p class="issue">
1886-
Should a <code>:local-link(2)</code> match a link from the document <code>http://example.com/foo</code>
1887-
to itself? (This would make Style 5 apply to Link 4.)
1888-
(Relatedly, should a link from a document at an opaque URL to itself also match?)
1889-
1890-
<p class='issue'>
1891-
If you're on a server architecture that allows both files and folders of the same name at a given level,
1892-
so that "http://example.com/2011" and "http://example.com/2011/" are completely different,
1893-
it seems weird that (as currently specced),
1894-
they'd both match the document's url to 1 path level,
1895-
even though they don't actually share any path segments on your server.
1896-
Should check with Anne and make sure we match the URL spec.
1886+
It's clear that, if the document URL has at least N segments,
1887+
then <code>:local-link(N)</code> only matches links whose URL has at least N segments.
1888+
(This lets you assign consistent semantics to :local-link so that,
1889+
for example, :local-link(2) means a "within-repo" link on GitHub.)
1890+
What about if the document url has less than N segments,
1891+
and the link is same-page?
1892+
Should "null segments" count as matching, or not?
18971893

18981894

18991895
<h3 id="the-target-pseudo">

0 commit comments

Comments
 (0)