aboutsummaryrefslogtreecommitdiff
path: root/files/uk/web/css/@page/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:43:23 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:43:23 -0500
commit218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (patch)
treea9ef8ac1e1b8fe4207b6d64d3841bfb8990b6fd0 /files/uk/web/css/@page/index.html
parent074785cea106179cb3305637055ab0a009ca74f2 (diff)
downloadtranslated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.gz
translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.tar.bz2
translated-content-218934fa2ed1c702a6d3923d2aa2cc6b43c48684.zip
initial commit
Diffstat (limited to 'files/uk/web/css/@page/index.html')
-rw-r--r--files/uk/web/css/@page/index.html112
1 files changed, 112 insertions, 0 deletions
diff --git a/files/uk/web/css/@page/index.html b/files/uk/web/css/@page/index.html
new file mode 100644
index 0000000000..7704892bfb
--- /dev/null
+++ b/files/uk/web/css/@page/index.html
@@ -0,0 +1,112 @@
+---
+title: '@page'
+slug: Web/CSS/@page
+tags:
+ - '@page'
+ - At-rule
+ - CSS
+ - Layout
+ - NeedsTranslation
+ - Reference
+ - TopicStub
+ - Web
+translation_of: Web/CSS/@page
+---
+<div>{{CSSRef}}</div>
+
+<p>The <strong><code>@page</code></strong> CSS at-rule is used to modify some CSS properties when printing a document.</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="brush: css no-line-numbers notranslate">@page {
+ margin: 1cm;
+}
+
+@page :first {
+ margin: 2cm;
+}</pre>
+
+<h3 id="Descriptors">Descriptors</h3>
+
+<dl>
+ <dt><a href="/en-US/docs/Web/CSS/@page/size"><code>size</code></a></dt>
+ <dd>Specifies the target size and orientation of the page box’s containing block. In the general case, where one page box is rendered onto one page sheet, it also indicates the size of the destination page sheet.</dd>
+</dl>
+
+<dl>
+ <dt><a href="/en-US/docs/Web/CSS/@page/marks"><code>marks</code></a></dt>
+ <dd>Adds crop and/or registration marks to the document.</dd>
+</dl>
+
+<dl>
+ <dt><a href="/en-US/docs/Web/CSS/@page/bleed"><code>bleed</code></a></dt>
+ <dd>Specifies the extent beyond the page box at which the page rendering is clipped.</dd>
+</dl>
+
+<h2 id="Description">Description</h2>
+
+<p>You can't change all CSS properties with <code>@page</code>. You can only change the margins, orphans, widows, and page breaks of the document. Attempts to change any other CSS properties will be ignored.</p>
+
+<p>The <code>@page</code> at-rule can be accessed via the CSS object model interface {{domxref("CSSPageRule")}}.</p>
+
+<div class="note"><strong>Note:</strong> The W3C is discussing how to handle viewport-related {{cssxref("&lt;length&gt;")}} units, <code>vh</code>, <code>vw</code>, <code>vmin</code>, and <code>vmax</code>. Meanwhile do not use them within a <code>@page</code> at-rule.</div>
+
+<h2 id="Formal_syntax">Formal syntax</h2>
+
+<pre class="syntaxbox notranslate">{{csssyntax}}</pre>
+
+<h2 id="Examples">Examples</h2>
+
+<h3 id="page_pseudo-class_examples">@page pseudo-class examples</h3>
+
+<p>Please refer to the various <a href="/en-US/docs/CSS/Pseudo-classes" title="Pseudo-classes">pseudo-classes</a> of <code>@page</code> for examples.</p>
+
+<ul>
+ <li>{{Cssxref(":blank")}}</li>
+ <li>{{Cssxref(":first")}}</li>
+ <li>{{Cssxref(":left")}}</li>
+ <li>{{Cssxref(":right")}}</li>
+ <li>{{Cssxref(":recto")}} {{experimental_inline}}</li>
+ <li>{{Cssxref(":verso")}} {{experimental_inline}}</li>
+</ul>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('CSS Logical Properties', '#page', ':recto and :verso')}}</td>
+ <td>{{Spec2('CSS Logical Properties')}}</td>
+ <td>Adds the <code>:recto</code> and <code>:verso</code> page selectors</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS3 Paged Media', '#at-page-rule', '@page')}}</td>
+ <td>{{Spec2('CSS3 Paged Media')}}</td>
+ <td>No change from {{SpecName('CSS2.1')}}, though more CSS at-rules can be used inside a <code>@page</code>.</td>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSS2.1', 'page.html#page-selectors', '@page')}}</td>
+ <td>{{Spec2('CSS2.1')}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<p>{{Compat("css.at-rules.page")}}</p>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>See the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=286443">[META] CSS Paged Media Module Level 3</a> ticket in Bugzilla for tracking progress on the subject (page-based counters, etc.)</li>
+</ul>