HtmlDocumentStylesheet

class HtmlDocumentStylesheet(context: Context, pageFormats: List<PageFormatInfo>)

Generates the CSS <style> content for an HTML document, including font-face imports, CSS custom properties, and layout rules derived from the document's configuration.

This class encapsulates all CSS/font concerns, keeping the HtmlDocumentBuilder focused purely on HTML structure.

Parameters

context

the rendering context containing document metadata, layout, and font configuration

Constructors

Link copied to clipboard
constructor(context: Context, pageFormats: List<PageFormatInfo>)

Functions

Link copied to clipboard
fun build(): String