Skip to content

Commit 9a76437

Browse files
author
howcome
committed
revising description of string-set; revising examples
1 parent dec67f0 commit 9a76437

1 file changed

Lines changed: 87 additions & 3 deletions

File tree

css-gcpm/Overview.src.html

Lines changed: 87 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
.example { background: #ddd }
1414
body { line-height: 1.3 }
1515
.unimplemented { background: #fdd }
16+
17+
table.string-set-example { font-family: monospace; border-collapse: collapse }
18+
table.string-set-example div.pre {
19+
width: 12em; white-space: pre;
20+
}
21+
table.string-set-example td {
22+
padding: 0.3em;
23+
border: thin solid black
24+
}
1625
</style>
1726

1827

@@ -339,11 +348,11 @@ <h4>Using named strings</h4>
339348
on the ''string()'' value. This argument can have one of four keywords:
340349

341350
<ul>
342-
<li>''first'': the value of the first assignment on the page is used. If there is no assignment on the page, the named string's carryover value is used. This is the default value.
351+
<li>''first'': the value of the first assignment on the page is used. If there is no assignment on the page, the named string's entry value is used. The entry value is the value held by the string at the end of the previous page. ''first'' is the default value.
343352

344-
<li>''start'': the value of the first assignment on the page is used if the element begins the page. Otherwise, the named string's carryover value is used.
353+
<li>''start'': the value of the first assignment on the page is used if the element begins the page or the named string has not been assigned a value. Otherwise, the named string's entry value is used.
345354

346-
<li>''last'': the named string's exit value for that page is used
355+
<li>''last'': the named string's exit value is used
347356

348357
<li>''first-except'': similar to ''first'', except on the page where the value was assigned. On that page, the empty string is used.
349358

@@ -361,6 +370,81 @@ <h4>Using named strings</h4>
361370
</pre>
362371
</div>
363372

373+
<div class="example">
374+
375+
<p>Given this CSS code:
376+
377+
<pre>
378+
h2 { string-set: header content }
379+
</pre>
380+
381+
<p>The value of the "header" string
382+
383+
<table class=string-set-example>
384+
<tr>
385+
<td>page#<td>HTML code<td>first<td>start<td>last<td>first-except
386+
387+
<tr>
388+
<td>1
389+
<td>
390+
<div class=pre>&lt;h1>Continents&lt;/h1>
391+
...
392+
&lt;h2>Africa&lt;/h2>
393+
...
394+
...
395+
</div>
396+
<td>Africa
397+
<td>Africa
398+
<td>Africa
399+
<td>
400+
401+
402+
<tr>
403+
<td>2
404+
<td>
405+
<div class=pre>...
406+
&lt;h2>Americas&lt;/h2>
407+
...
408+
&lt;h2>Asia&lt;/h2>
409+
...
410+
</div>
411+
<td>Americas
412+
<td>Africa
413+
<td>Asia
414+
<td>
415+
416+
417+
<tr>
418+
<td>3
419+
<td>
420+
<div class=pre>...
421+
...
422+
...
423+
...
424+
</div>
425+
<td>Asia
426+
<td>Asia
427+
<td>Asia
428+
<td>Asia
429+
430+
<tr>
431+
<td>4
432+
<td>
433+
<div class=pre>&lt;h2>Europe&lt;/h2>
434+
...
435+
&lt;h2>Oceania&lt;/h2>
436+
..
437+
438+
</div>
439+
<td>Europe
440+
<td>Europe
441+
<td>Oceania
442+
<td>
443+
</table>
444+
445+
</div>
446+
447+
364448
<div class="example">
365449
<p>In this example, the term that is being described at the start of the page is shown in the top left header.
366450
<pre>

0 commit comments

Comments
 (0)