The page area includes the boxes laid out on that page.
The edges of the first page area establish the rectangle that is the initial containing block of the document.
The containing block in which the root element lives is a rectangle called the initial containing block. For continuous media, it has the dimensions of the viewport and is anchored at the canvas origin; it is the page area for paged media.
The edges of the first page area establish the rectangle that is the initial containing block of the document.
The edges of the first page area establish the rectangle that is the initial containing block of the document.
A percentage height on the root element is relative to the initial containing block.
The edges of the first page area establish the rectangle that is the initial containing block of the document.
The percentage is calculated with respect to the width of the generated box's containing block.
The edges of the first page area establish the rectangle that is the initial containing block of the document.
The containing block for a positioned box is established by the nearest positioned ancestor (or, if none exists, the initial containing block
For absolutely positioned content that resolves to a position on a page other than the page being laid out (the current page), or resolves to a position on the current page which has already been rendered for printing, printers may place the content
- on another location on the current page,
- on a subsequent page, or
- may omit it.
The edges of the first page area establish the rectangle that is the initial containing block of the document.
The containing block for a positioned box is established by the nearest positioned ancestor (or, if none exists, the initial containing block)
The percentage is calculated with respect to the height of the generated box's containing block.
The containing block for a positioned box is established by the nearest positioned ancestor (or, if none exists, the initial containing block
The edges of the first page area establish the rectangle that is the initial containing block of the document.
For paged media, boxes with fixed positions are repeated on every page.
fixed: The box's position is calculated according to the 'absolute' model, but in addition, the box is fixed with respect to some reference.
Parts of the fixed position box that are not visible in the initial containing block will not print.
The canvas background is painted within and covers the page area.
The background of the root element becomes the background of the canvas and covers the entire canvas...
The canvas background is painted within and covers the page area.
The background of the root element becomes the background of the canvas and covers the entire canvas...
For documents whose root element is an HTML 'HTML' element or an XHTML 'html' element that has computed values of 'transparent' for 'background-color' and 'none' for 'background-image', user agents must instead use the computed value of those properties from that element's first HTML 'BODY' element or XHTML 'body' element child when painting backgrounds for the canvas, and must not paint a background for that child element.
An @page rule consists of the keyword "@page", followed by an optional page selector, followed by a block of declarations.
In CSS 2.1, page selectors may designate the first page, all left pages, or all right pages
Authors can specify the margins of a page box inside an @page rule.
In CSS 2.1, only the margin properties ('margin-top', 'margin-right', 'margin-bottom', 'margin-left', and 'margin') apply within the page context.
Percentage values on the margin properties are relative to the dimensions of the page box; for left and right margins, they refer to the width of the page box while for top and bottom margins, they refer to the height of the page box.
Percentage values on the margin properties are relative to the dimensions of the page box; for left and right margins, they refer to the width of the page box while for top and bottom margins, they refer to the height of the page box.
The page context has no notion of fonts, so 'em' and 'ex' units are not allowed. Percentage values on the margin properties are relative to the dimensions of the page box; for left and right margins, they refer to the width of the page box while for top and bottom margins, they refer to the height of the page box. All other units associated with the respective CSS 2.1 properties are allowed.
Authors can specify the margins of a page box inside an @page rule.
Properties specified in a :left or :right @page rule override those specified in an @page rule that has no pseudo-class specified. Properties specified in a :first @page rule override those specified in :left or :right @page rules.
When printing double-sided documents, the page boxes on left and right pages MAY be different.
If different declarations have been given for left and right pages, the user agent must honor these declarations even if the user agent does not transfer the page boxes to left and right sheets (e.g., a printer that only prints single-sided).
When printing double-sided documents, the page boxes on left and right pages MAY be different.
If different declarations have been given for left and right pages, the user agent must honor these declarations even if the user agent does not transfer the page boxes to left and right sheets (e.g., a printer that only prints single-sided).
To simplify implementations, user agents may use a single page area width on left, right, and first pages. In this case, the page area width of the first page should be used.
When printing double-sided documents, the page boxes on left and right pages MAY be different.
If different declarations have been given for left and right pages, the user agent must honor these declarations even if the user agent does not transfer the page boxes to left and right sheets (e.g., a printer that only prints single-sided).
All pages are automatically classified by user agents into either the :left or :right pseudo-class.
Authors MAY also specify style for the first page of a document with the ':first' pseudo-class:
Properties specified in a :left or :right @page rule override those specified in an @page rule that has no pseudo-class specified
Properties specified in a :first @page rule override those specified in :left or :right @page rules.
Properties specified in a :left or :right @page rule override those specified in an @page rule that has no pseudo-class specified.
Properties specified in a :first @page rule override those specified in :left or :right @page rules.
Content should be allowed slightly beyond the page box to allow pages to "bleed".
User agents should avoid generating a large number of empty page boxes to honor the positioning of elements
User agents may handle boxes positioned outside the page box in several ways, including discarding them or creating page boxes for them at the end of the document.
Value: auto | always | avoid | left | right
Initial: auto
Applies to: block-level elements
Applies to: block-level elements
Inherited: no
Media: paged
auto: Neither force nor forbid a page break before (after, inside) the generated box.
always: Always force a page break before (after) the generated box.
left: Force one or two page breaks before (after) the generated box so that the next page is formatted as a left page.
right: Force one or two page breaks before (after) the generated box so that the next page is formatted as a right page.
Avoid a page break before (after, inside) the generated box.
Value: auto | always | avoid | left | right
Initial: auto
Applies to: block-level elements
Inherited: no
Media: paged
auto: Neither force nor forbid a page break before (after, inside) the generated box.
always: Always force a page break before (after) the generated box.
left: Force one or two page breaks before (after) the generated box so that the next page is formatted as a left page.
right: Force one or two page breaks before (after) the generated box so that the next page is formatted as a right page.
Avoid a page break before (after, inside) the generated box.
Value: auto | avoid
Initial: auto
Applies to: block-level elements
Inherited: no
Media: paged
auto: Neither force nor forbid a page break before (after, inside) the generated box.
avoid: Avoid a page break before (after, inside) the generated box.
User agents may also apply these properties to other elements, e.g., 'table-row' elements.
Each property may also have a specified value of 'inherit', which means that, for a given element, the property takes the same computed value as the property for the element's parent.
Each property may also have a specified value of 'inherit', which means that, for a given element, the property takes the same computed value as the property for the element's parent.
Each property may also have a specified value of 'inherit', which means that, for a given element, the property takes the same computed value as the property for the element's parent.
...the values 'always', 'left', and 'right' take precedence over 'avoid'.
When a page break splits a box, the box's margins, borders, and padding have no visual effect where the split occurs.
When a page break splits a box, the box's margins, borders, and padding have no visual effect where the split occurs.
Value: <integer>
Initial: 2
Applies to: block-level elements
Inherited: yes
Media: visual, paged
The 'orphans' property specifies the minimum number of line boxes in a block element that must be left at the bottom of a page.
Value: <integer>
Initial: 2
Applies to: block-level elements
Inherited: yes
Media: visual, paged
The 'windows' property specifies the minimum number of line boxes of a block that must be left at the top of a page.
In the normal flow, page breaks may occur at the following places: 1. In the vertical margin between block boxes (or rows in a table). ... These breaks are subject to the following rules: ...
In the vertical margin between block boxes (or rows in a table). When a page break occurs here, the computed values of the relevant 'margin-top' and 'margin-bottom' properties are set to '0'.
In the normal flow, page breaks may occur at the following places: ... 3. Between the bottom content edge of a block box and the end of its child content (bottom margin edge of the last block-level child or bottom edge of the last line box) if the distance between them is positive.. These breaks are subject to the following rules:...
In the normal flow, page breaks may occur at the following places: ... 3. Between the bottom content edge of a block box and the end of its child content (bottom margin edge of the last block-level child or bottom edge of the last line box) if the distance between them is positive.. These breaks are subject to the following rules:...
In the normal flow, page breaks may occur at the following places: ... 2. Between line boxes inside a block box. These breaks are subject to the following rules:...
In the normal flow, page breaks may occur at the following places: ... 2. Between line boxes inside a block box. These breaks are subject to the following rules:...
Rule C: Breaking at (2) is allowed only if the number of line boxes between the break and the start of the enclosing block box is the value of 'orphans' or more, and the number of line boxes between the break and the end of the box is the value of 'widows' or more.
Rule D: breaking at (2) is allowed only if the 'page-break-inside' property is 'auto'.
If the above doesn't provide enough break points to keep content from overflowing the page boxes, then rules A, B and D are dropped in order to find additional breakpoints.
If that still does not lead to sufficient break points, rule C is dropped as well, to find still more break points.
A page break MUST occur at (1) if, among the 'page-break-after' and 'page-break-before' properties of all the elements generating boxes that meet at this margin, there is at least one with the value 'always', 'left', or 'right'.
Avoid breaking inside a block that has a border.
QUOTE
Avoid breaking inside a floated element
Avoid breaking inside a replaced element
Declarations in the page context obey the cascade just like normal CSS declarations.
Properties specified in a :left or :right @page rule override those specified in an @page rule that has no pseudo-class specified. Properties specified in a :first @page rule override those specified in :left or :right @page rules.
Declarations in the page context obey the cascade just like normal CSS declarations.
Properties specified in a :left or :right @page rule override those specified in an @page rule that has no pseudo-class specified. Properties specified in a :first @page rule override those specified in :left or :right @page rules.
Declarations in the page context obey the cascade just like normal CSS declarations.
Properties specified in a :left or :right @page rule override those specified in an @page rule that has no pseudo-class specified. Properties specified in a :first @page rule override those specified in :left or :right @page rules.
Declarations in the page context obey the cascade just like normal CSS declarations.
@{P}{A}{G}{E} {return PAGE_SYM;}
page : PAGE_SYM S* pseudo_page? S* LBRACE S* declaration [ ';' S* declaration ]* '}' S* ;
page : PAGE_SYM S* pseudo_page? S* LBRACE S* declaration [ ';' S* declaration ]* '}' S* ;
SpecQuote
SpecQuote