Make listStyleType customizable

This commit is contained in:
Adam Wathan 2019-03-13 14:19:29 -04:00
parent 137159aaa9
commit 7b8ebc525e
2 changed files with 17 additions and 8 deletions

View File

@ -329,5 +329,8 @@ module.exports = function() {
'0': 0,
default: 1,
},
listStyleType: {
none: 'none',
},
}
}

View File

@ -1,12 +1,18 @@
import _ from 'lodash'
export default function() {
return function({ addUtilities, config }) {
addUtilities(
{
'.list-none': {
'list-style-type': 'none',
},
},
config('variants.listStyleType')
return function({ addUtilities, e, config }) {
const utilities = _.fromPairs(
_.map(config('theme.listStyleType'), (value, modifier) => {
return [
`.${e(`list-${modifier}`)}`,
{
'list-style-type': value,
},
]
})
)
addUtilities(utilities, config('variants.listStyleType'))
}
}