Skip to content

Sizing #4240

@mrosvik

Description

@mrosvik

Explore non-breaking changes to improve sizing modes. Ideas to consider (from most to least likely):

  • Complete feat: modular font-size scale #4044 to make font-size more customizable.
  • Make it possible to add (or remove) size modes. Currently we provide sm, md, lg, but we could add support for optionally adding several smaller or larger modes as well, removing sizes, or reconfiguring the base size for each. A part of the necessary work to support this has been done in feat: modular font-size scale #4044 by removing hard-coding of these size modes in the css generating code.
  • Expose possibility for adjusting the step size of each size mode, which is currently only an internal token.
  • Currently, size modes affect size tokens and font-size tokens similarly. We could consider adding options to configure this differently, since these internally use different tokens for base-size and step. E.g. someone could configure both a sm mode and a sm-compact mode, where the latter has smaller size tokens, while both have the equal values for font-size tokens. Or having the size tokens grow less than the font-size tokens when changing from sm to md to lg.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    ☂ Epics

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions