Skip to content

[v4] fontSize configuration line-height shorthand broken in v4 #15636

Closed
@valtism

Description

@valtism

What version of Tailwind CSS are you using?

v4.0.0-beta.9

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

NextJS 15.1.3

What version of Node.js are you using?

v20.11.0

What browser are you using?

Chrome

What operating system are you using?

macOS

Reproduction URL

https://github.com/valtism/tw-v4-fontsize

Vite repo showing the issue. Inspect the 3 text elements to see the second one has an invalid generated class.

See main.tsx and tailwind.config.js

Describe your issue

In v3, font size could be configured using an array shorthand of [size, line-height] https://tailwindcss.com/docs/font-size#providing-a-default-line-height

In v4 (using the config file) setting the font size only works, setting font size with a configuration object works, but using the 2-element array does not.

I would expect it to work to maintain compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions