Skip to content

Commit

Permalink
"cssVarsHSLA" knob propery now also has % units to the SLA values
Browse files Browse the repository at this point in the history
  • Loading branch information
Yair Even Or authored and Yair Even Or committed Sep 7, 2021
1 parent 1bc514c commit 648c9aa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/knobs.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,9 @@ Knobs.prototype = {
if( type == 'color' && cssVarsHSLA ){
const hsla = CSStoHSLA(changeColorFormat(value, 'HSL'))
vars.push([`${cssVarName}-h`, hsla[0]],
[`${cssVarName}-s`, hsla[1]],
[`${cssVarName}-l`, hsla[2]],
[`${cssVarName}-a`, hsla[3]])
[`${cssVarName}-s`, hsla[1] + '%'],
[`${cssVarName}-l`, hsla[2] + '%'],
[`${cssVarName}-a`, hsla[3] + '%'])
}

// if is a refference to a single-node, place in an array.
Expand Down

0 comments on commit 648c9aa

Please sign in to comment.