Skip to content

Commit fdd9cdf

Browse files
committed
add color-mix() to colorFunctionRegex
1 parent d49e03a commit fdd9cdf

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
@@ -4,7 +4,7 @@ const fractionRegex = /^\d+\/\d+$/
44
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/
55
const lengthUnitRegex =
66
/\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))|\b(calc|min|max|clamp)\(.+\)|^0$/
7-
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/
7+
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/
88
// Shadow always begins with x and y offset separated by underscore optionally prepended by inset
99
const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/
1010
const imageRegex =

0 commit comments

Comments
 (0)