stylesheet

fun stylesheet(href: String = Stylesheet.DEFAULT_HREF, build: StylesheetBuilder.() -> Unit): Stylesheet(source)

Builds a Stylesheet using a narrow typed DSL covering the common ebook cases (typography, spacing, page breaks). Use RuleBuilder.property or StylesheetBuilder.raw as escape hatches for anything not covered.

val css = stylesheet {
body { fontFamily("Georgia, serif"); lineHeight(1.5) }
heading(1) { fontSize("1.8em") }
raw("p.first-line::first-line { font-variant: small-caps; }")
}