Skip to content

Theme: Use unitless values for typography line-height tokens #74393

@aduth

Description

@aduth

Follow-up to #73931 (comment)

Related: #64340

What problem does this address?

The current set of typography tokens don't provide much flexibility in mixing and matching line heights and font-sizes, as the current set of line heights uses fixed pixel values rather than relative units (either unitless or relative units like rem/em).

What is your proposed solution?

Using unitless values for line-heights would enable greater flexibility in how those line-heights can be combined with different font sizes.

Needs Design Feedback:

  • This proposal contradicts earlier proposals in Systematising typography styles in the admin UI #64340 to use pixel values to ensure alignment using multiples of 4px. Is there a compromise solution which achieves both goals?
  • If we use unitless or relative values, what are those values?
  • Is this based on a faulty premise of mixing and matching font sizes and line heights, where they should instead be kept in sync (i.e. only using md line-height with md font size).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design SystemIssues related to the system of combining components according to best practices.Needs Design FeedbackNeeds general design feedback.[Package] Theme/packages/theme[Type] TaskIssues or PRs that have been broken down into an individual action to take

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions