CSS Generated Content for Paged Media Module

W3C Working Draft,

More details about this document
This version:
https://www.w3.org/TR/2024/WD-css-gcpm-3-20240122/
Latest published version:
https://www.w3.org/TR/css-gcpm-3/
Editor's Draft:
https://drafts.csswg.org/css-gcpm/
History:
https://www.w3.org/standards/history/css-gcpm-3/
Feedback:
CSSWG Issues Repository
Inline In Spec
Editors:
(BFO)
(Google)
Former Editors:
(Hachette Livre)
Håkon Wium Lie (Opera Software)
Suggest an Edit for this Spec:
GitHub Editor

Abstract

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.

CSS is a language for describing the rendering of structured documents (such as HTML and XML) on screen, on paper, etc.

Status of this document

This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.

This document was published by the CSS Working Group as a Working Draft using the Recommendation track. Publication as a Working Draft does not imply endorsement by W3C and its Members.

This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

Please send feedback by filing issues in GitHub (preferred), including the spec code “css-gcpm” in the title, like this: “[css-gcpm] …summary of comment…”. All issues and comments are archived. Alternately, feedback can be sent to the (archived) public mailing list www-style@w3.org.

This document is governed by the 03 November 2023 W3C Process Document.

This document was produced by a group operating under the W3C Patent Policy. W3C maintains a public list of any patent disclosures 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 Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

Introduction

Paged media have many special requirements 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.

This module defines new properties and values, so that authors may bring these techniques to paged media.

Value Definitions

This specification follows the CSS property definition conventions from [CSS21] using the value definition syntax from [CSS-VALUES-3]. Value types not defined in this specification are defined in CSS Values & Units [CSS-VALUES-3]. Combination with other CSS modules may expand the definitions of these value types.

In addition to the property-specific values listed in their definitions, all properties defined in this specification also accept the CSS-wide keywords as their property value. For readability they have not been repeated explicitly.

1. Running headers and footers

[CSS3PAGE] 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 doing so. Named strings copy text for reuse in margin boxes. Running elements move elements (complete with style and structure) from the document to margin boxes.

1.1. Named strings

The string-set property copies the text content of an element into a named string, which functions as a variable. The text content of this named string can be retrieved using the string() function. Since these variables may change on a given page, an optional second value for the string() function allows authors to choose which value on a page is used.

1.1.1. The string-set property

Name: string-set
Value: [ <custom-ident> <content-list> ]# | none
Initial: none
Applies to: all elements, but not pseudo-elements
Inherited: no
Percentages: N/A
Computed value: specified value
Canonical order: per grammar
Animation type: discrete

User agents are expected to support this property on all media, including non-visual ones.

The string-set property contains one or more pairs, each consisting of an custom identifier (the name of the named string) followed by a <content-list> describing how to construct the value of the named string.

<content-list> expands to one or more of the following values, in any order.

<content-list> = [ <string> | <counter()> | <counters()> | <content()> | <attr()> ]+
<string>
A string, as defined in [CSS21]
<counter()>
A counter() function, as described in [CSS21].
<counters()>
A counters() function, as described in [CSS21].
<content()>
The content() function, described below.
<attr()>
An attr() function, as defined in [CSS-VALUES-3]
1.1.1.1. The content() function
content() = content([text | before | after | first-letter ])

How do we define the default value for this function?

text
The string value of the element, determined as if white-space: normal had been set. This is the default value
before
The string value of the ::before pseudo-element, determined as if white-space: normal had been set.
after
The string value of the ::after pseudo-element, determined as if white-space: normal had been set.
first-letter
The first letter of the element, as defined for the ::first-letter pseudo-element

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 entry value for a page is the assignment in effect at the end of the previous page. The exit value for a page is the assignment in effect at the end of the current page.

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 string() function can return past, current, or future values of the assignment.

HTML:

<h1>Loomings</h1>

CSS:

h1::before { content: 'Chapter ' counter(chapter); }
h1 { string-set: header content(before) ':' content(text); }
h1::after { content: '.'; }

The value of the named string “header” will be “Chapter 1: Loomings”.

HTML:
<section title="Loomings">

CSS:

section { string-set: header attr(title) }

The value of the “header” string will be “Loomings”.

1.1.2. The string() function

The string() function is used to copy the value of a named string to the document, via the content 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.

The second argument of the string() function is one of the following keywords:

first
The value of the first assignment on the page is used. If there is no assignment on the page, the entry value is used. first is the default value.
start
If the element is the first element on the page, the value of the first assignment is used. Otherwise the entry value is used. The entry value may be empty if the element hasn’t yet appeared.
last
The exit value of the named string is used.
first-except
This is identical to first, except that the empty string is used on the page where the value is assigned.
CSS:
@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() }

The following figures show the first, start, and last assignments of the “heading” string on various pages.

The start value is empty, as the string had not yet been set at the start of the page.
Since the page starts with an h2, the start value is the value of that head.
Since there’s not an h2 at the top of this page, the start value is the exit value of the previous page.

1.2. Running elements

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 running() value to the position property, and the element() value to the content property.
@page {
  @top { content: element(header); }
}

h1 { position: running(header); }

In this example, the h1 element is placed in the @top margin box, complete with formatting and any descendant elements. It does not display in the normal document flow.

1.2.1. The running() value

position: running(custom-ident) 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 element(). The element inherits from its original position in the document, but does not display there.

Name: position
New values: <running()>
running() = running( <custom-ident> )

HTML:

<p class="rh"><i>Miranda v. Arizona</i> in Context</p>
<h2><i>Miranda v. Arizona</i> in Context</h2>

CSS:

@top-center {
  content: element(heading);
  }

p.rh {
  position: running(heading);
  }

p.rh::before {
  content: counter(page) ' / ';
  }

running header using running elements

Running element in page margin box

The element value() can only be used in page margin boxes. And it cannot be combined with other possible values for the content property.

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.

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.

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);
    }
  }
Name: running
Value: <custom-ident>
Initial: none
Applies to: elements
Inherited: no
Percentages: N/A
Computed value: specified value
Canonical order: per grammar
Animation type: discrete

User agents are expected to support this property on all media, including non-visual ones.

1.2.2. The element() value

The element() value of the content property places an element (which has been removed from the normal flow via running()) in a page margin box. Whenever the value of the element changes, the value of element() is updated.

Just as with string(), element() 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 element() can return past, current, or future values of the assignment.

Name: content
New values: <element()>
element() = element( <custom-ident> , [ first | start | last | first-except ]? )

2. Footnotes

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.

2.1. Terminology

Footnotes are complex objects (see the footnote section at [dpub-latinreq]), so it will be helpful to define some terms before proceeding.

page with footnotes

Footnote terminology
footnote element
The element containing the content of the footnote, which will be removed from the flow and displayed as a footnote.
footnote marker (also known as footnote number)
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.
footnote body
The footnote marker is placed before the footnote element, and together they represent the footnote body, which will be placed in the footnote area.
footnote call (also known as footnote reference)
A number or symbol, found in the main text, which points to the footnote body.
footnote area
The page area used to display footnotes.
footnote rule (also known as footnote separator)
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.

2.2. Creating footnotes

An element becomes a footnote by applying float: footnote to that element. This triggers the following actions:
  1. The footnote element is removed from the flow, and a ::footnote-call pseudo-element is inserted in its place, which serves as a reference to the footnote.
  2. A ::footnote-marker pseudo-element, identifying the footnote, is placed at the beginning of the footnote element. Together this is the footnote body.
  3. The footnote counter is incremented.
  4. 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.
HTML:
<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>

CSS:

@page {
  @footnote {
    float: bottom;
  }
}

span.footnote { float: footnote; }

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.

2.3. Types of footnotes

The following new value of the float property creates a footnote element:
Name: float
New values: footnote
footnote
each footnote element is placed in the footnote area of the page

The footnote-display property determines whether a footnote is displayed as a block element or inline element.

Name: footnote-display
Value: block | inline | compact
Initial: block
Applies to: elements
Inherited: no
Percentages: N/A
Computed value: specified value
Canonical order: per grammar
Animation type: discrete
block
The footnote element is placed in the footnote area as a block element
inline
The footnote element is placed in the footnote area as an inline element
compact
The user agent determines whether a given footnote element is placed as a block element or an inline element. If two or more footnotes could fit on the same line in the footnote area, they should be placed inline.

2.4. The footnote area

A page area that can be used to display footnotes is described in the page context using an @footnote rule. This rule defines a box that, if used, will contain all the footnote elements that appear on that page.

How would one describe this in the grammar of CSS3-Page?

2.4.1. Positioning of the footnote area

The bottom margin edge of the footnote area is positioned so that it touches the bottom of the page area. The footnote area can only contain footnotes.

How do footnotes work in multi-column text? Prince uses float: prince-column-footnote to create a footnote at the bottom of a column rather than the bottom of a page.

Implementations that support footnotes generally support page floats like float: bottom. Page floats should end up above the footnote area. How might this be specified?

2.4.2. Size of the footnote area

The max-height property on the footnote area limits the size of this area, unless the page contains only footnotes (as may happen on the last page of a document).

Since it is undesirable for a page to consist only of footnotes, user agents may set a default max-height value on the footnote area.

2.5. The Footnote Counter

The footnote counter is a predefined counter associated with the footnote element. Its value is the number or symbol used to identify the footnote. This value is used in both the footnote call and the footnote marker. It should be incremented for each footnote.

2.5.1. Values of the footnote counter

The footnote counter, like other counters, may use any counter style. Footnotes often use a sequence of symbols.

::footnote-call { content: counter(footnote, symbols('*', '†', '‡', '§')); }

::footnote-marker { content: counter(footnote, symbols('*', '†', '‡', '§')) '. '; }

2.5.2. Resetting the footnote counter

The footnote counter may be reset on each page.

@page {
  counter-reset: footnote;
  @footnote { … }
}

Note that the value of the footnote counter should depend on the position of the footnote element in the document tree, not where it is eventually placed. A footnote element may sometimes be placed on the page after the footnote call, but the same counter value must be used for both.

2.6. The footnote-call pseudo-element

A ::footnote-call pseudo-element is inserted in place of the footnote element when the latter is removed from the flow. By default, the content of this pseudo-element is the value of the footnote counter, styled as a superscripted number.
::footnote-call {
content: counter(footnote);
vertical-align: baseline;
font-size: 100%;
line-height: inherit;
font-variant-position: super;
}

2.7. The footnote-marker pseudo-element

The ::footnote-marker pseudo-element represents the footnote element’s marker, the number or symbol that identifies each footnote. This pseudo-element behaves like a ::marker pseudo-element, as defined in [CSS3LIST]. It is placed at the beginning of the superior parent’s content, and is inline by default. The ::footnote-marker can be styled just as other ::marker elements can be. The default style should include list-style-position: inside.
::footnote-marker {
content: counter(footnote);
}

::footnote-marker::after {
content: '. ';
}

2.8. Rendering footnotes and footnote policy

Rendering footnotes can be complex. If a footnote falls near the bottom of the page, there may not be enough room on the page for the footnote body. The footnote-policy property allows authors some influence over the rendering of difficult pages.

Name: footnote-policy
Value: auto | line | block
Initial: auto
Applies to: elements
Inherited: no
Percentages: N/A
Computed value: specified value
Canonical order: per grammar
Animation type: discrete
auto
The user agent chooses how to render footnotes, and may place the footnote body on a later page than the footnote reference. A footnote body must never be placed on a page before the footnote reference.
line
If a given footnote body cannot be placed on the current page due to lack of space, the user agent introduces a forced page break at the start of the line containing the footnote reference, so that both the reference and the footnote body fall on the next page. Note that the user agent must honor widow and orphan settings when doing this, and so may need to insert the page break on an earlier line.
block
As with line, except a forced page break is introduced before the paragraph that contains the footnote.

We need an algorithm for laying out footnotes

2.9. Future directions

The next level will include sidenotes, column footnotes, and multiple footnote areas.

3. Selecting Pages

A paginated document consists of a sequence of pages. [CSS3PAGE] defines page selectors, which allow the selection of the first page of the document, left and right pages, and blank pages. Here we extend the idea of page selectors to enable the selection of arbitrary document pages.

3.1. Page Selectors

The :nth() page pseudo-class allows the selection of arbitrary document pages. This pseudo-class takes an argument of the form An + B as defined in [CSS3SYN]. When applied to the default @page rule, :nth() selects the document page whose index matches the argument.
:nth() = :nth( <an+b> [of <custom-ident>]? )

:nth() is not related to the page counter, which may reset and use various numbering schemes.

When the :nth() selector is applied to a named page, and that named page is part of a page-group (see below), it selects the nth page in the page group.

@page :nth(1)

This selects the first page of the document.

@page :nth(2n)
This selects all even document pages.

3.2. Page groups

Many paginated documents have a repeating structure, consisting of many chapters, sections, or articles. The first page of each subdivision often requires special treatment, but [CSS3PAGE] doesn’t define a way to select the first page of each chapter (as distinct from the first page of the entire document).

When the page property is applied to an element that also has a forced break property applied, a page group is created. The page group is the collection of all pages created by an instance of that element. When a new instance of the element is rendered, a new page group is started.

A page may be part of several page groups, as a given page group may have ancestors or descendants that are part of another page group.

CSS:
div { 
  page: A;
  break-before: page;
}
child { 
  page: B;
  break-before: page;
}
A page may be part of several page groups.
Note that page 5 can be selected in three ways:
@page :nth(5 of A) /* will select 5th page of every <div> */
@page :nth(1 of B) /* will select first page of every <child> */
@page :nth(5)   /* will select 5th page of document */

Consider the following HTML:

<div class="chapter">
<h1>Chapter One</h1>
<p>some text</p>
<table class="broadside">
...
</table>
...
</div>
<div class="chapter">
<h1>Chapter Two</h1>
<p>some text</p>
...
<table class="broadside">
...
</table>
...
</div>

And CSS:

div.chapter {
  page: body;
  break-before: page;
}

table.broadside {
  page: broadside;
  break-before: page;
}

In this case, each chapter will form a separate page group. @page:nth(3 of body) will select the third page of each chapter, even if that page happens to use the “broadside” named page. @page:nth(1) will select only the first page of the document, as will @page:first.

4. Leaders (moved)

Now described in [CSS3-CONTENT]

5. Cross-references (moved)

Now described in [CSS3-CONTENT]

6. Bookmarks (moved)

Now described in [CSS3-CONTENT]

Appendix A: Where Are They Now?

Many sections which were in the 29 November 2011 Working Draft have been moved to other specifications. Here are some notes on where things have moved.

Page marks and bleed area

This section has been moved to CSS Paged Media Module Level 3.

CMYK colors

This section has been moved to CSS Color Module Level 5.

Styling blank pages

This section has been moved to CSS Paged Media Module Level 3

Paged presentations

This section has been moved to CSS Overflow Module Level 4.

This is discussed in WHATWG CSS Books.

Page floats

This section has been moved to CSS Page Floats.

Selecting columns and pages

A brief mention of selecting columns is found in WHATWG CSS Books.

Appendix B: Default UA Stylesheet

This appendix is informative, and is to help UA developers to implement a default stylesheet for HTML, but UA developers are free to ignore or modify as appropriate.

