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
Copy file name to clipboardExpand all lines: css2/diffs-rec/page.html
+28-14Lines changed: 28 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -101,26 +101,40 @@ <h2> <del>Although CSS2 does not specify how user agents transfer page boxes to
101
101
<P>Authors <ins>can</ins> specify the <del>dimensions, orientation, margins, etc.</del><ins>margins</ins> of a page box <del>within</del><ins>inside</ins> an <aname="x3"><span
102
102
class="index-def" title="@page">@page</span></a> rule. An @page rule
103
103
consists of the keyword "@page", <del>a page selector (followed with no intervening space</del><ins>followed</ins> by an optional page
104
-
<del>pseudo-class), and</del><ins>selector, followed by</ins> a block of <ins>declarations. The</ins> declarations <del>(said</del><ins>in an
104
+
<del>pseudo-class), and</del><ins>selector, followed by</ins> a block <del>of</del><ins>containing declarations and
105
+
at-rules. The</ins> declarations <del>(said</del><ins>in an
105
106
@page rule are said</ins> to be in the <spanclass="index-def"
class="propinst-margin"><ins>'margin'</ins></span></a><ins>) apply within</ins> the <a
123
-
href="#page-context">page <del>box are set with</del><ins>context</ins></a><ins>.</ins> The <del>'size' property. The dimensions of the page area are the dimensions of the page box minus the margin area. Example(s): For example, the following @page rule sets the page box size to 8.5 x 11 inches and creates '2cm' margin on all sides between the page box edge and the page area: @page { size 8.5in 11in; margin: 2cm } The 'marks' property in an @page rule specifies crop and cross marks for the page box. 13.2.1 Page margins The margin properties ( 'margin-top' , 'margin-right' , 'margin-bottom' , 'margin-left' , and 'margin' ) apply within the page context . The following diagram shows</del><ins>following diagram shows</ins> the
117
+
all left pages, <ins>or</ins> all right <del>pages, or a page with a specific name. The dimensions of</del><ins>pages</ins></p>
118
+
119
+
<P>The <del>page box</del><ins>rules for handling malformed declarations, malformed
120
+
statements, and invalid at-rules inside @page</ins> are <del>set</del><ins>as defined in</ins><a
121
+
href="syndata.html#parsing-errors"><ins>section 4.2,</ins></a> with the
122
+
<del>'size' property. The dimensions of</del><ins>following addition: when</ins> the <del>page area are</del><ins>UA expects</ins> the <del>dimensions</del><ins>start</ins> of <del>the page box minus the margin area. Example(s): For example, the following @page rule sets the page box size</del><ins>a declaration or
123
+
at-rule (i.e., an IDENT token or an ATKEYWORD token) but finds an
124
+
unexpected token instead, that token is considered</ins> to <del>8.5 x 11 inches and creates '2cm' margin on all sides between the page box edge and</del><ins>be</ins> the <del>page area: @page { size 8.5in 11in; margin: 2cm }</del><ins>first
125
+
token of a malformed declaration. I.e.,</ins> the <del>'marks' property in an @page</del>rule <del>specifies crop and cross marks</del>for <del>the page box.</del><ins>malformed
126
+
declarations, rather than malformed statements is used to determine
class="propinst-margin-left">'margin-left'</span></a>, and <ahref="box.html#propdef-margin" class="noxref"><span
136
+
class="propinst-margin">'margin'</span></a>) apply within the <a
137
+
href="#page-context">page context</a>. The following diagram shows the
124
138
relationships between the sheet, page box, and page margins:</P>
125
139
126
140
<divclass="figure">
@@ -141,7 +155,7 @@ <h3><ins>13.2.1</ins> <a name="page-margins">Page <del>with a specific name.</d
141
155
142
156
<p>The <ahref="#page-context">page context</a> has no notion of
143
157
fonts, so 'em' and 'ex' units are not allowed. Percentage values on
144
-
the margin <del>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 on the sheet When the page box is smaller than the target size, the user agent is free</del><ins>properties are relative</ins> to <del>place</del><ins>the dimensions of</ins> the <a
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: 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
145
159
href="#page-box">page box</a><del>anywhere on</del><ins>; for left and right margins, they refer
146
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
147
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>
0 commit comments