Skip to content

Font size / line height shorthand doesn't apply line-height when leading value is none #15911

@scullion

Description

@scullion

What version of Tailwind CSS are you using?

v4.0.0

What build tool (or framework if it abstracts the build tool) are you using?

@tailwindcss/vite 4.0.0, Vite 6.0.11

What version of Node.js are you using?

Node.js 20.x

What browser are you using?

Appears in all browsers tested.

What operating system are you using?

Windows 11

Reproduction URL

https://play.tailwindcss.com/ZmoWtl9NX5

Describe your issue

The font-size / line-height shorthand syntax (e.g., text-3xl/none) doesn't apply the line-height for none leading. The generated ruleset for, e.g. text-3xl/none doesn't contain the expected line-height: 1.

The example shows pairs of identical text at different sizes. Each pair shows:

  • Left (red border): Using shorthand syntax (e.g., text-3xl/none)
  • Right (blue border): Using separate classes (e.g., text-3xl leading-none)

Expected behavior:

  • Both syntaxes should produce identical line heights
  • The shorthand text-3xl/none should be equivalent to text-3xl leading-none
  • The columns should look the same

Actual behavior:

  • Text in the red column has its default line height.

Toggling the example to Tailwind v3 shows that this behavior is new with v4.

Metadata

Metadata

Assignees

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