Skip to main content Link Search Menu Expand Document Toggle dark mode Copy Code (external link)

CSS Styles Support

A quick-reference chart showing which CSS selectors, at-rules, and style properties are supported in Scryber templates, with any PDF-specific differences noted.

Support levels used in this chart:

Label Meaning
Supported Works as in standard CSS
Partial Supported with differences or limitations — see Notes
Scryber Scryber-specific extension not present in standard CSS
No Not currently supported

Where a property or value was added or significantly improved in a specific version, the version is shown in the Notes column.


On this page

Selectors

Style Selectors

Selector Syntax Support Notes
Element div Supported  
Class .name Supported  
ID #id Supported  
Root :root Supported Used to set CSS custom properties (variables)
Universal * Supported Can be combined with another selector
Pseudo-class :hover, :focus, :nth-child No Interactivity is not applicable in PDF
Attribute [attr="value"] No  
Adjacent sibling + No  
General sibling ~ No  

Combinators

Combinator Character Support Notes
Descendant ` ` (space) Supported  
Direct Child > Supported  
Selector List , Supported Invalid selectors in a list are skipped; valid ones are applied

Pseudo-Elements

Pseudo-Element Syntax Support Notes
Before Content ::before Supported Supports content and counter functions
After Content ::after Supported Supports content and counter functions

At-Rules

Rule Syntax Support Notes
Page @page Supported Sets page size, margins, and orientation; named pages supported
Media @media Partial Only print media queries are applied; screen queries are ignored
Font Face @font-face Supported Local and remote font sources; see font configuration docs
@keyframes @keyframes No Animations are not applicable in PDF
@scope, @layer — No Unknown at-rules cause the entire rule block to be skipped

Properties

Colour & Opacity

Property Support Notes
color Supported Named, hex, rgb(), rgba(), hsl()
opacity Supported 0.0 – 1.0

Background

Property Support Notes
background Supported Shorthand
background-color Supported  
background-image Supported URL, linear-gradient(), radial-gradient(), none
background-size Supported cover, contain (v9.3 improved), lengths, percentages
background-position Supported Keywords, lengths, percentages
background-position-x Supported  
background-position-y Supported  
background-repeat Supported repeat, no-repeat, repeat-x, repeat-y

Typography

Property Support Notes
font Supported Shorthand
font-family Supported System fonts, embedded fonts, Google Fonts via @font-face
font-size Supported pt, px, em, %, named sizes
font-style Supported normal, italic, oblique
font-weight Supported Named and numeric weights
font-stretch Supported  
text-align Supported left, right, center, justify
text-decoration Supported Shorthand
text-decoration-line Supported underline, line-through, overline
letter-spacing Supported  
word-spacing Supported  
line-height Supported  
white-space Supported normal, pre, nowrap
vertical-align Supported top, middle, bottom, baseline
hyphens Supported none, auto, manual
hyphenate-character Supported Custom hyphen character
hyphenate-limit-chars Supported  

Box Model

Property Support Notes
width Supported pt, px, %, em
height Supported  
min-width Supported  
max-width Supported  
min-height Supported  
max-height Supported  
margin Supported Shorthand; all four sides
margin-top/right/bottom/left Supported Individual sides
margin-inline Supported Logical properties
margin-inline-start/end Supported  
padding Supported Shorthand; all four sides
padding-top/right/bottom/left Supported Individual sides
padding-inline Supported Logical properties
padding-inline-start/end Supported  

Borders

Property Support Notes
border Supported Shorthand
border-top/right/bottom/left Supported Side shorthand
border-color/style/width Supported  
border-top/right/bottom/left-color/style/width Supported Individual side properties
border-radius Supported Includes per-column radius on multi-column layouts (v9.3)

Layout & Positioning

Property Support Notes
display Partial block, inline, none fully supported; flex and grid initial support (v9.3); table-* initial support (v9.3)
position Partial static, relative, absolute supported; fixed and sticky not applicable
top/right/bottom/left Supported Used with position
float Supported left, right, none
overflow Supported  
overflow-x Supported  
overflow-y Supported  
transform Supported translate, rotate, scale, matrix
animation / transition No PDF is a static format
z-index No  

Flexbox

Property Support Notes
display: flex Partial Initial support added in v9.3
display: inline-flex No  
flex-direction Partial Basic row/column supported
justify-content Partial  
align-items Partial  
Other flex properties No Full flex spec not yet complete

Grid

Property Support Notes
display: grid Partial Initial support added in v9.3
grid-template-columns Partial Column track definitions; v9.3
Other grid properties No Full grid spec not yet complete

Multi-Column Layout

Property Support Notes
columns Supported Shorthand
column-count Supported  
column-width Supported  
column-gap Supported  
column-fill Supported  
column-span Supported  
column-rule Supported Shorthand; v9.3
column-rule-color Supported v9.3
column-rule-style Supported v9.3
column-rule-width Supported v9.3

Page Breaks

Property Support Notes
break-before Supported auto, always, avoid, page, column, left, right
break-after Supported Same values as break-before
break-inside Supported auto, avoid
page-break-before Supported Legacy CSS2 equivalent of break-before
page-break-after Supported Legacy CSS2 equivalent of break-after
page-break-inside Supported Legacy CSS2 equivalent of break-inside
page Supported Assigns element to a named @page rule
size Supported Used within @page; standard sizes and custom dimensions

Content & Counters

Property Support Notes
content Supported Used with ::before / ::after; supports counter()
counter-reset Supported  
counter-increment Supported  

Gradients (as background-image values)

Function Support Notes
linear-gradient() Supported Direction, angle, multiple stops
radial-gradient() Supported Centre point, multiple stops
gradient-position Supported Scryber gradient position property

CSS Variables & Calc

Feature Support Notes
--custom-property + :root Supported Define and use CSS custom properties
var(--name) Supported Reference CSS variables
calc() Supported Expressions support within css; mixed-unit expressions (e.g. calc(50% - 5px)) and all expression functions

List Marker Customisation (Scryber Extensions)

Property Support Notes
-pdf-li-align Scryber Aligns the list item marker
-pdf-li-concat Scryber Concatenate marker values
-pdf-li-group Scryber Groups counter levels
-pdf-li-inset Scryber Marker inset distance
-pdf-li-prefix Scryber Text before the marker
-pdf-li-postfix Scryber Text after the marker

SVG Style Properties

These are valid CSS properties when styling SVG elements.

Property Support Notes
fill Supported Solid colours, gradients, patterns
fill-opacity Supported  
stroke Supported  
stroke-width Supported  
stroke-dasharray Supported  
stroke-dashoffset Supported  
stroke-linecap Supported butt, round, square
stroke-linejoin Supported miter, round, bevel
stroke-opacity Supported  
stop-color Supported For gradient stops
stop-opacity Supported For gradient stops
paint-order Supported  
text-anchor Supported start, middle, end
dominant-baseline Supported  

Global Property Values

Value Support Notes
initial, inherit, revert, unset No Global keyword values are not supported; the property is ignored if one of these values is encountered

See Also