@@ -2431,23 +2431,36 @@ <h3 id=local-pseudo><span class=secno>7.3. </span> The local link
24312431 </ div >
24322432
24332433 < p > The pseudo-class can also accept a non-negative integer as its sole
2434- argument, which, if the document's URL is hierarchical, indicates the
2435- number of path levels to match: an argument of ‘< code
2436- class =css > 0</ code > ’ represents a link element whose target is in the
2437- same domain as the document's URL, ‘< code
2438- class =css > 1</ code > ’represents a link element whose target has the same
2439- domain and first path segment, ‘< code class =css > 2</ code > ’ represents a
2440- link element whose target has the same domain, first, and second path
2441- segments, etc. Path segments are portions of the URL's path that are
2442- separated by forward slashes (/). If a segment is missing from the
2443- document's URL, a pseudo-class requiring that segment to match does not
2444- match anything. Similarly if the document's URL is not hierarchical, the
2445- functional pseudo-class does not match anything. The scheme, username,
2446- password, port, query string, and fragment portions of the URL are not
2447- considered when matching against < code > :local-link(< var > n</ var > )</ code > .
2434+ argument, which, if the document's URL belongs to a hierarchical scheme,
2435+ indicates the number of path levels to match:
2436+
2437+ < ul >
2438+ < li > ‘< code class =css > :local-link(0)</ code > ’ represents a link element
2439+ whose target is in the same domain as the document's URL
24482440
2449- < p class =issue > Is there such a thing as IRL? Because we do want this to
2450- work for internationalized URLs, just not URNs.
2441+ < li > ‘< code class =css > :local-link(1)</ code > ’ represents a link element
2442+ whose target has the same domain and first path segment
2443+
2444+ < li > ‘< code class =css > :local-link(2)</ code > ’ represents a link element
2445+ whose target has the same domain, first, and second path segments
2446+
2447+ < li > etc.
2448+ </ ul >
2449+
2450+ < div class =example >
2451+ < p > The following example styles all site-external links with a dashed
2452+ underline.
2453+
2454+ < pre > :not(:local-link(0)) { text-decoration-style: dashed; }</ pre >
2455+ </ div >
2456+
2457+ < 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.
24512464
24522465 < div class =example >
24532466 < p > So, given the links:
@@ -2496,12 +2509,10 @@ <h3 id=local-pseudo><span class=secno>7.3. </span> The local link
24962509 </ ol >
24972510 </ div >
24982511
2499- < div class =example >
2500- < p > The following example styles all site-external links with a dashed
2501- underline.
2502-
2503- < pre > :not(:local-link(0)) { text-decoration-style: dashed; }</ pre >
2504- </ div >
2512+ < p class =issue > Should a < code > :local-link(2)</ code > match a link from the
2513+ document < code > http://example.com/foo</ code > to itself? (This would make
2514+ Style 5 apply to Link 4.) (Relatedly, should a link from a document at an
2515+ opaque URL to itself also match?)
25052516
25062517 < h3 id =the-target-pseudo > < span class =secno > 7.4. </ span > The target
25072518 pseudo-class < a href ="#target-pseudo "> < code > :target</ code > </ a > </ h3 >
0 commit comments