You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>The <ahref="#page-context">page context</a> has no notion of
157
-
fonts, so 'em' and 'ex' units are not allowed. Percentage values on
158
-
the margin properties <del>are relative to the dimensions of the page box ; for left and right margins, they refer to page box width while for top and bottom margins, they refer to page box height. All other units associated with the respective CSS2 properties are allowed. Due to negative margin values (either on the page box or on elements) or absolute positioning content may end up outside the page box, but this content may be "cut" -- by the user agent, the printer, or ultimately, the paper cutter. 13.2.2 Page size : the 'size' property 'size' Value: <length> {1,2} | auto | portrait | landscape | inherit Initial: auto Applies to: the page context Inherited: N/A Percentages
B74
: N/A Media: visual , paged This property specifies the size and orientation of a page box. The size of a page box may either be "absolute" (fixed size) or "relative" (scalable, i.e., fitting available sheet sizes). Relative page boxes allow user agents to scale a document and make optimal use of the target size. Three values for the 'size' property create a relative page box: auto The page box will be set to the size and orientation of the target sheet. landscape Overrides the target's orientation. The page box is the same size as the target, and the longer sides are horizontal. portrait Overrides the target's orientation. The page box is the same size as the target, and the shorter sides are horizontal. Example(s): In the following example, the outer edges of the page box will align with the target. The percentage value on the 'margin' property is relative to the target size so if the target sheet dimensions are 21.0cm x 29.7cm (i.e., A4), the margins are 2.10cm and 2.97cm. @page { size: auto; /* auto is the initial value */ margin: 10%; } Length values for the 'size' property create an absolute page box. If only one length value is specified, it sets both the width and height of the page box (i.e., the box is a square). Since the page box is the initial containing block , percentage values are not allowed for the 'size' property. Example(s): For example: @page { size: 8.5in 11in; /* width height */ } The above example set the width of the page box to be 8.5in and the height to be 11in. The page box in this example requires a target sheet size of 8.5"x11" or larger. User agents may allow users to control the transfer of the page box to the sheet (e.g., rotating an absolute page box that's being printed). Rendering page boxes that do not fit a target sheet If a page box does not fit the target sheet dimensions, the user agent may choose to: Rotate the page box 90° if this will make the page box fit. Scale the page to fit the target. The user agent should consult the user before performing these operations. Positioning the page box on the sheet When the page box is smaller than the target size, the user agent is free</del><ins>are relative</ins> to <del>place</del><ins>the dimensions of</ins> the <a
157
+
fonts, so 'em' and 'ex' units are not allowed. <del>Percentage values on the margin properties are relative to the dimensions of the page box ; for left and right margins, they refer to page box width while for top and bottom margins, they refer to page box height. All other units associated with the respective CSS2 properties are allowed. Due to negative margin values (either on the page box or on elements) or absolute positioning content may end up outside the page box, but this content may be "cut" -- by the user agent, the printer, or ultimately, the paper cutter. 13.2.2 Page size : the 'size' property 'size' Value: <length> {1,2} | auto | portrait | landscape | inherit Initial: auto Applies to: the page context Inherited: N/A Percentages: N/A Media: visual , paged This property specifies the size and orientation of a page box. The size of a page box may either be "absolute" (fixed size) or "relative" (scalable, i.e., fitting available sheet sizes). Relative page boxes allow user agents to scale a document and make optimal use of the target size. Three values for the 'size' property create a relative page box: auto The page box will be set to the size and orientation of the target sheet. landscape Overrides the target's orientation. The page box is the same size as the target, and the longer sides are horizontal. portrait Overrides the target's orientation. The page box is the same size as the target, and the shorter sides are horizontal. Example(s): In the following example, the outer edges of the page box will align with the target. The percentage value on the 'margin' property is relative to the target size so if the target sheet dimensions are 21.0cm x 29.7cm (i.e., A4), the margins are 2.10cm and 2.97cm. @page { size: auto; /* auto is the initial value */ margin: 10%; } Length values for the 'size' property create an absolute page box. If only one length value is specified, it sets both the width and height of the page box (i.e., the box is a square). Since the page box is the initial containing block , percentage values are not allowed for the 'size' property. Example(s): For example: @page { size: 8.5in 11in; /* width height */ } The above example set the width of the page box to be 8.5in and the height to be 11in. The page box in this example requires a target sheet size of 8.5"x11" or larger. User agents may allow users to control the transfer of the page box to the sheet (e.g., rotating an absolute page box that's being printed). Rendering page boxes that do not fit a target sheet If a page box does not fit the target sheet dimensions, the user agent may choose to: Rotate the page box 90° if this will make the page box fit. Scale the page to fit the target. The user agent should consult the user before performing these operations. Positioning the page box</del><ins>Percentage values</ins> on
158
+
the <del>sheet When the page box is smaller than the target size, the user agent is free</del><ins>margin properties are relative</ins> to <del>place</del><ins>the dimensions of</ins> the <a
159
159
href="#page-box">page box</a><del>anywhere on</del><ins>; for left and right margins, they refer
160
160
to</ins> the <del>sheet. However, it is recommended that</del><ins>width of</ins> the page box <del>be centered on the sheet since this will align double-sided pages</del><ins>while for top</ins> and <del>avoid accidental loss of information that is printed near</del><ins>bottom margins, they
161
161
refer to</ins> the <del>edge</del><ins>height</ins> of the <del>sheet. 13.2.3 Crop marks : the 'marks' property 'marks' Value: [ crop || cross ] | none | inherit Initial: none Applies to: page context Inherited: N/A Percentages: N/A Media: visual , paged In high-quality printing, marks are often added outside the</del>page box. <del>This property specifies whether cross marks or crop marks or both should be rendered just outside the page box edge. Crop marks indicate where</del><ins>All other units associated with</ins>
<P><del>Whether the first page of a document is :left or :right depends on the major writing direction of the document and is outside the scope of this document. However, to force a :left or :right first page, authors may insert a page break before the first generated box (e.g., in HTML, specify this for the BODY element).</del>Properties specified in a :left <del>(or :right)</del><ins>or :right</ins> @page rule override
222
222
those specified in an @page rule that has no pseudo-class specified.
223
-
Properties specified in a <del>:first @page rule override those specified</del><ins>:first @page rule override those specified
224
-
in :left or :right @page rules.</ins>
223
+
Properties specified in a :first @page rule override those specified
224
+
in <del>:left (or :right) @page rules. Note. Adding declarations</del><ins>:left or :right @page rules.</ins>
225
225
226
226
<P><ins>Margin declarations on left, right, and first pages may result in
227
-
different</ins><ahref="#page-area"><ins>page area</ins></a><ins>widths. To simplify
227
+
different</ins><ahref="#page-area"><ins>page area</ins></a><ins>widths.</ins> To <ins>simplify
228
228
implementations, user agents may use a single page area width
229
-
on left, right, and first pages.</ins>In<del>:left (or :right) @page rules. Note. Adding declarations to the :left or :right pseudo-class does not influence whether</del><ins>this case,</ins>the <del>document comes out</del><ins>page area width</ins>
229
+
on left, right, and first pages. In this case,</ins>the<del>:left or :rightpseudo-class does not influence whetherthe document comes out</del><ins>page area width</ins>
230
230
of the <del>printer double- or single-sided (which is outside the scope of this specification). Note. Future versions of CSS may include other</del><ins>first</ins> page <del>pseudo-classes. 13.2.5</del><ins>should be used.</ins>
231
231
232
232
@@ -365,9 +365,9 @@ <h3>13.3.1 <a name="page-break-props"><ins>Page</ins> break <del>before/after e
of the following element. When these properties have values other
367
367
than 'auto', the values 'always', 'left', and 'right' take precedence
368
-
<del>over 'avoid'. See the section on allowed page breaks for the exact rules on how these properties may force or suppress a page break. 13.3.2 Using named pages: 'page' 'page' Value: <identifier> | auto Initial: auto Applies to: block-level elements Inherited: yes Percentages: N/A Media: visual , paged The 'page' property can be used to specify a particular type of page where an element should be displayed. Example(s): This example will put all tables on a right-hand side landscape page (named "rotated"): @page rotated {size: landscape} TABLE {page: rotated; page-break-before: right} The 'page' property works as follows: If a block box with inline content has a 'page' property that is different from the preceding block box with inline content, then one or two page breaks are inserted between them, and the boxes after</del><ins>over 'avoid'.</ins>
368
+
over 'avoid'.
369
369
370
-
<p><ins>User Agents must apply these properties to block-level elements
370
+
<p><del>See the section on allowed page breaks for the exact rules on how these properties may force or suppress a page break. 13.3.2 Using named pages: 'page' 'page' Value: <identifier> | auto Initial: auto Applies to: block-level elements Inherited: yes Percentages: N/A Media: visual , paged The 'page' property can be used to specify a particular type of page where an element should be displayed. Example(s): This example will put all tables on a right-hand side landscape page (named "rotated"): @page rotated {size: landscape} TABLE {page: rotated; page-break-before: right} The 'page' property works as follows: If a block box with inline content has a 'page' property that is different from the preceding block box with inline content, then one or two page breaks are inserted between them, and the boxes after</del><ins>User Agents must apply these properties to block-level elements
371
371
in</ins> the <del>break are rendered on a page box</del><ins>normal flow</ins> of the <del>named type. See "Forced</del><ins>root element. User agents may also apply
372
372
these properties to other elements, e.g., 'table-row' elements.</ins>
specifies the minimum number of lines <del>of</del><ins>in</ins> a <del>paragraph</del><ins>block element</ins> that must be left
417
+
specifies the minimum number of lines <del>of</del><ins>in</ins> a <del>paragraph</del><ins>block container</ins> that must be left
418
418
at the bottom of a page. The <ahref="page.html#propdef-widows" class="noxref"><spanclass="propinst-widows">'widows'</span></a> property specifies the minimum
419
-
number of lines <del>of</del><ins>in</ins> a <del>paragraph</del><ins>block element</ins> that must be left at the top of a page.
419
+
number of lines <del>of</del><ins>in</ins> a <del>paragraph</del><ins>block container</ins> that must be left at the top of a page.
420
420
Examples of how they are used to control page breaks are given below.
0 commit comments