Skip to content

"Leading" (lineHeight) depends on font base size #2

@arabold

Description

@arabold

The definition of the leading property in the theme follows (Tailwind's responsive "leading" class definition](https://tailwindcss.com/docs/line-height#class-reference). However, as React Native doesn't know the rem unit or anything similar, Whirlwind simply multiplies the value defined in the theme by the font base size. That works for floating text and text using the base size but results in unexpected rendering issues when using a non-default font size.

To improve this, the following updates are proposed:

  1. Keep the responsive definitions for the time being, but document the shortcomings more clearly.
  2. Include new definitions leading1, leading2, leading3, etc. that match the current padding and margin sizes. I.e. leading4 would match exactly the base font size, while leading8 would equal double the base font size, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions