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: css3-gcpm/Overview.src.html
+51-73Lines changed: 51 additions & 73 deletions
Original file line number
Diff line number
Diff line change
@@ -125,7 +125,7 @@ <h3>Named strings</h3>
125
125
<p>Consider this code:
126
126
127
127
<pre>
128
-
h1 { string-set: title content() }
128
+
h1 { string-set: title contents }
129
129
</pre>
130
130
131
131
<p>Whenever an <code>h1</code> element is encountered,
@@ -187,31 +187,29 @@ <h4>Setting named strings: the 'string-set' property</h4>
187
187
<dt><counter>
188
188
<dd>the counter() or counters() function, as per <ahref="http://www.w3.org/TR/CSS21/syndata.html#counter">CSS 2.1 section 4.3.5</a>
189
189
190
-
<dt><content>
190
+
<dt>contents
191
191
192
-
<dd>the ''content()'' function returns the content of elements and pseudo-elements. The functional notation accepts an optional argument:
193
-
194
-
<dl>
192
+
<dd>The textual content of the element, including the content of its ::before and ::after pseudo-element. The content of the element's descendants, including their respective ::before and ::after pseudo-elements, are included in the returned content.
195
193
196
-
<dt>''content()''
194
+
<dt>content-element
197
195
198
-
<dd>Without any arguments, the function returns the textual content of the element, not including the content of its ::before and ::after pseudo-element. The content of the element's descendants, including their respective ::before and ::after pseudo-elements, are included in the returned content.
196
+
<dd>The textual content of the element, not including the content of its ::before and ::after pseudo-element. The content of the element's descendants, including their respective ::before and ::after pseudo-elements, are included in the returned content.
199
197
200
-
<dt>''content(before)''
198
+
<dt>content-before
201
199
202
-
<dd>The function returns the textual content of the ::before pseudo-element the content of the element.
200
+
<dd>The textual content of the ::before pseudo-element the content of the element.
203
201
204
-
<dt>''content(after)''
202
+
<dt>content-after
205
203
206
-
<dd>The function returns the textual content of the ::after pseudo-element the content of the element.
204
+
<dd>The textual content of the ::after pseudo-element the content of the element.
207
205
208
-
<dt>''content(first-letter)''
206
+
<dt>content-first-letter
209
207
210
-
<dd>The function returns the first letter of the content of the element. The definition of a letter is the same as for :first-letter pseudo-elements.
208
+
<dd>The first letter of the content of the element. The definition of a letter is the same as for :first-letter pseudo-elements.
211
209
212
-
<pclass="note">The expected use for ''content(first-letter)'' is to create one-letter headers, e.g., in dictionaries.</p>
210
+
<pclass="note">The expected use for ''content-first-letter'' is to create one-letter headers, e.g., in dictionaries.</p>
213
211
214
-
<dt>''env()''
212
+
<dt>env()
215
213
216
214
<dd>This function returns data from the local environment of the user at
217
215
the time of formatting. The function accepts one of these keywords:
@@ -264,7 +262,7 @@ <h4>Setting named strings: the 'string-set' property</h4>
dt { string-set: index content(first-letter), term content() }
340
+
dt { string-set: index content-first-letter, term contents }
343
341
</pre>
344
342
</div>
345
343
@@ -348,7 +346,7 @@ <h4>Using named strings</h4>
348
346
<p>In this example, the header in the top center will be blank on pages where 'h1' elements appear. On other pages, the string of the previous 'h1' element will be shown.
@@ -2429,7 +2409,7 @@ <h2>Navigation between pages</h2>
2429
2409
2430
2410
<dl>
2431
2411
2432
-
<dt>link-rel()
2412
+
<dt>go()
2433
2413
2434
2414
<dd>the function takes one argument, which refers to the <tt>rel</tt> attribute of the <tt>link</tt> element
2435
2415
@@ -2439,57 +2419,52 @@ <h2>Navigation between pages</h2>
2439
2419
<link rel=previous href=g3.html>
2440
2420
<link rel=next href=g1.html>
2441
2421
...
2442
-
@-o-navigation {
2443
-
nav-up: link-rel(index);
2444
-
nav-left: link-rel(previous);
2445
-
nav-right: link-rel(next);
2422
+
@navigation {
2423
+
nav-up: go(index);
2424
+
nav-left: go(previous);
2425
+
nav-right: go(next);
2446
2426
}
2447
2427
</pre>
2448
2428
</div>
2449
2429
2450
2430
<pclass=issue>This functionality relies on semantics in HTML and CSS. Other languages may have other other ways to describe such semantics. One possible solution for other languages is "link[rel=index] { nav-up: attr(href) }"
2451
2431
2452
-
<pclass=issue>The "link-rel" name is a bit academic, perhaps the "go()" name can be used instead?
2453
-
2454
-
<dt>go()
2432
+
<dt>''back''
2455
2433
2456
-
<dd>The function takes one argument: <tt>back</tt>, which takes the user one step back in history.
2434
+
<dd>The keyword takes the user one step back in the history of browsed pages.
2457
2435
2458
2436
<divclass=example>
2459
2437
<pre>
2460
2438
@navigation {
2461
-
nav-left: go(back);
2439
+
nav-left: back;
2462
2440
}
2463
2441
</pre>
2464
2442
</div>
2465
2443
2466
-
2467
-
<dt>
2468
-
2469
-
<dt>url-doc()
2444
+
<dt>url()
2470
2445
2471
2446
<dd>The funcation takes one argument: a URL. Relative URLs are
2472
-
relative to the document, not to the style sheet.
2447
+
relative to the style sheet.
2473
2448
2474
2449
<divclass=example>
2475
2450
<pre>
2476
2451
@navigation {
2477
-
nav-up: url-doc(..);
2478
-
nav-down: url-doc(a1.html);
2452
+
nav-up: url(..);
2453
+
nav-down: url(a1.html);
2479
2454
}
2480
2455
</pre>
2481
2456
</div>
2482
2457
2483
-
<dt>url()
2458
+
<dt>url-doc()
2484
2459
2485
-
<dd>The funcation takes one argument: a URL. Relative URLs are
2486
-
relative to the style sheet.
2460
+
<dd>The function is identical to url(), except that relative URLs are
2461
+
relative to the document, not to the style sheet.
2487
2462
2488
2463
<divclass=example>
2489
2464
<pre>
2490
2465
@navigation {
2491
-
nav-up: url(..);
2492
-
nav-down: url(a1.html);
2466
+
nav-up: url-doc(..);
2467
+
nav-down: url-doc(a1.html);
2493
2468
}
2494
2469
</pre>
2495
2470
</div>
@@ -2498,6 +2473,8 @@ <h2>Navigation between pages</h2>
2498
2473
2499
2474
2500
2475
2476
+
2477
+
2501
2478
<divclass=example>
2502
2479
2503
2480
<p>Combined with the <ahref="http://www.w3.org/TR/2011/WD-css3-conditional-20110901/#at-document">@document-rule</a>, navigation maps can be described:
0 commit comments