-
Notifications
You must be signed in to change notification settings - Fork 790
Expand file tree
/
Copy pathOverview.html
More file actions
2515 lines (1705 loc) · 107 KB
/
Overview.html
File metadata and controls
2515 lines (1705 loc) · 107 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>CSS Generated Content for Paged Media Module</title>
<meta content="exploring" name="csswg-work-status">
<meta content="ED" name="w3c-status">
<link href="../default.css" rel="stylesheet" type="text/css">
<link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
body {
background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat white;
background-attachment: fixed;
color: black;
font-family: sans-serif;
margin: 0 auto;
max-width: 50em;
padding: 2em 1em 2em 70px;
}
:link { color: #00C; background: transparent }
:visited { color: #609; background: transparent }
a[href]:active { color: #C00; background: transparent }
a[href]:hover { background: #ffa }
a[href] img { border-style: none }
h1, h2, h3, h4, h5, h6 { text-align: left }
h1, h2, h3 { color: #005A9C; }
h1 { font: 170% sans-serif }
h2 { font: 140% sans-serif }
h3 { font: 120% sans-serif }
h4 { font: bold 100% sans-serif }
h5 { font: italic 100% sans-serif }
h6 { font: small-caps 100% sans-serif }
.hide { display: none }
div.head { margin-bottom: 1em }
div.head h1 { margin-top: 2em; clear: both }
div.head table { margin-left: 2em; margin-top: 2em }
p.copyright { font-size: small }
p.copyright small { font-size: small }
pre { margin-left: 2em }
dt { font-weight: bold }
ul.toc, ol.toc {
list-style: none;
}
</style>
<meta content="Bikeshed 1.0.0" name="generator">
<script defer="" src="//test.csswg.org/harness/annotate.js#css-gcpm-3_dev/css-gcpm-3" type="text/javascript"></script>
</head>
<body class="h-entry">
<div class="head">
<p data-fill-with="logo"><a class="logo" href="http://www.w3.org/">
<img alt="W3C" height="48" src="https://www.w3.org/Icons/w3c_home" width="72">
</a>
</p>
<h1 class="p-name no-ref" id="title">CSS Generated Content for Paged Media Module</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft,
<time class="dt-updated" datetime="2015-07-08">8 July 2015</time></span></h2>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="http://dev.w3.org/csswg/css-gcpm/">http://dev.w3.org/csswg/css-gcpm/</a>
<dt>Previous Versions:
<dd><a href="https://hg.csswg.org/drafts/raw-file/6a5c44d11c2b/css-gcpm/Overview.html" rel="previous">https://hg.csswg.org/drafts/raw-file/6a5c44d11c2b/css-gcpm/Overview.html</a>
<dd><a href="http://www.w3.org/TR/2011/WD-css3-gcpm-20111129/" rel="previous">http://www.w3.org/TR/2011/WD-css3-gcpm-20111129/</a>
<dt>Feedback:
<dd><span><a href="mailto:www-style@w3.org?subject=%5Bcss-gcpm%5D%20YOUR%20TOPIC%20HERE">www-style@w3.org</a> with subject line “<kbd>[css-gcpm] <var>… message topic …</var></kbd>” (<a href="http://lists.w3.org/Archives/Public/www-style/" rel="discussion">archives</a>)</span>
<dt>Test Suite:
<dd><a href="http://test.csswg.org/suites/css-gcpm-3_dev/nightly-unstable/">http://test.csswg.org/suites/css-gcpm-3_dev/nightly-unstable/</a>
<dt>Issue Tracking:
<dd><a href="#issues-index">Inline In Spec</a>
<dd><span><a href="https://www.w3.org/Bugs/Public/enter_bug.cgi?product=CSS&component=Generated%20Content%20for%20Paged%20Media">W3C Bugzilla</a></span>
<dt class="editor">Editor:
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:dave.cramer@hbgusa.com">Dave Cramer</a> (<span class="p-org org">Hachette Livre</span>)
<dt>Former Editor:
<dd>
<dd class="editor p-author h-card vcard"><span class="p-name fn">Håkon Wium Lie</span> (<span class="p-org org">Opera Software</span>)
</dl>
</div>
<div data-fill-with="warning"></div>
<p class="copyright" data-fill-with="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2015 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
</p>
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
<div class="p-summary" data-fill-with="abstract">
<p>Books and other paged media often use special techniques to display information. Content may be moved to or generated for special areas of the page, such as running heads or footnotes. Generated content within pages, such as tab leaders or cross-references, helps readers navigate within and between pages.</p>
<a href="http://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, in speech, etc.</div>
<h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
<div data-fill-with="status">
<p>
This is a public copy of the editors’ draft.
It is provided for discussion only and may change at any moment.
Its publication here does not imply endorsement of its contents by W3C.
Don’t cite this document other than as work in progress.
</p>
<p>
The (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public mailing list
<a href="mailto:www-style@w3.org?Subject=%5Bcss-gcpm%5D%20PUT%20SUBJECT%20HERE">www-style@w3.org</a>
(see <a href="http://www.w3.org/Mail/Request">instructions</a>)
is preferred for discussion of this specification.
When sending e-mail,
please put the text “css-gcpm” in the subject,
preferably like this:
“[css-gcpm] <em>…summary of comment…</em>”
</p>
<p>
This document was produced by the <a href="http://www.w3.org/Style/CSS/members">CSS Working Group</a>
(part of the <a href="http://www.w3.org/Style/">Style Activity</a>).
</p>
<p>
This document was produced by a group operating under
the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>.
W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a>
made in connection with the deliverables of the group;
that page also includes instructions for disclosing a patent.
An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a>
must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>.
</p>
<p>
This document is governed by the <a href="http://www.w3.org/2014/Process-20140801/" id="w3c_process_revision">1 August 2014 W3C Process Document</a>.
</p>
<p>
</p></div>
<div data-fill-with="at-risk"></div>
<h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="content">Table of Contents</span></h2>
<div data-fill-with="table-of-contents" role="navigation">
<ul class="toc" role="directory">
<li><a href="#introduction"><span class="secno"></span> <span class="content">
Introduction
</span></a>
<li><a href="#running-headers-and-footers"><span class="secno">1</span> <span class="content">
Running headers and footers
</span></a>
<ul class="toc">
<li><a href="#named-strings"><span class="secno">1.1</span> <span class="content">
Named strings
</span></a>
<ul class="toc">
<li><a href="#setting-named-strings-the-string-set-pro"><span class="secno">1.1.1</span> <span class="content">
The string-set property
</span></a>
<ul class="toc">
<li><a href="#content-function-header"><span class="secno">1.1.1.1</span> <span class="content">The <span class="css">content()</span> function</span></a>
</ul>
<li><a href="#using-named-strings"><span class="secno">1.1.2</span> <span class="content">
The <span class="css">string()</span> function
</span></a>
</ul>
<li><a href="#running-elements"><span class="secno">1.2</span> <span class="content">
Running elements
</span></a>
<ul class="toc">
<li><a href="#running-syntax"><span class="secno">1.2.1</span> <span class="content">
The <span class="css">running()</span> value
</span></a>
<li><a href="#element-syntax"><span class="secno">1.2.2</span> <span class="content">
The <span class="css">element()</span> value
</span></a>
</ul>
</ul>
<li><a href="#footnotes"><span class="secno">2</span> <span class="content">
Footnotes
</span></a>
<ul class="toc">
<li><a href="#footnote-terms"><span class="secno">2.1</span> <span class="content">Terminology</span></a>
<li><a href="#creating-footnotes"><span class="secno">2.2</span> <span class="content">
Creating footnotes
</span></a>
<li><a href="#footnote-types"><span class="secno">2.3</span> <span class="content">
Types of footnotes
</span></a>
<li><a href="#footnote-area"><span class="secno">2.4</span> <span class="content">
The footnote area
</span></a>
<ul class="toc">
<li><a href="#footnote-area-position"><span class="secno">2.4.1</span> <span class="content">Positioning of the footnote area</span></a>
<li><a href="#footnote-area-size"><span class="secno">2.4.2</span> <span class="content">Size of the footnote area</span></a>
</ul>
<li><a href="#footnote-counters"><span class="secno">2.5</span> <span class="content">The Footnote Counter</span></a>
<ul class="toc">
<li><a href="#footnote-counter-values"><span class="secno">2.5.1</span> <span class="content">Values of the footnote counter</span></a>
<li><a href="#resetting-footnote-counter"><span class="secno">2.5.2</span> <span class="content">Resetting the footnote counter</span></a>
</ul>
<li><a href="#footnote-call"><span class="secno">2.6</span> <span class="content">
The <code>footnote-call</code> pseudo-element
</span></a>
<li><a href="#footnote-marker"><span class="secno">2.7</span> <span class="content">
The <code>footnote-marker</code> pseudo-element
</span></a>
<li><a href="#footnote-policy"><span class="secno">2.8</span> <span class="content">
Rendering footnotes and <code>footnote policy</code>
</span></a>
<li><a href="#future"><span class="secno">2.9</span> <span class="content">
Future directions
</span></a>
</ul>
<li><a href="#the-first-page-pseudo-element"><span class="secno">3</span> <span class="content">
Selecting Pages
</span></a>
<ul class="toc">
<li><a href="#document-page-selectors"><span class="secno">3.1</span> <span class="content">
Page Selectors
</span></a>
<li><a href="#document-sequence-selectors"><span class="secno">3.2</span> <span class="content">
Page groups
</span></a>
</ul>
<li><a href="#leaders"><span class="secno">4</span> <span class="content">
Leaders
</span></a>
<ul class="toc">
<li><a href="#rendering-leaders"><span class="secno">4.1</span> <span class="content">
Rendering leaders
</span></a>
<ul class="toc">
<li><a href="#procedure-leader"><span class="secno">4.1.1</span> <span class="content">
Procedure for rendering leaders
</span></a>
</ul>
</ul>
<li><a href="#cross-references"><span class="secno">5</span> <span class="content">
Cross-references
</span></a>
<ul class="toc">
<li><a href="#target-counter"><span class="secno">5.1</span> <span class="content">
The <span class="css">target-counter()</span> function
</span></a>
<li><a href="#target-counters"><span class="secno">5.2</span> <span class="content">
The <span class="css">target-counters()</span> function
</span></a>
<li><a href="#target-text"><span class="secno">5.3</span> <span class="content">
target-text
</span></a>
</ul>
<li><a href="#bookmarks"><span class="secno">6</span> <span class="content">
Bookmarks
</span></a>
<ul class="toc">
<li><a href="#bookmark-level"><span class="secno">6.1</span> <span class="content">
bookmark-level
</span></a>
<li><a href="#bookmark-label"><span class="secno">6.2</span> <span class="content">
bookmark-label
</span></a>
<li><a href="#bookmark-state"><span class="secno">6.3</span> <span class="content">
bookmark-state
</span></a>
</ul>
<li><a href="#former-wd-sections"><span class="secno"></span> <span class="content">Appendix A: Where Are They Now?</span></a>
<ul class="toc">
<li><a href="#page-marks-and-bleed-area"><span class="secno"></span> <span class="content">Page marks and bleed area</span></a>
<li><a href="#cmyk-colors"><span class="secno"></span> <span class="content">CMYK colors</span></a>
<li><a href="#styling-blank-pages"><span class="secno"></span> <span class="content">Styling blank pages</span></a>
<li><a href="#paged-presentations"><span class="secno"></span> <span class="content">Paged presentations</span></a>
<li><a href="#navigation-between-pages"><span class="secno"></span> <span class="content">Navigation between pages</span></a>
<li><a href="#page-floats"><span class="secno"></span> <span class="content">Page floats</span></a>
<li><a href="#selecting-columns-and-pages"><span class="secno"></span> <span class="content">Selecting columns and pages</span></a>
</ul>
<li><a href="#ua-stylesheet"><span class="secno"></span> <span class="content">Appendix B: Default UA Stylesheet</span></a>
<li><a href="#changes"><span class="secno"></span> <span class="content">Appendix C: Changes</span></a>
<li><a href="#acknowledgments"><span class="secno"></span> <span class="content">
Acknowledgments
</span></a>
<li><a href="#conformance"><span class="secno"></span> <span class="content">
Conformance</span></a>
<ul class="toc">
<li><a href="#conventions"><span class="secno"></span> <span class="content">
Document conventions</span></a>
<li><a href="#conformance-classes"><span class="secno"></span> <span class="content">
Conformance classes</span></a>
<li><a href="#partial"><span class="secno"></span> <span class="content">
Partial implementations</span></a>
<li><a href="#experimental"><span class="secno"></span> <span class="content">
Experimental implementations</span></a>
<li><a href="#testing"><span class="secno"></span> <span class="content">
Non-experimental implementations</span></a>
</ul>
<li><a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
<ul class="toc">
<li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
<li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
</ul>
<li><a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ul class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ul>
<li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
</ul></div>
<main>
<h2 class="no-num heading settled" id="introduction"><span class="content">
Introduction
</span></h2>
<p>Paged media have many <a href="http://w3c.github.io/dpub-pagination/index.html">special requirements</a> for the display of document content, which have evolved over the long history of printed books. Running headers and footers function as aids to navigation. Notes may appear at the bottom of the page, as footnotes. The properties of pages themselves may change based on their content or position in the document. Leaders visually connect related content. Cross-references may require generated text. Some paged media formats such as PDF use bookmarks for navigation.</p>
<p>This module defines new properties and values, so that authors may bring these techniques to paged media.</p>
<h2 class="heading settled" data-level="1" id="running-headers-and-footers"><span class="secno">1. </span><span class="content">
Running headers and footers
</span><a class="self-link" href="#running-headers-and-footers"></a></h2>
<a data-link-type="biblio" href="#biblio-css3page">[CSS3PAGE]</a> describes the sixteen page margin boxes which can be used for running headers and footers, but does not describe a mechanism for inserting content in those boxes. This module provides two methods for for doing so. <dfn data-dfn-type="dfn" data-lt="named string" data-noexport="" id="named-string">Named strings<a class="self-link" href="#named-string"></a></dfn> copy text for reuse in margin boxes. <dfn data-dfn-type="dfn" data-noexport="" id="running-elements0">Running elements<a class="self-link" href="#running-elements0"></a></dfn> move elements (complete with style and structure) from the document to margin boxes.
<h3 class="heading settled" data-level="1.1" id="named-strings"><span class="secno">1.1. </span><span class="content">
Named strings
</span><a class="self-link" href="#named-strings"></a></h3>
The <a class="property" data-link-type="propdesc" href="#propdef-string-set">string-set</a> property copies the text content of an element into a <span class="css">named string</span>, which functions as a variable. The text content of this named string can be retrieved using the <a class="css" data-link-type="maybe" href="#funcdef-string">string()</a> function. Since these variables may change on a given page, an optional second value for the <a class="css" data-link-type="maybe" href="#funcdef-string">string()</a> function allows authors to choose which value on a page is used.
<h4 class="heading settled" data-level="1.1.1" id="setting-named-strings-the-string-set-pro"><span class="secno">1.1.1. </span><span class="content">
The string-set property
</span><a class="self-link" href="#setting-named-strings-the-string-set-pro"></a></h4>
<table class="definition propdef" data-link-for-hint="<dfn id="string-set">string-set</dfn>">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-string-set">string-set<a class="self-link" href="#propdef-string-set"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod">[[ <a class="production css" data-link-type="type" href="http://dev.w3.org/csswg/css-values-3/#identifier-value"><custom-ident></a> <a class="production css" data-link-type="type" href="http://dev.w3.org/csswg/css-content-3/#typedef-content-list" title="Expands to: <string>
| no-open-quote
| no-close-quote
| leader()
| close-quote
| document-url
| open-quote
| <datetime>
| contents
"><content-list></a>] [<a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-comma">,</a> <a class="production css" data-link-type="type" href="http://dev.w3.org/csswg/css-values-3/#identifier-value" title="Expands to: "><custom-ident></a> <a class="production css" data-link-type="type" href="http://dev.w3.org/csswg/css-content-3/#typedef-content-list" title="Expands to: <string>
| no-open-quote
| no-close-quote
| leader()
| close-quote
| document-url
| open-quote
| <datetime>
| contents
"><content-list></a>]<a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#mult-zero-plus">*</a> ] <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> none
<tr>
<th>Initial:
<td>none
<tr>
<th>Applies to:
<td>all elements, but not pseudo-elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>all
<tr>
<th>Computed value:
<td>specified value
<tr>
<th>Animatable:
<td>no</table>
<p>The <a class="property" data-link-type="propdesc" href="#propdef-string-set">string-set</a> property contains one or more pairs, each consisting of an custom identifier (the name of the named string) followed by a <span class="css">content-list</span> describing how to construct the value of the named string.</p>
<p><span class="css">content-list</span> expands to one or more of the following values, in any order.</p>
<pre class="prod"><dfn data-dfn-type="dfn" data-noexport="" id="content-list">content-list<a class="self-link" href="#content-list"></a></dfn> = [ <string> <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> <counter()> <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> <counters()> <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> <content()> <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> attr(<identifier>) ]<a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#mult-one-plus">+</a>
</pre>
<dl>
<dt> <string>
<dd> A <a href="http://www.w3.org/TR/CSS21/syndata.html#strings">string</a>, as defined in <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>
<dt> <counter()>
<dd> A <a href="http://www.w3.org/TR/CSS21/syndata.html#counter">counter()</a> function, as described in <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>.
<dt> <counters()>
<dd> A <a href="http://www.w3.org/TR/CSS21/syndata.html#counter">counters()</a> function, as described in <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>.
<dt>content()
<dd>The <a class="css" data-link-type="maybe" href="#funcdef-content">content()</a> function, described below.
<dt>attr(<identifier>)
<dd>Returns the string value of the attribute <identifier>, as defined in <a data-link-type="biblio" href="#biblio-css3val">[CSS3VAL]</a>
</dl>
<h5 class="heading settled" data-level="1.1.1.1" id="content-function-header"><span class="secno">1.1.1.1. </span><span class="content">The <a class="css" data-link-type="maybe" href="#funcdef-content">content()</a> function</span><a class="self-link" href="#content-function-header"></a></h5>
<pre class="prod"><dfn data-dfn-type="function" data-export="" id="funcdef-content">content()<a class="self-link" href="#funcdef-content"></a></dfn> = content([text <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> before <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> after <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> first-letter ])
</pre>
<p class="issue" id="issue-edcf4ca2"><a class="self-link" href="#issue-edcf4ca2"></a>How do we define the default value for this function?</p>
<dl>
<dt>text
<dd>The string value of the element, determined as if <code>white-space: normal</code> had been set. This is the default value
<dt>before
<dd>The string value of the <code>::before</code> pseudo-element, determined as if <code>white-space: normal</code> had been set.
<dt>after
<dd>The string value of the <code>::after</code> pseudo-element, determined as if <code>white-space: normal</code> had been set.
<dt>first-letter
<dd>The first letter of the element, as defined for the <code><a href="http://www.w3.org/TR/css3-selectors/#first-letter">::first-letter</a></code> pseudo-element
</dl>
<p>The content values of named strings are assigned at the point when the content box of the element is first created (or would have been created if the element’s display value is none). The <dfn data-dfn-type="dfn" data-noexport="" id="entry-value">entry value<a class="self-link" href="#entry-value"></a></dfn> for a page is the assignment in effect at the end of the previous page. The <dfn data-dfn-type="dfn" data-noexport="" id="exit-value">exit value<a class="self-link" href="#exit-value"></a></dfn> for a page is the assignment in effect at the end of the current page.</p>
<p>Whenever the value of the element changes, the value of the named string(s) is updated. User agents must be able to recall many values of the named string, as the <a class="css" data-link-type="maybe" href="#funcdef-string">string()</a> function can return past, current, or future values of the assignment.</p>
<div class="example" id="example-1b55c0e6"><a class="self-link" href="#example-1b55c0e6"></a>
<p>HTML:</p>
<pre><h1>Loomings</h1>
</pre>
<p>CSS:</p>
<pre>h1::before { content: 'Chapter ' counter(chapter); }
h1 { string-set: header content(before) ':' content(text); }
h1::after { content: '.'; }
</pre>
<p>The value of the named string “header” will be “Chapter 1: Loomings”.</p>
</div>
<div class="example" id="example-c8b3be96"><a class="self-link" href="#example-c8b3be96"></a>
HTML:
<pre><section title="Loomings">
</pre>
<p>CSS:</p>
<pre>section { string-set: header attr(title) }
</pre>
<p>The value of the “header” string will be “Loomings”.</p>
</div>
<h4 class="heading settled" data-level="1.1.2" id="using-named-strings"><span class="secno">1.1.2. </span><span class="content">
The <a class="css" data-link-type="maybe" href="#funcdef-string">string()</a> function
</span><a class="self-link" href="#using-named-strings"></a></h4>
The <a class="css" data-link-type="maybe" href="#funcdef-string">string()</a> function is used to copy the value of a named string to the document, via the <a class="property" data-link-type="propdesc" href="http://dev.w3.org/csswg/css-content-3/#propdef-content">content</a> property. This function requires one argument, the name of the named string. Since the value of a named string may change several times on a page (as new instances of the element defining the string appear) an optional second argument indicates which value of the named string should be used.
<pre class="prod"><dfn data-dfn-type="function" data-export="" id="funcdef-string">string()<a class="self-link" href="#funcdef-string"></a></dfn> = string( <a class="production" data-link-type="type" href="http://dev.w3.org/csswg/css-values-3/#identifier-value" title="Expands to: "><custom-ident></a> [ <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-comma">,</a> [ first <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> start <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> last <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> first-except] ]<a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#mult-opt">?</a> )
</pre>
<p>The second argument of the <a class="css" data-link-type="maybe" href="#funcdef-string">string()</a> function is one of the following keywords:</p>
<dl>
<dt id="string-first"><a class="self-link" href="#string-first"></a>first
<dd>The value of the first assignment on the page is used. If there is no assignment on the page, the <span class="css">entry value</span> is used. <code>first</code> is the default value.
<dt id="string-start"><a class="self-link" href="#string-start"></a>start
<dd>If the element is the first element on the page, the value of the first assignment is used. Otherwise the <span class="css">entry value</span> is used. The <span class="css">entry value</span> may be empty if the element hasn’t yet appeared.
<dt id="string-last"><a class="self-link" href="#string-last"></a>last
<dd>The <span class="css">exit value</span> of the named string is used.
<dt id="string-first-except"><a class="self-link" href="#string-first-except"></a>first-except
<dd>This is identical to <code>first</code>, except that the empty string is used on the page where the value is assigned.
</dl>
<div class="example" id="example-a618b54f"><a class="self-link" href="#example-a618b54f"></a>
CSS:
<pre>@page {
size: 15cm 10cm;
margin: 1.5cm;
@top-left {
content: "first: " string(heading, first);
}
@top-center {
content: "start: " string(heading, start);
}
@top-right {
content: "last: " string(heading, last);
}
}
h2 { string-set: heading content() }
</pre>
<p>The following figures show the first, start, and last assignments of the “heading” string on various pages.</p>
<figure>
<img alt="" src="images/using-strings-1.jpg" width="480">
<figcaption>The <a href="#string-start">start</a> value is empty, as the string had not yet been set at the start of the page.</figcaption>
</figure>
<figure>
<img alt="" src="images/using-strings-2.jpg" width="480">
<figcaption>Since the page starts with an h2, the <a href="#string-start">start</a> value is the value of that head.</figcaption>
</figure>
<figure>
<img alt="" src="images/using-strings-3.jpg" width="480">
<figcaption>Since there’s not an h2 at the top of this page, the <a href="#string-start">start</a> value is the <span class="css">exit value</span> of the previous page.</figcaption>
</figure>
</div>
<h3 class="heading settled" data-level="1.2" id="running-elements"><span class="secno">1.2. </span><span class="content">
Running elements
</span><a class="self-link" href="#running-elements"></a></h3>
Many headers and footers cannot be represented only by unformatted text. A book title serving as a running head may contain an italic word, for example. A mechanism is needed to move or copy elements into margin boxes. To do this, we add the <a class="css" data-link-type="maybe" href="#funcdef-running">running()</a> value to the position property, and the <a class="css" data-link-type="maybe" href="#funcdef-element">element()</a> value to the content property.
<div class="example" id="example-12384fa7"><a class="self-link" href="#example-12384fa7"></a>
<pre>@page {
@top { content: element(header); }
}
h1 { position: running(header); }
</pre>
<p>In this example, the <code>h1</code> element is placed in the <code>@top</code> margin box, complete with formatting and any descendant elements. It does not display in the normal document flow.</p>
</div>
<h4 class="heading settled" data-level="1.2.1" id="running-syntax"><span class="secno">1.2.1. </span><span class="content">
The <a class="css" data-link-type="maybe" href="#funcdef-running">running()</a> value
</span><a class="self-link" href="#running-syntax"></a></h4>
<p><code>position: running(custom-ident)</code> removes the element (and associated ::before and ::after pseudo-elements) from the normal flow, and makes it available to place in a page margin box using <a class="css" data-link-type="maybe" href="#funcdef-element">element()</a>. The element inherits from its original position in the document, but does not display there.</p>
<table class="definition propdef partial" data-link-for-hint="position">
<tbody>
<tr>
<th>Name:
<td><a class="css" data-link-type="property" href="http://dev.w3.org/csswg/css-position-3/#propdef-position">position</a>
<tr class="value">
<th>New values:
<td class="prod">running()
<tr>
<th>Media:
<td>paged</table>
<pre class="prod"><dfn data-dfn-type="function" data-export="" id="funcdef-running">running()<a class="self-link" href="#funcdef-running"></a></dfn> = string( <a class="production" data-link-type="type" href="http://dev.w3.org/csswg/css-values-3/#identifier-value" title="Expands to: "><custom-ident></a> )
</pre>
<p></p>
<div class="example" id="example-a367e223"><a class="self-link" href="#example-a367e223"></a>
<p>HTML:</p>
<pre><p class="rh"><i>Miranda v. Arizona</i> in Context</p>
<h2><i>Miranda v. Arizona</i> in Context</h2>
</pre>
<p>CSS:</p>
<pre>@top-center {
content: element(heading);
}
p.rh {
position: running(heading);
}
p.rh::before {
content: counter(page) ' / ';
}
</pre>
<figure>
<p><img alt="running header using running elements" src="images/running-element-gcpm_Page_1.jpg" width="480"></p>
<figcaption>Running element in page margin box</figcaption>
</figure>
</div>
<p class="note" role="note">The element <span class="css">value()</span> can only be used in page margin boxes. And it cannot be combined with other possible values for the content property.</p>
<div class="issue" id="issue-35d19bf4"><a class="self-link" href="#issue-35d19bf4"></a>
<p>This idea would be much more useful if we could also copy (rather than just move) elements. That would avoid the duplication of HTML in the example above.
</p>
<p>Bert Bos has proposed an alternative syntax, which allows both moving and copying elements into running heads. In the example below, h2 elements appear in their normal place in the document, but are also copied into running heads.</p>
<div class="example" id="example-48f9547b"><a class="self-link" href="#example-48f9547b"></a>
<pre>h2 {
display: block;
running: chapter;
font-size: 18pt;
font-weight: bold;
}
h2:running {
display: inline;
font-size: 11pt;
font-weight: normal;
font-variant: small-caps;
letter-spacing: 1pt;
}
@page {
@top-center {
content: element(chapter);
}
}
</pre>
</div>
<table class="definition propdef" data-link-for-hint="<dfn id="running-property">running</dfn>">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-running">running<a class="self-link" href="#propdef-running"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod"><a class="production css" data-link-type="type" href="http://dev.w3.org/csswg/css-values-3/#identifier-value" title="Expands to: "><custom-ident></a>
<tr>
<th>Initial:
<td>none
<tr>
<th>Applies to:
<td>elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>all
<tr>
<th>Computed value:
<td>specified value
<tr>
<th>Animatable:
<td>no</table>
</div>
<h4 class="heading settled" data-level="1.2.2" id="element-syntax"><span class="secno">1.2.2. </span><span class="content">
The <a class="css" data-link-type="maybe" href="#funcdef-element">element()</a> value
</span><a class="self-link" href="#element-syntax"></a></h4>
<p>The <a class="css" data-link-type="maybe" href="#funcdef-element">element()</a> value of the content property places an element (which has been removed from the normal flow via <a class="css" data-link-type="maybe" href="#funcdef-running">running()</a>) in a page margin box. Whenever the value of the element changes, the value of <a class="css" data-link-type="maybe" href="#funcdef-element">element()</a> is updated.</p>
<p>Just as with <a class="css" data-link-type="maybe" href="#funcdef-string">string()</a>, <a class="css" data-link-type="maybe" href="#funcdef-element">element()</a> takes an optional keyword to describe which value should be used in the case of multiple assignments on a page. User agents must be able to recall many values, as <a class="css" data-link-type="maybe" href="#funcdef-element">element()</a> can return past, current, or future values of the assignment.</p>
<table class="definition propdef partial" data-link-for-hint="content">
<tbody>
<tr>
<th>Name:
<td><a class="css" data-link-type="property" href="http://dev.w3.org/csswg/css-content-3/#propdef-content">content</a>
<tr class="value">
<th>New values:
<td class="prod">element()
<tr>
<th>Media:
<td>paged</table>
<pre class="prod"><dfn data-dfn-type="function" data-export="" id="funcdef-element">element()<a class="self-link" href="#funcdef-element"></a></dfn> = string( <a class="production" data-link-type="type" href="http://dev.w3.org/csswg/css-values-3/#identifier-value" title="Expands to: "><custom-ident></a> [ <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-comma">,</a> [ first <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> start <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> last <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> first-except] ]<a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#mult-opt">?</a> )
</pre>
<h2 class="heading settled" data-level="2" id="footnotes"><span class="secno">2. </span><span class="content">
Footnotes
</span><a class="self-link" href="#footnotes"></a></h2>
Ancillary content may be moved to the bottom or side of a page. A footnote is created when such content moves to the bottom of the page, leaving a reference indicator.
<h3 class="heading settled" data-level="2.1" id="footnote-terms"><span class="secno">2.1. </span><span class="content">Terminology</span><a class="self-link" href="#footnote-terms"></a></h3>
<p>Footnotes are complex objects (see the <a href="http://www.w3.org/TR/2014/WD-dpub-latinreq-20140313/#footnotes">footnote section</a> at <a data-link-type="biblio" href="#biblio-dpub-latinreq">[dpub-latinreq]</a>), so it will be helpful to define some terms before proceeding.</p>
<figure>
<p><img alt="page with footnotes" src="images/footnote-diagram.001.jpg" width="480"></p>
<figcaption>Footnote terminology</figcaption>
</figure>
<dl>
<dt>footnote element
<dd>The element containing the content of the footnote, which will be removed from the flow and displayed as a footnote.
<dt>footnote marker (also known as footnote number)
<dd>A number or symbol adjacent to the footnote body, identifying the particular footnote. The footnote marker should use the same number or symbol as the corresponding footnote call, although the marker may contain additional punctuation.
<dt>footnote body
<dd>The footnote marker is placed before the footnote element, and together they represent the footnote body, which will be placed in the footnote area.
<dt>footnote call (also known as footnote reference)
<dd>A number or symbol, found in the main text, which points to the footnote body.
<dt>footnote area
<dd>The page area used to display footnotes.
<dt>footnote rule (also known as footnote separator)
<dd>A horizontal rule is often used to separate the footnote area from the rest of the page. The separator (and the entire footnote area) cannot be rendered on a page with no footnotes.
</dl>
<h3 class="heading settled" data-level="2.2" id="creating-footnotes"><span class="secno">2.2. </span><span class="content">
Creating footnotes
</span><a class="self-link" href="#creating-footnotes"></a></h3>
An element becomes a footnote by applying <code>float: footnote</code> to that element. This triggers the following actions:
<ol>
<li> The footnote element is removed from the flow, and a <code>::footnote-call</code> pseudo-element is inserted in its place, which serves as a reference to the footnote.
<li> A <code>::footnote-marker</code> pseudo-element, identifying the footnote, is placed at the beginning of the footnote element. Together this is the footnote body.
<li>The <span class="css">footnote counter</span> is incremented.
<li>The footnote body is placed in the footnote area at the bottom of the page. Footnote elements from a given page are placed in the footnote area of that page in document order.
</ol>
<div class="example" id="example-9704e8b4"><a class="self-link" href="#example-9704e8b4"></a>
HTML:
<pre style="word-wrap: break-word; white-space: pre-wrap;"><p>Though the body was erect, the head was thrown back so that the closed eyes were pointed towards the needle of the tell-tale that swung from a beam in the ceiling.<span class="footnote">The cabin-compass is called the tell-tale, because without going to the compass at the helm, the Captain, while below, can inform himself of the course of the ship.</span></p>
</pre>
<p>CSS:</p>
<pre>@page {
@footnote {
float: bottom;
}
}
span.footnote { float: footnote; }
</pre>
</div>
<p class="issue" id="issue-4af1f674"><a class="self-link" href="#issue-4af1f674"></a>Why is float:bottom used with the footnote area? Floating footnotes to the footnote area, and then floating the footnote area itself, seems overly complex, given that implementations don’t allow the footnote area to float anywhere else. Note that some implementations do allow the footnote area to be absolutely positioned.</p>
<h3 class="heading settled" data-level="2.3" id="footnote-types"><span class="secno">2.3. </span><span class="content">
Types of footnotes
</span><a class="self-link" href="#footnote-types"></a></h3>
The following new value of the <a class="property" data-link-type="propdesc" href="http://dev.w3.org/csswg/css2/visuren.html#propdef-float">float</a> property creates a footnote element:
<table class="definition propdef partial" data-link-for-hint="float">
<tbody>
<tr>
<th>Name:
<td><a class="css" data-link-type="property" href="http://dev.w3.org/csswg/css2/visuren.html#propdef-float">float</a>
<tr class="value">
<th>New values:
<td class="prod">footnote
<tr>
<th>Media:
<td>paged</table>
<dl>
<dt><dfn class="css" data-dfn-for="float" data-dfn-type="value" data-export="" id="valdef-float-footnote">footnote<a class="self-link" href="#valdef-float-footnote"></a></dfn>
<dd>each footnote element is placed in the footnote area of the page
</dl>
<p>The <a class="property" data-link-type="propdesc" href="#propdef-footnote-display">footnote-display</a> property determines whether a footnote is displayed as a block element or inline element.</p>
<table class="definition propdef" data-link-for-hint="<dfn id="propdef-footnote-display">footnote-display</dfn>">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-footnote-display">footnote-display<a class="self-link" href="#propdef-footnote-display"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod">block <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> inline <a data-link-type="grammar" href="http://dev.w3.org/csswg/css-values-3/#comb-one">|</a> compact
<tr>
<th>Initial:
<td>block
<tr>
<th>Applies to:
<td>elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>paged
<tr>
<th>Computed value:
<td>specified value
<tr>
<th>Animatable:
<td>no</table>
<dl>
<dt><dfn class="css" data-dfn-for="propdef-footnote-display" data-dfn-type="value" data-export="" id="footnote-display-block">block<a class="self-link" href="#footnote-display-block"></a></dfn>
<dd>The footnote element is placed in the footnote area as a block element
<dt><dfn class="css" data-dfn-for="propdef-footnote-display" data-dfn-type="value" data-export="" id="footnote-display-inline">inline<a class="self-link" href="#footnote-display-inline"></a></dfn>
<dd>The footnote element is placed in the footnote area as an inline element
<dt><dfn class="css" data-dfn-for="propdef-footnote-display" data-dfn-type="value" data-export="" id="footnote-display-compact">compact<a class="self-link" href="#footnote-display-compact"></a></dfn>