Skip to content

Commit 2ccfe1e

Browse files
committed
[css-page] Add the 'marks' and 'bleed' properties from GCPM.
1 parent 5cad790 commit 2ccfe1e

File tree

2 files changed

+77
-4
lines changed

2 files changed

+77
-4
lines changed

css-page/Overview.html

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ <h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class
116116
Spread pseudo-classes: <span class=css data-link-type=maybe title=:left>:left</span>, <span class=css data-link-type=maybe title=:right>:right</span></a><li><a href=#first-pseudo><span class=secno>4.2.2</span>
117117
First-page pseudo-class: <span class=css data-link-type=maybe title=:first>:first</span></a><li><a href=#blank-pseudo><span class=secno>4.2.3</span>
118118
Blank-page pseudo-class: <span class=css data-link-type=maybe title=:blank>:blank</span></a></ul><li><a href=#syntax-page-selector><span class=secno>4.3</span>@page rule grammar</a><li><a href=#cascading-and-page-context><span class=secno>4.4</span>Cascading in the page context</a></ul><li><a href=#margin-boxes><span class=secno>5</span>Page-Margin Boxes</a><ul class=toc><li><a href=#margin-at-rules><span class=secno>5.1</span>At-rules for page-margin boxes</a><li><a href=#populating-margin-boxes><span class=secno>5.2</span>Populating page-margin boxes</a><li><a href=#margin-dimension><span class=secno>5.3</span>Computing Page-margin Box Dimensions</a><ul class=toc><li><a href=#margin-box-terms><span class=secno>5.3.1</span><span id=max-margin-dimension></span>Page-Margin Box Layout Terminology</a><li><a href=#variable-sizing><span class=secno>5.3.2</span>
119-
Page-Margin Box Variable Dimension Computation Rules</a><ul class=toc><li><a href=#variable-auto-margins><span class=secno>5.3.2.1</span>Margins</a><li><a href=#variable-auto-sizing><span class=secno>5.3.2.2</span>Resolving <span class=css data-link-type=maybe title=auto>auto</span> widths</a><li><a href=#variable-minmax><span class=secno>5.3.2.3</span>Handling <span class=property data-link-type=propdesc title=min-width>min-width</span> and <span class=property data-link-type=propdesc title=max-width>max-width</span></a><li><a href=#variable-position><span class=secno>5.3.2.4</span>Positioning</a><li><a href=#variable-mapping><span class=secno>5.3.2.5</span>Boxes on other sides</a></ul><li><a href=#fixed-sizing><span class=secno>5.3.3</span>Page-Margin Box Fixed Dimension Computation Rules</a></ul><li><a href=#margin-box-ex><span class=secno>5.4</span>Page-margin box examples</a></ul><li><a href=#page-properties><span class=secno>6</span>Page Properties</a><ul class=toc><li><a href=#page-based-counters><span class=secno>6.1</span>Page-based counters</a><li><a href=#margin-text-alignment><span class=secno>6.2</span>Page-margin boxes and default values</a></ul><li><a href=#page-size><span class=secno>7</span>Page Size</a><ul class=toc><li><a href=#page-size-prop><span class=secno>7.1</span>Page size: the <span class=property data-link-type=propdesc title=size>size</span> property</a><ul class=toc><li><a href=#page-size-media-query><span class=secno>7.1.1</span>Media Queries</a></ul><li><a href=#renderingpages><span class=secno>7.2</span>Rendering page boxes that do not fit a page sheet</a><li><a href=#positioning-page-box><span class=secno>7.3</span>Positioning the page box on the sheet</a></ul><li><a href=#page-breaks><span class=secno>8</span>
119+
Page-Margin Box Variable Dimension Computation Rules</a><ul class=toc><li><a href=#variable-auto-margins><span class=secno>5.3.2.1</span>Margins</a><li><a href=#variable-auto-sizing><span class=secno>5.3.2.2</span>Resolving <span class=css data-link-type=maybe title=auto>auto</span> widths</a><li><a href=#variable-minmax><span class=secno>5.3.2.3</span>Handling <span class=property data-link-type=propdesc title=min-width>min-width</span> and <span class=property data-link-type=propdesc title=max-width>max-width</span></a><li><a href=#variable-position><span class=secno>5.3.2.4</span>Positioning</a><li><a href=#variable-mapping><span class=secno>5.3.2.5</span>Boxes on other sides</a></ul><li><a href=#fixed-sizing><span class=secno>5.3.3</span>Page-Margin Box Fixed Dimension Computation Rules</a></ul><li><a href=#margin-box-ex><span class=secno>5.4</span>Page-margin box examples</a></ul><li><a href=#page-properties><span class=secno>6</span>Page Properties</a><ul class=toc><li><a href=#page-based-counters><span class=secno>6.1</span>Page-based counters</a><li><a href=#margin-text-alignment><span class=secno>6.2</span>Page-margin boxes and default values</a></ul><li><a href=#page-size><span class=secno>7</span>Page Size</a><ul class=toc><li><a href=#page-size-prop><span class=secno>7.1</span>Page size: the <span class=property data-link-type=propdesc title=size>size</span> property</a><ul class=toc><li><a href=#page-size-media-query><span class=secno>7.1.1</span>Media Queries</a></ul><li><a href=#page-marks-bleed><span class=secno>7.2</span>Page marks and bleed area</a><li><a href=#renderingpages><span class=secno>7.3</span>Rendering page boxes that do not fit a page sheet</a><li><a href=#positioning-page-box><span class=secno>7.4</span>Positioning the page box on the sheet</a></ul><li><a href=#page-breaks><span class=secno>8</span>
120120
<span id=pg-br-before-after></span>
121121
<span id=page-break-before></span>
122122
<span id=page-break-after></span>
@@ -1932,7 +1932,31 @@ <h4 class="heading settled heading" data-level=7.1.1 id=page-size-media-query><s
19321932
<p>In the example above, "A4" sheets are given a "3cm" page margin, and "letter"
19331933
sheets are given a "1in" page margin.</p>
19341934

1935-
<h3 class="heading settled heading" data-level=7.2 id=renderingpages><span class=secno>7.2 </span><span class=content>Rendering page boxes that do not fit a page sheet</span><a class=self-link href=#renderingpages></a></h3>
1935+
1936+
<h3 class="heading settled heading" data-level=7.2 id=page-marks-bleed><span class=secno>7.2 </span><span class=content>Page marks and bleed area</span><a class=self-link href=#page-marks-bleed></a></h3>
1937+
1938+
<p>The <a class=property data-link-type=propdesc href=#propdef-marks title=marks>marks</a> property from <a data-biblio-type=informative data-link-type=biblio href=#css2 title=css2>[CSS2]</a> is part of this specification.
1939+
1940+
<table class=propdef><tr><th>Name:<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-marks>marks<a class=self-link href=#propdef-marks></a></dfn><tr><th>Value:<td>[ crop || cross ] | none<tr><th>Initial:<td>none<tr><th>Applies to:<td>page context<tr><th>Inherited:<td>no<tr><th>Media:<td>visual, paged<tr><th>Computed value:<td>as specified</table>
1941+
<p>This property adds crop and/or cross marks to the document. Crop
1942+
marks indicate where the page should be cut. Cross marks are used to
1943+
align sheets.
1944+
1945+
<p>Crop marks and cross marks are printed outside the page box. To
1946+
have room to show crop and cross marks, the final pages will have to
1947+
be somewhat bigger than the page box.
1948+
1949+
<div class=example>
1950+
<p>To set crop and cross marks on a document, this code can be used:
1951+
<pre>@page { marks: crop cross }
1952+
</pre></div>
1953+
1954+
<table class=propdef><tr><th>Name:<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-bleed>bleed<a class=self-link href=#propdef-bleed></a></dfn><tr><th>Value:<td><a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#length-value title="<length>">&lt;length&gt;</a><tr><th>Initial:<td>6pt<tr><th>Applies to:<td>page context<tr><th>Inherited:<td>no<tr><th>Media:<td>visual, paged<tr><th>Computed value:<td>as specified<tr><th>Percentages:<td>refer to width of page box</table>
1955+
<p>This property specifies the extent of the page bleed area outside
1956+
the page box. This property only has effect if crop marks are enabled.
1957+
1958+
1959+
<h3 class="heading settled heading" data-level=7.3 id=renderingpages><span class=secno>7.3 </span><span class=content>Rendering page boxes that do not fit a page sheet</span><a class=self-link href=#renderingpages></a></h3>
19361960

19371961
<p>If a page box does not match the target page sheet dimensions, the user agent
19381962
should do one of the following (in order of preference):</p>
@@ -1949,7 +1973,7 @@ <h3 class="heading settled heading" data-level=7.2 id=renderingpages><span class
19491973
<p>The user agent <em class=RFC2119>MAY</em> wish to consult the user before
19501974
performing these operations.</p>
19511975

1952-
<h3 class="heading settled heading" data-level=7.3 id=positioning-page-box><span class=secno>7.3 </span><span class=content>Positioning the page box on the sheet</span><a class=self-link href=#positioning-page-box></a></h3>
1976+
<h3 class="heading settled heading" data-level=7.4 id=positioning-page-box><span class=secno>7.4 </span><span class=content>Positioning the page box on the sheet</span><a class=self-link href=#positioning-page-box></a></h3>
19531977

19541978
<p>When the page box is smaller than the page sheet, the user agent <em class=RFC2119>SHOULD</em> either:</p>
19551979

@@ -2567,14 +2591,15 @@ <h3 class="no-num no-ref heading settled heading" id=normative><span class=conte
25672591

25682592
<h3 class="no-num no-ref heading settled heading" id=informative><span class=content>
25692593
Informative References</span><a class=self-link href=#informative></a></h3>
2570-
<div data-fill-with=informative-references><dl><dt id=css-device-adapt title=CSS-DEVICE-ADAPT><a class=self-link href=#css-device-adapt></a>[CSS-DEVICE-ADAPT]<dd>Rune Lillesveen. <a href=http://www.w3.org/TR/2011/WD-css-device-adapt-20110915/>CSS Device Adaptation</a>. 15 September 2011. W3C Working Draft. (Work in progress.) URL: <a href=http://www.w3.org/TR/2011/WD-css-device-adapt-20110915/>http://www.w3.org/TR/2011/WD-css-device-adapt-20110915/</a><dt id=css3-images title=CSS3-IMAGES><a class=self-link href=#css3-images></a>[CSS3-IMAGES]<dd>Elika J. Etemad; Tab Atkins Jr.. <a href=http://www.w3.org/TR/2012/CR-css3-images-20120417/>CSS Image Values and Replaced Content Module Level 3</a>. 17 April 2012. W3C Candidate Recommendation. (Work in progress.) URL: <a href=http://www.w3.org/TR/2012/CR-css3-images-20120417/>http://www.w3.org/TR/2012/CR-css3-images-20120417/</a><dt id=css3-writing-modes title=CSS3-WRITING-MODES><a class=self-link href=#css3-writing-modes></a>[CSS3-WRITING-MODES]<dd>Elika J. Etemad; Koji Ishii. <a href=http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/>CSS Writing Modes Module Level 3</a>. 15 November 2012. W3C Working Draft. (Work in progress.) URL: <a href=http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/>http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/</a><dt id=css3val title=CSS3VAL><a class=self-link href=#css3val></a>[CSS3VAL]<dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a href=http://www.w3.org/TR/2013/CR-css3-values-20130730/>CSS Values and Units Module Level 3</a>. 30 July 2013. W3C Candidate Recommendation. (Work in progress.) URL: <a href=http://www.w3.org/TR/2013/CR-css3-values-20130730/>http://www.w3.org/TR/2013/CR-css3-values-20130730/</a><dt id=jlreq title=JLREQ><a class=self-link href=#jlreq></a>[JLREQ]<dd>Yasuhiro Anan; et al. <a href=http://www.w3.org/TR/2012/NOTE-jlreq-20120403/>Requirements for Japanese Text Layout</a>. 3 April 2012. W3C Working Group Note. URL: <a href=http://www.w3.org/TR/2012/NOTE-jlreq-20120403/>http://www.w3.org/TR/2012/NOTE-jlreq-20120403/</a></dl></div>
2594+
<div data-fill-with=informative-references><dl><dt id=css-device-adapt title=CSS-DEVICE-ADAPT><a class=self-link href=#css-device-adapt></a>[CSS-DEVICE-ADAPT]<dd>Rune Lillesveen. <a href=http://www.w3.org/TR/2011/WD-css-device-adapt-20110915/>CSS Device Adaptation</a>. 15 September 2011. W3C Working Draft. (Work in progress.) URL: <a href=http://www.w3.org/TR/2011/WD-css-device-adapt-20110915/>http://www.w3.org/TR/2011/WD-css-device-adapt-20110915/</a><dt id=css2 title=CSS2><a class=self-link href=#css2></a>[CSS2]<dd>Ian Jacobs; et al. <a href=http://www.w3.org/TR/2008/REC-CSS2-20080411>Cascading Style Sheets, level 2 (CSS2) Specification</a>. 11 April 2008. W3C Recommendation. URL: <a href=http://www.w3.org/TR/2008/REC-CSS2-20080411>http://www.w3.org/TR/2008/REC-CSS2-20080411</a><dt id=css3-images title=CSS3-IMAGES><a class=self-link href=#css3-images></a>[CSS3-IMAGES]<dd>Elika J. Etemad; Tab Atkins Jr.. <a href=http://www.w3.org/TR/2012/CR-css3-images-20120417/>CSS Image Values and Replaced Content Module Level 3</a>. 17 April 2012. W3C Candidate Recommendation. (Work in progress.) URL: <a href=http://www.w3.org/TR/2012/CR-css3-images-20120417/>http://www.w3.org/TR/2012/CR-css3-images-20120417/</a><dt id=css3-writing-modes title=CSS3-WRITING-MODES><a class=self-link href=#css3-writing-modes></a>[CSS3-WRITING-MODES]<dd>Elika J. Etemad; Koji Ishii. <a href=http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/>CSS Writing Modes Module Level 3</a>. 15 November 2012. W3C Working Draft. (Work in progress.) URL: <a href=http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/>http://www.w3.org/TR/2012/WD-css3-writing-modes-20121115/</a><dt id=css3val title=CSS3VAL><a class=self-link href=#css3val></a>[CSS3VAL]<dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a href=http://www.w3.org/TR/2013/CR-css3-values-20130730/>CSS Values and Units Module Level 3</a>. 30 July 2013. W3C Candidate Recommendation. (Work in progress.) URL: <a href=http://www.w3.org/TR/2013/CR-css3-values-20130730/>http://www.w3.org/TR/2013/CR-css3-values-20130730/</a><dt id=jlreq title=JLREQ><a class=self-link href=#jlreq></a>[JLREQ]<dd>Yasuhiro Anan; et al. <a href=http://www.w3.org/TR/2012/NOTE-jlreq-20120403/>Requirements for Japanese Text Layout</a>. 3 April 2012. W3C Working Group Note. URL: <a href=http://www.w3.org/TR/2012/NOTE-jlreq-20120403/>http://www.w3.org/TR/2012/NOTE-jlreq-20120403/</a></dl></div>
25712595

25722596
<h2 class="no-num no-ref heading settled heading" id=index><span class=content>
25732597
Index</span><a class=self-link href=#index></a></h2>
25742598
<div data-fill-with=index><ul class=indexlist>
25752599
<li>available height, <a href=#available-height title="section 5.3.1">5.3.1</a>
25762600
<li>available width, <a href=#available-width title="section 5.3.1">5.3.1</a>
25772601
<li>:blank, <a href=#valuedef-blank title="section 4.2.3">4.2.3</a>
2602+
<li>bleed, <a href=#propdef-bleed title="section 7.2">7.2</a>
25782603
<li>containing block, <a href=#containing-block title="section 5.3.1">5.3.1</a>
25792604
<li>Content-empty page, <a href=#content-empty title="section 3.2">3.2</a>
25802605
<li>end page value, <a href=#end-page-value title="section 8.1">8.1</a>
@@ -2587,6 +2612,7 @@ <h2 class="no-num no-ref heading settled heading" id=index><span class=content>
25872612
<li>margin at-rule, <a href=#margin-at-rule title="section 5.1">5.1</a>
25882613
<li>margin context, <a href=#margin-context title="section 5.1">5.1</a>
25892614
<li>margin_sym, <a href=#syntax-prod-margin-sym title="section 4.3">4.3</a>
2615+
<li>marks, <a href=#propdef-marks title="section 7.2">7.2</a>
25902616
<li>match, <a href=#match title="section 4.2">4.2</a>
25912617
<li>max-content width, <a href=#max-content-width title="section 5.3.1">5.3.1</a>
25922618
<li>media, <a href=#media title="section 4.3">4.3</a>
@@ -2626,6 +2652,8 @@ <h2 class="no-num no-ref heading settled heading" id=property-index><span class=
26262652
Property index</span><a class=self-link href=#property-index></a></h2>
26272653
<div data-fill-with=property-index><table class=proptable><thead><tr><th scope=col>Name<th scope=col>Value<th scope=col>Initial<th scope=col>Applies to<th scope=col>Inh.<th scope=col>%ages<th scope=col>Media<th scope=col>Computed value<tbody>
26282654
<tr><th scope=row><a data-property="">size</a><td>&lt;length&gt;{1,2} | auto | [ &lt;page-size&gt; || [ portrait | landscape] ]<td>auto<td>page context<td>N/A<td>N/A<td>paged<td>specified value
2655+
<tr><th scope=row><a data-property="">marks</a><td>[ crop || cross ] | none<td>none<td>page context<td>no<td><td>visual, paged<td>as specified
2656+
<tr><th scope=row><a data-property="">bleed</a><td>&lt;length&gt;<td>6pt<td>page context<td>no<td>refer to width of page box<td>visual, paged<td>as specified
26292657
<tr><th scope=row><a data-property="">page</a><td>auto | &lt;identifier&gt;<td>auto<td>boxes that create class A break points<td>no (but see prose)<td>N/A<td>paged<td>specified value</table></div>
26302658

26312659

css-page/Overview.src.html

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,6 +1919,51 @@ <h4 id="page-size-media-query">Media Queries</h4>
19191919
<p>In the example above, "A4" sheets are given a "3cm" page margin, and "letter"
19201920
sheets are given a "1in" page margin.</p>
19211921

1922+
1923+
<h3 id="page-marks-bleed">Page marks and bleed area</h3>
1924+
1925+
<p>The 'marks' property from [[CSS2]] is part of this specification.
1926+
1927+
<pre class='propdef'>
1928+
Name: marks
1929+
Value: [ crop || cross ] | none
1930+
Initial: none
1931+
Applies To: page context
1932+
Inherited: no
1933+
Computed Value: as specified
1934+
Media: visual, paged
1935+
</pre>
1936+
1937+
<p>This property adds crop and/or cross marks to the document. Crop
1938+
marks indicate where the page should be cut. Cross marks are used to
1939+
align sheets.
1940+
1941+
<p>Crop marks and cross marks are printed outside the page box. To
1942+
have room to show crop and cross marks, the final pages will have to
1943+
be somewhat bigger than the page box.
1944+
1945+
<div class="example">
1946+
<p>To set crop and cross marks on a document, this code can be used:
1947+
<pre>
1948+
@page { marks: crop cross }
1949+
</pre>
1950+
</div>
1951+
1952+
<pre class='propdef'>
1953+
Name: bleed
1954+
Value: <<length>>
1955+
Initial: 6pt
1956+
Applies To: page context
1957+
Inherited: no
1958+
Percentages: refer to width of page box
1959+
Computed Value: as specified
1960+
Media: visual, paged
1961+
</pre>
1962+
1963+
<p>This property specifies the extent of the page bleed area outside
1964+
the page box. This property only has effect if crop marks are enabled.
1965+
1966+
19221967
<h3 id="renderingpages">Rendering page boxes that do not fit a page sheet</h3>
19231968

19241969
<p>If a page box does not match the target page sheet dimensions, the user agent

0 commit comments

Comments
 (0)