toCss

Expands a PageFormatSelector into individual @page CSS selectors. Since @page pseudo-class selectors cannot be comma-separated, each page in a range produces its own selector string.

  • null: ["@page"]

  • Side-only: ["@page:left"]

  • Range-only: ["@page:nth(1)", "@page:nth(2)", ...]

  • Side + range: ["@page:nth(1):left", "@page:nth(2):left", ...]

Throws

if the range has no end bound