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
defaultLineHeights requires code repetition when used with responsive fontSize #2603
Comments
|
Yeah this is a deliberate trade-off I'm afraid — in our own work we basically never use the same line-height across changes in font size, we always change the line-height as well. The best solution if you don't want the default line-height stuff is to override your module.exports = {
theme: {
extend: {
fontSize: {
xs: '0.75rem',
sm: '0.875rem',
base: '1rem',
lg: '1.125rem',
xl: '1.25rem',
'2xl': '1.5rem',
'3xl': '1.875rem',
'4xl': '2.25rem',
'5xl': '3rem',
'6xl': '4rem',
}
}
}
}My personal opinion is that you probably don't actually want |
The change in behavior from 1.x to 2.x was mentioned in the docs, but this makes the information more explicit and also will bring this behavior to the attention of folks who are using tailwind for the first time. Resolves tailwindlabs/tailwindcss#2603, resolves tailwindlabs/tailwindcss#2852, and resolves tailwindlabs/tailwindcss#2907
The change in behavior from 1.x to 2.x was mentioned in the docs, but this makes the information more explicit and also will bring this behavior to the attention of folks who are using tailwind for the first time. Resolves tailwindlabs/tailwindcss#2603, resolves tailwindlabs/tailwindcss#2852, and resolves tailwindlabs/tailwindcss#2907
* Document leading and {screen}:text-{size} interactions
The change in behavior from 1.x to 2.x was mentioned in the docs, but this makes the information more explicit and also will bring this behavior to the attention of folks who are using tailwind for the first time.
Resolves tailwindlabs/tailwindcss#2603, resolves tailwindlabs/tailwindcss#2852, and resolves tailwindlabs/tailwindcss#2907
* Update font-size.mdx
* Update upgrading-to-v2.mdx
* Update line-height.mdx
Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
Describe the problem:
Non-responsive
leadingutilities don't work if used along with responsive variants of thefontSizeutility and thedefaultLineHeightsfuture enabled.This is more a problem of style and code repetition than a real bug, but it is quite annoying to deal with.
e.g.
A possible solution may be to mark the
leadingutility as!important, but it definitely should be discussed first.Link to a minimal reproduction:
https://play.tailwindcss.com/Lw5MjdPa6J
The text was updated successfully, but these errors were encountered: