Supported HTML and CSS
Documents are laid out for paper: pages, tables that continue across pages, headers and footers. The service supports the parts of HTML and CSS that matter for that. Anything outside it is ignored and reported by validation.
Layout
Section titled “Layout”- The CSS box model, with
box-sizing, margins (includingautoand negative),min-andmax-sizes. - Tables, including
colspan,rowspan, and header rows repeated on every page they span. - Flexbox: direction, wrap, grow, shrink, basis,
align-*andjustify-content. - A subset of grid:
grid-template-columnswith lengths,fr,autoandrepeat(), andgap, with automatic row placement. display: inline-block, multi-column text (column-count,column-gap), lists with markers,<hr>.position: relativeandabsolutewith offsets, andz-index.
Paged media
Section titled “Paged media”@pagesize, orientation and margins, and top and bottom margin boxes for headers and footers, withcounter(page)andcounter(pages).break-before,break-after,break-insideand the olderpage-break-*names, with widow and orphan control.- A PDF outline built from headings, and clickable links from
<a href>.
- Shaping for complex scripts and right-to-left text.
font-weightfrom 1 to 1000 and italic, for fonts that have those styles.hyphens: manual, and automatic hyphenation for English.- Units
px,pt,cm,mm,in,%,emandrem, andcalc().
Painting
Section titled “Painting”- Colors, backgrounds,
linear-gradient(), borders (solid, dashed, dotted),border-radius,box-shadow,opacity, andoverflow: hidden. - SVG
rect,circleandline, drawn as vector shapes. - PNG and JPEG images; see Images.
Selectors and variables
Section titled “Selectors and variables”Tag, class, id, universal, attribute selectors with the common operators, descendant, child
and sibling combinators, :nth-child, :first-child and :last-child. CSS custom
properties with var() and fallbacks.
Not supported
Section titled “Not supported”JavaScript, @font-face and @import, animations and transitions, pseudo-classes such as
:hover, and most of what only makes sense on a screen. If you are unsure, validate the
document.