Skip to content

Commit 579a446

Browse files
thierrycGarthDB
authored andcommitted
feat(tokens): Format HSL tokens for Style Dictionary compatibility
Removed unnecessary 'deg' units from HSL tokens to ensure correct parsing by Style Dictionary.
1 parent d6edd6e commit 579a446

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

packages/contrast-colors/lib/utils.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,6 @@ function convertColorValue(color, format, object = false) {
352352
if (letter === 'l' || letter === 'j') {
353353
rnd += '%';
354354
}
355-
if (letter === 'h') {
356-
rnd += 'deg';
357-
}
358355
}
359356
} else if (space !== 'hsluv') {
360357
if (letter === 's' || letter === 'l' || letter === 'v') {
@@ -363,8 +360,6 @@ function convertColorValue(color, format, object = false) {
363360
rnd = round(ch * 100);
364361
rnd += '%';
365362
}
366-
} else if (letter === 'h' && !object) {
367-
rnd += 'deg';
368363
}
369364
}
370365
return rnd;

0 commit comments

Comments
 (0)