Skip to content

Commit 65bd950

Browse files
author
farreldarian
committed
Update regex that allows decimal
1 parent e8cb5a2 commit 65bd950

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/validators.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const arbitraryValueRegex = /^\[(.+)\]$/
22
const fractionRegex = /^\d+\/\d+$/
33
const stringLengths = new Set(['px', 'full', 'screen'])
4-
const tshirtUnitRegex = /^(\d+)?(xs|sm|md|lg|xl)$/
4+
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/
55
const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh)/
66
// Shadow always begins with x and y offset separated by underscore
77
const shadowRegex = /^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/

0 commit comments

Comments
 (0)