@@ -2416,7 +2416,9 @@ <h3 id=local-pseudo><span class=secno>7.3. </span> The local link
24162416 < p > The < dfn id =local-link-pseudo > :local-link</ dfn > pseudo-class allows
24172417 authors to style < a href ="#the-any-link-pseudo "> hyperlinks</ a > based on
24182418 the users current location within a site and to differentiate
2419- site-internal versus site-external links. The < a
2419+ site-internal versus site-external links.
2420+
2421+ < p > The (non-functional) < a
24202422 href ="#local-link-pseudo "> < code > :local-link</ code > </ a > pseudo-class
24212423 represents an element that is the source anchor of a hyperlink whose
24222424 target's absolute URL matches the element's own document URL. Any fragment
@@ -2430,9 +2432,10 @@ <h3 id=local-pseudo><span class=secno>7.3. </span> The local link
24302432 < pre > nav :local-link { text-decoration: none; }</ pre >
24312433 </ div >
24322434
2433- < p > The pseudo-class can also accept a non-negative integer as its sole
2434- argument, which, if the document's URL belongs to a hierarchical scheme,
2435- indicates the number of path levels to match:
2435+ < p > As a functional pseudo-class, < code > :local-link()</ code > can also accept
2436+ a non-negative integer as its sole argument, which, if the document's URL
2437+ belongs to a hierarchical scheme, indicates the number of path levels to
2438+ match:
24362439
24372440 < ul >
24382441 < li > ‘< code class =css > :local-link(0)</ code > ’ represents a link element
@@ -2455,12 +2458,9 @@ <h3 id=local-pseudo><span class=secno>7.3. </span> The local link
24552458 </ div >
24562459
24572460 < p > Path segments are portions of the URL's path that are separated by
2458- forward slashes (/). The scheme, username, password, port, query string,
2459- and fragment portions of the URL are not considered when matching against
2460- < code > :local-link(< var > n</ var > )</ code > . If a segment is missing from the
2461- document's URL, a pseudo-class requiring that segment to match does not
2462- match anything. If the document's URL does not belong to a hierarchical
2463- scheme, the functional pseudo-class matches nothing.
2461+ forward slashes (/). If a segment is missing from the document's URL, a
2462+ pseudo-class requiring that segment to match does not match anything.
2463+ However, an empty final path segment is ignored.
24642464
24652465 < div class =example >
24662466 < p > So, given the links:
@@ -2470,18 +2470,23 @@ <h3 id=local-pseudo><span class=secno>7.3. </span> The local link
24702470
24712471 < li > < code > <a href="http://www.example.com/2011"> 2011</a> </ code >
24722472
2473- < li > < code > <a
2474- href="https://www.example.com/2011/03"> March</a> </ code >
2473+ < li > < code > <a href="http://www.example.com/2011/03"> March</a> </ code >
24752474
24762475 < li > < code > <a
24772476 href="http://www.example.com/2011/03/"> March</a> </ code >
24782477
2478+ < li > < code > <a href="http://www.example.com/2011/03/21"> 21
2479+ March</a> </ code >
2480+
2481+ < li > < code > <a
2482+ href="https://www.example.com/2011/03/"> March</a> </ code >
2483+
24792484 < li > < code > <a href="http://example.com/2011/03"> March</a> </ code >
24802485 </ ol >
24812486
24822487 < p > and the styles:
24832488
2484- < ol >
2489+ < ol type = A >
24852490 < li > < code > a:local-link {...}</ code >
24862491
24872492 < li > < code > a:local-link(0) {...}</ code >
@@ -2496,19 +2501,30 @@ <h3 id=local-pseudo><span class=secno>7.3. </span> The local link
24962501 < p > If the document's URL is < code > http://www.example.com/2011/03/</ code > :
24972502
24982503 < ol >
2499- < li > Link 1 would receive Style 2
2504+ < li > Link 1 would receive Style B
25002505
2501- < li > Link 2 would receive Styles 2 and 3
2506+ < li > Link 2 would receive Styles B and C
25022507
2503- < li > Link 3 would receive Styles 2, 3 , and 4
2508+ < li > Link 3 would receive Styles B, C , and D
25042509
2505- < li > Link 4 would receive Style 1
2510+ < li > Link 4 would also receive Styles A, B, C, and D
25062511
2507- < li > Link 5 would remain unstyled, and Style 5 would not be applied to
2508- anything.
2512+ < li > Link 5 would receive Styles B, C, and D
2513+
2514+ < li > Link 6 would receive Styles B, C, and D
2515+
2516+ < li > Link 7 would remain unstyled
2517+
2518+ < li > Style E would not be applied to anything
25092519 </ ol >
25102520 </ div >
25112521
2522+ < p > The scheme, username, password, port, query string, and fragment
2523+ portions of the URL are not considered when matching against
2524+ < code > :local-link(< var > n</ var > )</ code > . If the document's URL does not
2525+ belong to a hierarchical scheme, the functional pseudo-class matches
2526+ nothing.
2527+
25122528 < p class =issue > Should a < code > :local-link(2)</ code > match a link from the
25132529 document < code > http://example.com/foo</ code > to itself? (This would make
25142530 Style 5 apply to Link 4.) (Relatedly, should a link from a document at an
0 commit comments