@page {
  counter-reset: footnote;
  @footnote {
    counter-increment: footnote;
    float: bottom;
    column-span: all;
    height: auto;
  }
}

::footnote-marker {
  content: counter(footnote);
  list-style-position: inside;
}

::footnote-marker::after {
  content: '. ';
}

::footnote-call {
  content: counter(footnote);
  vertical-align: super;
  font-size: 65%;
}

@supports ( font-variant-position: super ) {
  ::footnote-call {
    content: counter(footnote);
    vertical-align: baseline;
    font-size: 100%;
    line-height: inherit;
    font-variant-position: super;
  }
}

h1 { bookmark-level: 1 }
h2 { bookmark-level: 2 }
h3 { bookmark-level: 3 }
h4 { bookmark-level: 4 }
h5 { bookmark-level: 5 }
h6 { bookmark-level: 6 }

Appendix C: Changes

Changes since the 13 May 2014 Working Draft:

Changes since the 24 September 2013 Editor’s Draft:

Changes since the 29 November 2011 Working Draft:

Differences with the WHATWG CSS Books specification:

Privacy Considerations

No new privacy considerations have been reported on this specification.

Security Considerations

No new security considerations have been reported on this specification.

Acknowledgments

This work would not be possible without the immense contributions of Håkon Wium Lie.

Chris Lilley, Elika J. Etemad, Alan Stearns, L. David Baron, Bert Bos, Florian Rivoal, [$your_name, ", " ]+ and Liam Quin have provided valuable feedback.

Conformance

Document conventions

Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this document are to be interpreted as described in RFC 2119. However, for readability, these words do not appear in all uppercase letters in this specification.

All of the text of this specification is normative except sections explicitly marked as non-normative, examples, and notes. [RFC2119]

Examples in this specification are introduced with the words “for example” or are set apart from the normative text with class="example", like this:

This is an example of an informative example.

Informative notes begin with the word “Note” and are set apart from the normative text with class="note", like this:

Note, this is an informative note.

Advisements are normative sections styled to evoke special attention and are set apart from other normative text with <strong class="advisement">, like this: UAs MUST provide an accessible alternative.

Conformance classes

Conformance to this specification is defined for three conformance classes:

style sheet
A CSS style sheet.
renderer
A UA that interprets the semantics of a style sheet and renders documents that use them.
authoring tool
A UA that writes a style sheet.

A style sheet is conformant to this specification if all of its statements that use syntax defined in this module are valid according to the generic CSS grammar and the individual grammars of each feature defined in this module.

A renderer is conformant to this specification if, in addition to interpreting the style sheet as defined by the appropriate specifications, it supports all the features defined by this specification by parsing them correctly and rendering the document accordingly. However, the inability of a UA to correctly render a document due to limitations of the device does not make the UA non-conformant. (For example, a UA is not required to render color on a monochrome monitor.)

An authoring tool is conformant to this specification if it writes style sheets that are syntactically correct according to the generic CSS grammar and the individual grammars of each feature in this module, and meet all other conformance requirements of style sheets as described in this module.

Partial implementations

So that authors can exploit the forward-compatible parsing rules to assign fallback values, CSS renderers must treat as invalid (and ignore as appropriate) any at-rules, properties, property values, keywords, and other syntactic constructs for which they have no usable level of support. In particular, user agents must not selectively ignore unsupported component values and honor supported values in a single multi-value property declaration: if any value is considered invalid (as unsupported values must be), CSS requires that the entire declaration be ignored.

Implementations of Unstable and Proprietary Features

To avoid clashes with future stable CSS features, the CSSWG recommends following best practices for the implementation of unstable features and proprietary extensions to CSS.

Non-experimental implementations

Once a specification reaches the Candidate Recommendation stage, non-experimental implementations are possible, and implementors should release an unprefixed implementation of any CR-level feature they can demonstrate to be correctly implemented according to spec.

