Skip to content

Commit 9703ee1

Browse files
committed
updates lab and lch matchers
1 parent 058b2cf commit 9703ee1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ const isHue = node => isCalc(node) || node.type === 'number' && hueUnitMatch.tes
135135
const isNumber = node => isCalc(node) || node.type === 'number' && node.unit === '';
136136
const isPercentage = node => isCalc(node) || node.type === 'number' && node.unit === '%';
137137
const isSlash = node => node.type === 'operator' && node.value === '/';
138-
const functionalLABMatch = [isNumber, isNumber, isNumber, isSlash, isAlphaValue];
139-
const functionalLCHMatch = [isNumber, isNumber, isHue, isSlash, isAlphaValue];
138+
const functionalLABMatch = [isPercentage, isNumber, isNumber, isSlash, isAlphaValue];
139+
const functionalLCHMatch = [isPercentage, isNumber, isHue, isSlash, isAlphaValue];
140140
const functionalGrayMatch = [isNumber, isSlash, isAlphaValue];
141141
const matchFunctionalLAB = children => children.every(
142142
(child, index) => typeof functionalLABMatch[index] === 'function' && functionalLABMatch[index](child)

0 commit comments

Comments
 (0)