asciidoctor / asciidoctor-pdf

:page_with_curl: Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
https://docs.asciidoctor.org/pdf-converter/latest/
MIT License
1.15k stars 500 forks source link

Use em units for big and small roles #2307

Closed mojavelinux closed 2 years ago

mojavelinux commented 2 years ago

The font size for the big and small roles should be expressed in em units (relative) rather than pt (fixed). This will allow them to scale relative to the current font size of the text to which they are applied.

role:
  big:
    font-size: 1.25em
  small:
    font-size: 0.8em

This differs slightly from HTML, which uses calc(12em / 10) for big and calc(10em / 12) for small. But it's easier to manage values that don't have a repeating decimal.

mojavelinux commented 2 years ago

An open question is whether to apply the same value for all large and small font sizes in the default theme. I think the "lead" role is certainly a strong candidate. We might want to limit the scope of the change to just built-in roles to avoid an unnecessarily large change.