Skip to content

line height calculation feels wonky #18612

@marcospgp

Description

@marcospgp

it seems the way line height is calculated for different font sizes does not make much sense

it starts small and increases towards the base font size, but then as the font size increases it starts getting smaller again

--text-xs--line-height:       calc(1 / 0.75)     = 1.333…
--text-sm--line-height:       calc(1.25 / 0.875) = 1.428571…
--text-base--line-height:     calc(1.5 / 1)      = 1.5
--text-lg--line-height:       calc(1.75 / 1.125) = 1.555…
--text-xl--line-height:       calc(1.75 / 1.25)  = 1.4
--text-2xl--line-height:      calc(2 / 1.5)      = 1.333…
--text-3xl--line-height:      calc(2.25 / 1.875) = 1.2
--text-4xl--line-height:      calc(2.5 / 2.25)   = 1.111…
--text-5xl--line-height:      1
--text-6xl--line-height:      1
--text-7xl--line-height:      1
--text-8xl--line-height:      1
--text-9xl--line-height:      1

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