In this section you find the documentation for the supported CSS at-rules.
The following at-rules have to appear at the beginning of the CSS document, and exactly in this order:
After the initial at-rules, the following at-rules can appear also in nested form in the CSS document:
@page <page-selector-list> {
<declaration-list>
} |
Modifies margins, orphans, widows and page breaks of a document when
printing it. The pages are identified either by a name, or by a page pseudo-class and
page declarations can either be style declarations or page region at-rules.
The initial values for @page styles are documented in the
Paged Media chapter. |
:left |
Page pseudo-classes |
:right |
:recto |
:verso |
:first |
:blank |
:nth(N) |
@left-top | @left-middle |
@left-bottom |
Page region at-rules |
@right-top | @right-middle |
@right-bottom |
@top-left-corner | @top-left |
@top-center | @top-right | @top-right-corner |
@bottom-left-corner | @bottom-left |
@bottom-center | @bottom-right | @bottom-right-corner |
@page-float-top | @page-float-bottom |
@leftnote | @rightnote | @insidenote | @outsidenote |
@footnote |
@prince-overlay |
The @page rule takes CSS properties to style the margins, borders, padding and background.
It equally takes color, font and font-height properties that are inherited by the page-margin boxes - note that they
are not. inherited by the page area content. It also takes the following CSS properties:
bleed |
marks |
-prince-mark-length |
-prince-mark-offset |
-prince-mark-width |
-prince-pdf-page-colorspace |
-prince-pdf-page-label |
-prince-rotate-body |
-prince-shrink-to-fit |
-prince-trim |
size
|
Additionally, Prince for Books takes the following CSS property:
-prince-page-fill
|
@font-face {
<declaration-list>
} |
Links a font family to an actual font. |
The @font-face rule takes the following CSS descriptors: |
font-family: <family-name> |
This descriptor defines the font family name that will be used in all CSS font
family name matching. It is required for the @font-face rule to be valid. |
src: [ url(<URL>) format(<string>#)? | local(<family-name>) |
prince-lookup(<family-name>) ]# |
This descriptor specifies the resource containing font data. It is required for
the @font-face rule to be valid. The local() function searches
for locally installed system fonts, but prince-lookup() will also find
fonts defined by other @font-face rules. |
unicode-range: <urange># |
This descriptor defines the set of Unicode codepoints that may be supported by
the font face. The descriptor value is a comma-delimited list of Unicode range values. |
Additionally, @font-face takes the CSS descriptors
font-variant , font-stretch ,
font-weight and font-style ,
which take the same values as the CSS properties with the same name. |