To establish and maintain the interoperability of CSS across implementations, the CSS Working Group requests that non-experimental CSS renderers submit an implementation report (and, if necessary, the testcases used for that implementation report) to the W3C before releasing an unprefixed implementation of any CSS features. Testcases submitted to W3C are subject to review and correction by the CSS Working Group.

Further information on submitting testcases and implementation reports can be found from on the CSS Working Group’s website at https://www.w3.org/Style/CSS/Test/. Questions should be directed to the public-css-testsuite@w3.org mailing list.

Index

Terms defined by this specification

Terms defined by reference

References

Normative References

[CSS-POSITION-3]
Elika Etemad; Tab Atkins Jr.. CSS Positioned Layout Module Level 3. 3 April 2023. WD. URL: https://www.w3.org/TR/css-position-3/
[CSS-VALUES-3]
Tab Atkins Jr.; Elika Etemad. CSS Values and Units Module Level 3. 1 December 2022. CR. URL: https://www.w3.org/TR/css-values-3/
[CSS-VALUES-4]
Tab Atkins Jr.; Elika Etemad. CSS Values and Units Module Level 4. 18 December 2023. WD. URL: https://www.w3.org/TR/css-values-4/
[CSS-VALUES-5]
CSS Values and Units Module Level 5. Editor's Draft. URL: https://drafts.csswg.org/css-values-5/
[CSS21]
Bert Bos; et al. Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification. 7 June 2011. REC. URL: https://www.w3.org/TR/CSS21/
[CSS22]
Bert Bos. Cascading Style Sheets Level 2 Revision 2 (CSS 2.2) Specification. 12 April 2016. WD. URL: https://www.w3.org/TR/CSS22/
[CSS3-CONTENT]
Elika Etemad; Dave Cramer. CSS Generated Content Module Level 3. 2 August 2019. WD. URL: https://www.w3.org/TR/css-content-3/
[CSS3LIST]
Elika Etemad; Tab Atkins Jr.. CSS Lists and Counters Module Level 3. 17 November 2020. WD. URL: https://www.w3.org/TR/css-lists-3/
[CSS3PAGE]
Elika Etemad. CSS Paged Media Module Level 3. 14 September 2023. WD. URL: https://www.w3.org/TR/css-page-3/
[CSS3SYN]
Tab Atkins Jr.; Simon Sapin. CSS Syntax Module Level 3. 24 December 2021. CR. URL: https://www.w3.org/TR/css-syntax-3/
[RFC2119]
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://datatracker.ietf.org/doc/html/rfc2119

Informative References

[DPUB-LATINREQ]
Dave Cramer. Requirements for Latin Text Layout and Pagination. 30 September 2014. WD. URL: https://www.w3.org/TR/dpub-latinreq/

Property Index

Name Value Initial Applies to Inh. %ages Anim­ation type Canonical order Com­puted value
footnote-display block | inline | compact block elements no N/A discrete per grammar specified value
footnote-policy auto | line | block auto elements no N/A discrete per grammar specified value
running <custom-ident> none elements no N/A discrete per grammar specified value
string-set [ <custom-ident> <content-list> ]# | none none all elements, but not pseudo-elements no N/A discrete per grammar specified value

Issues Index

How do we define the default value for this function?

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.

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.

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);
    }
  }
Name: running
Value: <custom-ident>
Initial: none
Applies to: elements
Inherited: no
Percentages: N/A
Computed value: specified value
Canonical order: per grammar
Animation type: discrete

User agents are expected to support this property on all media, including non-visual ones.

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.
How would one describe this in the grammar of CSS3-Page?
How do footnotes work in multi-column text? Prince uses float: prince-column-footnote to create a footnote at the bottom of a column rather than the bottom of a page.
Implementations that support footnotes generally support page floats like float: bottom. Page floats should end up above the footnote area. How might this be specified?
We need an algorithm for laying out footnotes
Now described in [CSS3-CONTENT]
Now described in [CSS3-CONTENT]
Now described in [CSS3-CONTENT]