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
1 change: 1 addition & 0 deletions packages/tailwindcss/src/utilities.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11877,6 +11877,7 @@ test('font-stretch', async () => {
'font-stretch-20%',
'font-stretch-50',
'font-stretch-400%',
'font-stretch-50.5%',
'font-stretch-potato',
'font-stretch-ultra-expanded/foo',
'font-stretch-50%/foo',
Expand Down
1 change: 1 addition & 0 deletions packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3146,6 +3146,7 @@ export function createUtilities(theme: Theme) {
handleBareValue: ({ value }) => {
if (!value.endsWith('%')) return null
let num = Number(value.slice(0, -1))
if (!isPositiveInteger(num)) return null
// Only 50-200% (inclusive) are valid:
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-stretch#percentage
if (Number.isNaN(num) || num < 50 || num > 200) return null
Expand Down