The @tailwindcss/upgrade tool incorrectly migrates leading-[1] to leading-1.
The leading utility supports bare values that map to a value directly, e.g.:
leading-123
/*! tailwindcss v4.0.0 | MIT License | https://tailwindcss.com */
.leading-123 {
--tw-leading: calc(var(--spacing) * 123);
line-height: calc(var(--spacing) * 123);
}
@property --tw-leading {
syntax: "*";
inherits: false;
}
However, some values exist in your @theme, such as leading-1, which maps to:
/*! tailwindcss v4.0.0 | MIT License | https://tailwindcss.com */
.leading-1 {
--tw-leading: calc(var(--spacing) * 1);
line-height: calc(var(--spacing) * 1);
}
@property --tw-leading {
syntax: "*";
inherits: false;
}
Which is now equivalent to 4px instead of 1 which makes this transformation unsafe.
Thanks @JeroenReumkens!
The
@tailwindcss/upgradetool incorrectly migratesleading-[1]toleading-1.The leading utility supports bare values that map to a value directly, e.g.:
leading-123However, some values exist in your
@theme, such asleading-1, which maps to:Which is now equivalent to
4pxinstead of1which makes this transformation unsafe.Thanks @JeroenReumkens!