Skip to content

Commit dc6a66e

Browse files
committed
add support for container query length units
1 parent 8daac7f commit dc6a66e

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
@@ -2,7 +2,7 @@ const arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i
22
const fractionRegex = /^\d+\/\d+$/
33
const stringLengths = new Set(['px', 'full', 'screen'])
44
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/
5-
const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh)/
5+
const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))/
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)/
88

0 commit comments

Comments
 (0)