Add opacity modifiers for color utilities
This commit is contained in:
parent
30e0cb10b7
commit
3b565d1f9c
25 changed files with 24761 additions and 521 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import _ from 'lodash'
|
||||
import flattenColorPalette from '../util/flattenColorPalette'
|
||||
import withAlphaVariable from '../util/withAlphaVariable'
|
||||
|
||||
export default function() {
|
||||
return function({ addUtilities, e, theme, variants }) {
|
||||
|
|
@ -7,9 +8,7 @@ export default function() {
|
|||
_.map(flattenColorPalette(theme('textColor')), (value, modifier) => {
|
||||
return [
|
||||
`.${e(`text-${modifier}`)}`,
|
||||
{
|
||||
color: value,
|
||||
},
|
||||
withAlphaVariable({ color: value, property: 'color', variable: '--text-opacity' }),
|
||||
]
|
||||
})
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue