@@ -237,14 +237,19 @@ Selectors Overview</h2>
237
237
of which the target is already visited
238
238
<td> [[#link]]
239
239
<td> 1
240
+ <tr>
241
+ <td><code> E:local-link</code>
242
+ <td> an E element being the source anchor of a hyperlink
243
+ targetting the current URL
244
+ <td> [[#the-local-link-pseudo]]
240
245
<tr>
241
246
<td><code> E:target</code>
242
- <td> an E element being the target of the referring URL
247
+ <td> an E element being the target of the current URL
243
248
<td> [[#the-target-pseudo]]
244
249
<td> 3
245
250
<tr>
246
251
<td><code> E:target-within</code>
247
- <td> an E element that is the target of the referring URL or contains an element that does.
252
+ <td> an E element that is the target of the current URL or contains an element that does.
248
253
<td> [[#the-target-within-pseudo]]
249
254
<td> 4
250
255
<tr>
@@ -1976,6 +1981,39 @@ The Link History Pseudo-classes: '':link'' and '':visited''</h3>
1976
1981
or implement other measures to preserve the user's privacy
1977
1982
while rendering visited and unvisited links differently.
1978
1983
1984
+ <h3 id="the-local-link-pseudo">
1985
+ The Local Link Pseudo-class: '':local-link''</h3>
1986
+
1987
+ The <dfn id='local-link-pseudo'>:local-link</dfn> pseudo-class
1988
+ allows authors to style <a href="#the-any-link-pseudo">hyperlinks</a>
1989
+ based on the users current location within a site.
1990
+ It represents an element that is
1991
+ the source anchor of a hyperlink whose target's absolute URL
1992
+ matches the element's own document URL.
1993
+ If the hyperlink's target includes a fragment URL,
1994
+ then the fragment URL of the current URL must also match;
1995
+ if it does not, then the fragment URL portion of the current URL
1996
+ is not taken into account in the comparison.
1997
+
1998
+ <div class="example">
1999
+ For example, the following rule prevents links targetting the
2000
+ current page from being underlined when they are part of the
2001
+ navigation list:
2002
+
2003
+ <pre> nav :local-link { text-decoration: none; } </pre>
2004
+ </div>
2005
+
2006
+ Note: The current URL of a page can change as a result of user actions
2007
+ such as activating a link targetting a different fragment within the same page;
2008
+ or by use of the <code> pushState</code> API;
2009
+ as well as by the more obvious actions of navigating to a different page
2010
+ or following a redirect (which could be initiated by protocols such as HTTP,
2011
+ markup instructions such as <code> <meta http-equiv="..."></code> ,
2012
+ or scripting instructions <!-- such as ? -->).
2013
+ UAs must ensure that '':local-link'' ,
2014
+ as well as the '':target'' and '':target-within'' pseudo-classes below,
2015
+ respond correctly to all such changes in state.
2016
+
1979
2017
<h3 id="the-target-pseudo">
1980
2018
The Target Pseudo-class: '':target''</h3>
1981
2019
@@ -3748,8 +3786,10 @@ Changes</h2>
3748
3786
3749
3787
Issue: Do we have implementations of this? If not, maybe it's better to keep the restriction for level 4?
3750
3788
<li> Defined <a>specificity</a> of a <a>selector list</a> . (Why?)
3751
- <li> Required quotes around '':lang()'' values involving an asterisk.
3752
- <li> Removed the <css> :local-link</css> and reference combinator for lack of interest.
3789
+ <li> Required quotes around '':lang()'' values involving an asterisk;
3790
+ only language codes which happen to bhe CSS identifiers can be used unquoted.
3791
+ <li> Changed the <css> :local-link</css> pseudo-class to account for fragment URLs.
3792
+ <li> Removed the <code> :local-link()</code> pseudo-class and reference combinator for lack of interest.
3753
3793
</ul>
3754
3794
3755
3795
0 commit comments