Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Derive numeric line height utilities from spacing scale
  • Loading branch information
adamwathan committed Nov 5, 2024
commit c97a31eda9eee301a9d6e84e4eef169f465f79d5
Original file line number Diff line number Diff line change
Expand Up @@ -2416,6 +2416,11 @@ exports[`getClassList 1`] = `
"justify-self-stretch",
"justify-start",
"justify-stretch",
"leading-0.5",
"leading-1",
"leading-3",
"leading-4",
"leading-px",
"left-0.5",
"left-1",
"left-3",
Expand Down
13 changes: 5 additions & 8 deletions packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3607,14 +3607,11 @@ export function createUtilities(theme: Theme) {
staticUtility('forced-color-adjust-none', [['forced-color-adjust', 'none']])
staticUtility('forced-color-adjust-auto', [['forced-color-adjust', 'auto']])

functionalUtility('leading', {
themeKeys: ['--line-height'],
handle: (value) => [
atRoot([property('--tw-leading')]),
decl('--tw-leading', value),
decl('line-height', value),
],
})
spacingUtility('leading', ['--line-height'], (value) => [
atRoot([property('--tw-leading')]),
decl('--tw-leading', value),
decl('line-height', value),
])

functionalUtility('tracking', {
supportsNegative: true,
Expand Down
8 changes: 0 additions & 8 deletions packages/tailwindcss/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,6 @@
--line-height-normal: 1.5;
--line-height-relaxed: 1.625;
--line-height-loose: 2;
--line-height-3: 0.75rem;
--line-height-4: 1rem;
--line-height-5: 1.25rem;
--line-height-6: 1.5rem;
--line-height-7: 1.75rem;
--line-height-8: 2rem;
--line-height-9: 2.25rem;
--line-height-10: 2.5rem;

/* 3D perspectives */
--perspective-dramatic: 100px;
Expand Down