Theme Development Guide

Theme Schema Documentation

Create beautiful, print-ready PDF themes. This guide covers all required CSS selectors, properties, and best practices for MPDF theme development.

27
Total Selectors
27
Required
13
Categories
88
Properties
🎨

CSS Variables

Root-level custom properties for consistent theming

:rootRequired

CSS custom properties for theme-wide consistency

System CSS Reference

These utility classes are automatically available in every theme. They're part of the MPDF system CSS and handle pagination and print quality.

.page-break

Forces a page break before the element. Use for multi-page documents.

<div class="page-break"></div>
.page-break-after

Forces a page break after the element.

<div class="page-break-after">Content</div>
.no-break

Prevents page breaks inside the element. Keeps content together.

<div class="no-break">Keep together</div>
.keep-together

Alias for .no-break. Prevents content from splitting across pages.

<div class="keep-together">...</div>
.no-print

Hides element when printing/generating PDF. Screen only.

<div class="no-print">Screen only</div>
.print-only

Shows element only when printing. Hidden on screen.

<div class="print-only">Print only</div>

CSS Variables Contract

Every theme must define these CSS custom properties in :root. This ensures consistent theming across all components.

VariableDescriptionRequired
--color-primaryPrimary brand colorRequired
--color-accentSecondary/accent colorRequired
--color-textMain text colorRequired
--color-text-lightSecondary text colorRequired
--color-text-mutedMuted/disabled textOptional
--color-backgroundPage background colorRequired
--color-surfaceSurface/card backgroundRequired
--color-borderBorder colorRequired