tailwindcss/src/lib/evaluateTailwindFunctions.js

15 lines
367 B
JavaScript
Raw Normal View History

import _ from 'lodash'
import functions from 'postcss-functions'
export default function(config) {
return functions({
functions: {
theme: (path, ...defaultValue) => {
return _.thru(_.get(config.theme, _.trim(path, `'"`), defaultValue), value => {
return Array.isArray(value) ? value.join(', ') : value
})
2017-11-05 13:32:02 -06:00
},
},
})
}