Add support for negative calc values
This commit is contained in:
parent
03b73b135d
commit
d3675ebd23
2 changed files with 5 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ const configUtils = {
|
|||
.reduce(
|
||||
(negativeScale, key) => ({
|
||||
...negativeScale,
|
||||
[`-${key}`]: startsWith(scale[key], 'var(')
|
||||
[`-${key}`]: ['var(', 'calc('].some(prefix => startsWith(scale[key], prefix))
|
||||
? `calc(${scale[key]} * -1)`
|
||||
: `-${scale[key]}`,
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue