2020-04-16 11:01:24 -04:00
|
|
|
import _ from 'lodash'
|
|
|
|
|
import flattenColorPalette from '../util/flattenColorPalette'
|
|
|
|
|
|
|
|
|
|
export default function() {
|
|
|
|
|
return function({ addUtilities, e, theme, variants }) {
|
|
|
|
|
const colors = flattenColorPalette(theme('divideColor'))
|
|
|
|
|
|
|
|
|
|
const utilities = _.fromPairs(
|
|
|
|
|
_.map(_.omit(colors, 'default'), (value, modifier) => {
|
|
|
|
|
return [
|
2020-04-16 16:05:20 -04:00
|
|
|
`.${e(`divide-${modifier}`)} > :not(:last-child)`,
|
2020-04-16 11:01:24 -04:00
|
|
|
{
|
|
|
|
|
'border-color': value,
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
addUtilities(utilities, variants('divideColor'))
|
|
|
|
|
}
|
|
|
|
|
}
|