Typography utilities have redundant properties that can be improved. #18741
Closed
MikeLee0358
started this conversation in
General
Replies: 1 comment 2 replies
-
They are used with font size utilities: tailwindcss/packages/tailwindcss/src/utilities.ts Lines 5053 to 5064 in 7779d3d As per the documentation, you can use theme tokens to configure some typographic property defaults alongside a font size, including |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What version of Tailwind CSS are you using?
v4.1.11
What build tool (or framework if it abstracts the build tool) are you using?
N/A
What version of Node.js are you using?
N/A
What browser are you using?
FireFox
What operating system are you using?
macOS
Reproduction URL
tailwind playground
Describe your issue
<Note: I'm study tailwind source code>
The Typography utilities
letter-spacing
(tracking-) andfont-weight
(font-) have redundant properties.example: (see the tailwind playground link)
.font-thin {
--tw-font-weight: var(--font-weight-thin); <- redundant property
font-weight: var(--font-weight-thin); <- just use this is fine
}
.tracking-normal {
--tw-tracking: var(--tracking-normal); <- redundant property
letter-spacing: var(--tracking-normal);<- just use this is fine
}
I don't see var(--tw-font-weight) or var(--tw-tracking) used anywhere in the Typography utilities.
Are those used somewhere?
Beta Was this translation helpful? Give feedback.
All reactions