Skip to content
This repository was archived by the owner on Feb 11, 2026. It is now read-only.
This repository was archived by the owner on Feb 11, 2026. It is now read-only.

Use rem units for font-size, normalise font sizes between headers and body text #630

@bencomp

Description

@bencomp

I found that when I teach a lesson online and have the lesson materials on a second laptop or tablet, I need to zoom in a lot to be able to read the body text from a slightly bigger distance. Zooming in works, but then the headers are huge. Looking at Firefox's inspector for the demo lesson, I notice that the font-size for body text is less than half the pixels (14px) of <h2> header font size (30px). Could we rethink that ratio? It may not help that the headers are bold while the body text is not.

My understanding of CSS good practice is that font sizes are better not specified in pixels (except for the root font size), but using rem ('relative to root em size'). I think this is because some people have their root font size set to a larger value, for example, to compensate for low vision.
https://github.com/carpentries/varnish/blob/main/inst/pkgdown/assets/css/lesson.scss still specifies most font sizes using pixels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions