Skip to content

Option to normalise :root/html font-size #188

Open

Description

@JayPanoz

ATM we have a --RS__baseFontSize that serves as a default when there is no publisher’s style.

There may be a need to have something that can override the publishers’ font-size though, in order to improve consistency across the publications a user reads, or resolve issues because the publisher font-size is way too small or large by default.

This would probably not live in base though, since the purpose of this module is to provide defaults publishers can override. If we want to make sure we override the font-size it has to be output in -after.css.

In that case, if we create a new module, maybe there is more we would want to expose to normalise other styles.

cc @mickael-menu and @qnga

Activity

  1. JayPanoz commented on Jul 3, 2025

    @JayPanoz
    CollaboratorAuthor

    As a cautionary tale, this has the potential of reinventing the Font-size Normalize if we do not restrict ourselves to something very simplistic e.g. overriding :root/body and calling it a day.

    Problematic cases include CSS whose font sizes are set in absolute values on p or div, for which the override would not work.

    From experience we know it did not work well since there were way too many issues e.g. losing the sizing of headings which were marked up as paragraphs, etc. and we deprecated it as soon as we could.

    In other words, there is also potential to have something that will not work consistently, hence won't be usable in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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