• About
  • Journal
  • Documentation
  • search
  • Gitlab

Supported feature of the W3C specifications

CSS Paged Media Module Level 3

W3C Working Draft 14 March 2013

Editor’s Draft, 9 November 2017

@page rules
Sizesize: <length>{1,2} ;HTMLPDF
size: A5 | A4 | A3 | B5 | B4 | letter | legal | ledger ;HTMLPDF
size: portrait | landscape ;HTMLPDF
Marksmarks: none | [ crop || cross ] ;HTMLScreenshot
Bleedbleed: <length> ;HTMLscreenshot
Marginsmargin: <length>{1,2} ;HTMLPDF
margin-top: <length> ;
margin-bottom: <length> ;
margin-left: <length> ;
margin-right: <length> ;
HTMLPDF
margin-inside: <length> ;
margin-outside: <length> ;
no
Backgroundbackground-color: ... ;HTMLPDF
background-image: url(<url>) ;HTMLPDF
background-size: ... ;
background-repeat: ... ;
background-position: ... ;
HTMLPDF
Page selectors
Spread@page :left { }
@page :right { }
HTMLPDF
First page@page :first { }HTMLPDF
Blank page@page :blank { }HTMLPDF
nth page@page :nth(n) { }HTMLPDF
Margin boxes
DefaultHTMLPDF
Stylesbakground: ... ;
color: ... ;
border:... ;
HTMLPDF
Text alignmenttext-align: left | center | right ;HTMLPDF
Vertical alignmentvertical-align: top | middle | bottom ;
or align-items: flex-start | center | flex-end ;
HTMLPDF
Computed...in progress
Page-based counters
counter for pagecontent : counter(page) ;HTMLPDF
content : counter(pages) ;HTMLPDF
Named page
named @page@page <name> { }
section { page: <name> }
HTMLPDF
Page group
page group@page <name> { }
section { page: <name> }
HTMLPDF
Page selectors for page group
Spread@page <name>:left { }
@page <name>:left { }
HTMLPDF
First page@page <name>:first { }HTMLPDF
Blank page@page <name>:blank { }issue#30
nth page@page <name>:nth(n) { }issue#29

CSS Fragmentation Module Level 3

W3C Candidate Recommendation, 9 February 2017

Breaks Between Boxes
Breaks beforebreak-before: avoid-page | avoid ;no
break-before: page ;HTMLPDF
break-before: left ;HTMLPDF
break-before: right ;HTMLPDF
break-before: recto ;HTMLPDF
break-before: verso ;HTMLPDF
break-before: column | region;?
Breaks afterbreak-after: avoid-page | avoid ;no
break-after: page ;HTMLPDF
break-after: left ;HTMLPDF
break-after: right ;HTMLPDF
break-after: recto ;HTMLPDF
break-after: verso ;HTMLPDF
break-after: column | region ;?
Avoid breaks insidebreak-inside: avoid ;HTMLPDF
break-inside: avoid-page ;no
break-inside: avoid-column;?
break-inside: avoid-region ;?
Breaks Between Lines
Orphansorphans: <integer> ;Chrome and blink browsers supports orphans out of the box. Firefox doen't. Check support from caniuse.com
Widowswidows: <integer> ;Chrome and blink browsers supports widows out of the box. Firefox doen't. Check support from caniuse.com
Fragmented Borders and Backgrounds
box-decorationsbox-decoration-break: slice | clone ;no

CSS Generated Content for Paged Media Module

W3C Working Draft, 13 May 2014

Named strings
String-set() on elementsstring-set: [[<custom-ident> <content-list>][, <custom-ident> <content-list>]* ]
<content-list>=<string>HTMLPDF
content(text)HTMLPDF
content(before)Issue#45
content(after)Issue#45
content(first-letter)Issue#45
counter()no
counters()no
attr(<identifier>)no
String in margin-boxescontent: string( <custom-ident> [ , [ <keyword>] ]? )
<keyword>=firstPending merge request
startPending merge request
lastPending merge request
first-exceptHTMLPDF
Running elements
Running value on elementsposition: running(<custom-ident>) ;HTMLPDF
Element value in margin boxescontent: element(...) ;
element( <custom-ident> [ , <keyword> ]? )
HTMLPDF
<keyword>=firstno
startno
lastno
first-exceptno
Footnotes
Footnotes area@footnote{ float: bottom ; }no
Footnote element.note { float: footnote ; }no
Footnote typefootnote-display: block | inline | compact ;no
Rendering footnotesfootnote-policy: auto | line | block ;no
Footnotes counters::footnote-call { }
::footnote-call { content: counter(footnote
[, <counter-style>, <string>] ; }
no
::footnote-marker { }
::footnote-marker { content: counter(footnote
[, <counter-style>, <string>] ; }
no
Reset footnotes@page { counter-reset: footnote ; }no
Leaders
leaderscontent : leader(<type>) ;no
<type>=dottedno
solidno
spaceno
<string>no
Cross-references
Counter typecontent: target-counter(attr(href url), page) ;
target-counter( <url> , <custom-ident> [ , <counter-style> ]? )
HTML
+ Issue#46
PDF
target-counters( <url> , <custom-ident> [ , <counter-style> ]? )no
Text typecontent: target-content(attr(href)) ;
target-text( <url> [ , <keyword> ]? )
<keyword>=contentHTMLPDF
beforeHTML
afterHTML
first-letterHTML
PDF bookmarks
Bookmarksbookmark-level: <integer> ;no
bookmark-label: <content-list>no
bookmark-state: open | close ;no
Handlers, Hooks and custom javascript Releases & downloads

Paged.js is maintained by the nice folks at Cabbage Tree Labs