mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Simplify backgroundColor generator
This commit is contained in:
parent
7ae71315f9
commit
d2b2722b2e
@ -3,11 +3,9 @@ import defineClass from '../util/defineClass'
|
||||
import normalizeColorList from '../util/normalizeColorList'
|
||||
|
||||
export default function ({ colors, backgroundColors }) {
|
||||
backgroundColors = normalizeColorList(backgroundColors, colors)
|
||||
|
||||
return _(backgroundColors).toPairs().map(([className, color]) => {
|
||||
return _.map(normalizeColorList(backgroundColors, colors), (color, className) => {
|
||||
return defineClass(`bg-${className}`, {
|
||||
backgroundColor: color,
|
||||
})
|
||||
}).value()
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user