Add PostCSS text color utilities
This commit is contained in:
parent
c9e4652065
commit
f0dda61e76
7 changed files with 943 additions and 71 deletions
11
src/generators/textColors.js
Normal file
11
src/generators/textColors.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import _ from 'lodash'
|
||||
import defineClass from '../util/defineClass'
|
||||
import normalizeColorList from '../util/normalizeColorList'
|
||||
|
||||
export default function ({ colors, text }) {
|
||||
return _.map(normalizeColorList(text.colors, colors), (color, modifier) => {
|
||||
return defineClass(`text-${modifier}`, {
|
||||
'color': color,
|
||||
})
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue