-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Font size / line height shorthand doesn't apply line-height
when leading value is none
#15911
Comments
text-3xl/loose
) doesn't apply line-height
when leading value is none
line-height
when leading value is none
It seems like this is because tailwindcss/packages/tailwindcss/theme.css Lines 341 to 345 in 7e20c3b
And instead, tailwindcss/packages/tailwindcss/src/utilities.ts Lines 3751 to 3755 in 7e20c3b
Perhaps this is supposed to inject it as a value somehow but doesn't work. As a work-around, you could redefine @theme {
--leading-none: 1
} Or use |
Thank you @wongjn for the investigation and @RobinMalfait for the speedy fix. I wound up changing a lot of places to |
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 theline-height
fornone
leading. The generated ruleset for, e.g.text-3xl/none
doesn't contain the expectedline-height: 1
.The example shows pairs of identical text at different sizes. Each pair shows:
text-3xl/none
)text-3xl leading-none
)Expected behavior:
text-3xl/none
should be equivalent totext-3xl leading-none
Actual behavior:
Toggling the example to Tailwind v3 shows that this behavior is new with v4.
The text was updated successfully, but these errors were encountered: