In this section you find the documentation for supported CSS features.
Prince supports, fully or partially, the following CSS specifications:
CSS Level 2 | |
---|---|
CSS 2.1 | Prince supports the specification, with few exceptions: Prince does not support
the quotes property or the open-quote and close-quote
values. Prince does not support properties that apply only to interactive media. Note
that this includes outline and its outline-* subproperties.
For similar reasons, Prince does not support visibility: collapse . Prince
does not support the armenian or georgian list styles. Prince
treats 1ex equivalently to 0.5em , which might not be correct
for some fonts. |
CSS Level 3 | |
CSS Backgrounds and Borders Module Level 3 | Prince does not support box-shadow and the border-image
properties. |
CSS Fragmentation Module Level 3 | Prince does not support break-{before,after,inside} . However, Prince
supports also the Prince-specific properties column-break-{before,after} .
The initial value of widows and orphans has been changed from
2 to 1 . |
CSS Color Module Level 3 | Prince supports opacity . It supports some of the extensions of the
color property, but not hsl() . rgba() is supported
in builds after Prince 11. |
CSS Generated Content Module Level 3 | Prince does not recognize the quotes property and the quote-related
content types. |
CSS Fonts Module Level 3 | Beyond the definitions in CSS 2.1, only font-stretch is recognized.
However, Prince provides a different interface to the functionality of the font-variant-*
and font-feature-settings properties. |
CSS Generated Content for Paged Media Module | Prince recognizes footnote-display and string-set . It
does not recognize the running or footnote-policy properties,
but Prince provides a different interface to the funcitonality of footnotes. |
CSS Image Values and Replaced Content Module Level 3 | Prince recognizes image-resolution , but takes a different syntax. |
CSS Multi-column Layout Module | Prince largely supports this module. |
CSS Overflow Module Level 3 | Prince only recognizes the overflow property from CSS 2.1. However,
it supports its behaviour as described in the Level 3 module. |
CSS Paged Media Module Level 3 | Prince largely supports this module. |
CSS Text Module Level 3 | Prince does not recognize line-break , text-align-all
and hanging-punctuation . |
CSS Transforms Module Level 1 | Prince recognizes transform and transform-origin , but
does not recognize transform-box . Prince does not allow perspective transforms. |
CSS Basic User Interface Module Level 3 (CSS3 UI) | Prince recognizes box-sizing and text-overflow . |
CSS Writing Modes Level 3 | Prince partially implements writing-mode . |
CSS Namespaces Module Level 3 | Prince supports namespaces in CSS. |
CSS Conditional Rules Module Level 3 | Prince supports the @media
and @supports at-rules. |
Filter Effects Module Level 1 | Prince supports the filter property. |
CSS Level 4 | |
Selectors Level 4 | Prince largely supports this module. |
Media Queries Level 4 | Prince supports this module as of Prince 11.1. |
CSS Cascading and Inheritance Level 4 | Prince supports the new supports() condition for the @import rule. |
CSS Backgrounds and Borders Module Level 4 | Prince supports the border-clip property. |
Living Standards | |
CSS Books | Prince supports target counters, footnote floats, bookmarks labels, levels and
states, the flow property and the string-set property. |
CSS Figures | Prince largely supports the float extensions of the spec. |
SVG | |
SVG 1.1 | Prince does not support alignment-baseline , color-interpolation ,
color-profile , enable-background , glyph-orientation-horizontal ,
kerning , mask , pointer-events (barely applicable to Prince),
font-size-adjust , glyph-orientation-vertical . |
The following sections may be relevant:
Prince supports the following length units:
The absolute length units correspond to exact distances in the PDF file.
Absolute length units | |
---|---|
cm |
centimeters |
mm |
millimeters |
q |
quarter-millimeters |
in |
inches |
pc |
picas |
pt |
points |
The font length units are relative to the font-size
property.
Font length units | |
---|---|
em |
font size of the element |
rem |
font size of the root element |
ex |
x-height of the element's font |
The pixel unit is relative to the de-facto standard of 96dpi
(or
rather, 96 pixel per inch) for compatibility with browsers.
Pixel unit | |
---|---|
px |
pixel |