You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-gcpm/Overview.bs
+2-105Lines changed: 2 additions & 105 deletions
Original file line number
Diff line number
Diff line change
@@ -799,115 +799,12 @@ Issue: Now described in [[CSS3-CONTENT]]
799
799
800
800
801
801
<h2 id="cross-references">
802
-
Cross-references
802
+
Cross-references (moved)
803
803
</h2>
804
804
805
-
<!--why is this in gcpm-->
806
-
Many documents contain internal references:
807
-
<ul>
808
-
<li> See chapter 7 </li>
809
-
<li> in section 4.1 </li>
810
-
<li> on page 23 </li>
811
-
</ul>
812
-
Three new values for the content property are used to automatically create these types of cross-references: ''target-counter()'', ''target-counters()'', and ''target-text()''. Each of these displays information obtained from the target end of a link.
813
-
<h3 id="target-counter">
814
-
The ''target-counter()'' function
815
-
</h3>
816
-
The ''target-counter()'' function retrieves the value of the innermost counter with a given name. The required arguments are the url of the target and the name of the counter. An optional counter-style argument can be used to format the result.
817
-
818
-
819
-
<p class="note">These functions only take a fragment URL which points to a location in the current document. If there’s no fragment, if the ID referenced isn't there, or if the URL points to an outside document, the user agent must treat that as an error.</p>
This functions fetches the value of all counters of a given name from the end of a link, and formats them by inserting a given string between the value of each nested counter.
I have not found a compelling example for target-counters() yet.
888
-
</pre>
889
-
890
-
</div>
891
-
892
-
<h3 id="target-text">
893
-
target-text
894
-
</h3>
895
-
The ''target-text()'' function retrieves the text value of the element referred to by the URL. An optional second argument specifies what content is retrieved, using the same values as the 'string-set' property above.
896
-
897
-
<pre class="prod">
898
-
<dfn id="target-text-function">target-text()</dfn> = target-counter( <<url>> [ , [ content | before | after | first-letter] ]? )
899
-
</pre>
900
-
901
-
902
-
<p class="issue">A simpler syntax has been proposed by fantasai: http://lists.w3.org/Archives/Public/www-style/2012Feb/0745.html</p>
903
-
<div class="example">
904
-
<pre>
905
-
…which will be discussed <a href="#chapter_h1_1">later</a>.
805
+
Issue: Now described in [[CSS3-CONTENT]]
906
806
907
-
a::after { content: ", in the chapter entitled " target-text(attr(href url)) }
908
807
909
-
</pre> Result: …which will be discussed later, in the chapter entitled Loomings.
0 commit comments