1 parent 7877ffa commit c3075d9Copy full SHA for c3075d9
1 file changed
src/util/resolveConfig.js
@@ -3,6 +3,7 @@ import isFunction from 'lodash/isFunction'
3
import defaults from 'lodash/defaults'
4
import map from 'lodash/map'
5
import toPath from 'lodash/toPath'
6
+import startsWith from 'lodash/startsWith'
7
8
const configUtils = {
9
negative(scale) {
@@ -11,7 +12,9 @@ const configUtils = {
11
12
.reduce(
13
(negativeScale, key) => ({
14
...negativeScale,
- [`-${key}`]: `-${scale[key]}`,
15
+ [`-${key}`]: startsWith(scale[key], 'var(')
16
+ ? `calc(${scale[key]} * -1)`
17
+ : `-${scale[key]}`,
18
}),
19
{}
20
)
0 commit comments