Add keyframes as utilities instead of base
This commit is contained in:
parent
f8d7f245d5
commit
cda6d4d995
5 changed files with 178 additions and 178 deletions
|
|
@ -1,14 +1,14 @@
|
|||
import _ from 'lodash'
|
||||
|
||||
export default function() {
|
||||
return function({ addBase, addUtilities, e, theme, variants }) {
|
||||
return function({ addUtilities, e, theme, variants }) {
|
||||
const keyframesConfig = theme('keyframes')
|
||||
const keyframesStyles = _.fromPairs(
|
||||
_.toPairs(keyframesConfig).map(([name, keyframes]) => {
|
||||
return [`@keyframes ${name}`, keyframes]
|
||||
})
|
||||
)
|
||||
addBase(keyframesStyles)
|
||||
addUtilities(keyframesStyles)
|
||||
|
||||
const animationConfig = theme('animation')
|
||||
const utilities = _.fromPairs(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue