Merge branch 'master' of git://github.com/Acidic9/tailwindcss into Acidic9-master

This commit is contained in:
Adam Wathan 2019-08-06 07:33:49 -04:00
commit 4695f536c7
2 changed files with 68 additions and 1 deletions

View file

@ -3,6 +3,7 @@ import isFunction from 'lodash/isFunction'
import defaults from 'lodash/defaults'
import map from 'lodash/map'
import toPath from 'lodash/toPath'
import startsWith from 'lodash/startsWith'
const configUtils = {
negative(scale) {
@ -11,7 +12,9 @@ const configUtils = {
.reduce(
(negativeScale, key) => ({
...negativeScale,
[`-${key}`]: `-${scale[key]}`,
[`-${key}`]: ['var(', 'calc('].some(prefix => startsWith(scale[key], prefix))
? `calc(${scale[key]} * -1)`
: `-${scale[key]}`,
}),
{}
)