Add keyframes as utilities instead of base

This commit is contained in:
Adam Wathan 2020-08-02 08:01:16 -04:00
parent f8d7f245d5
commit cda6d4d995
5 changed files with 178 additions and 178 deletions

View file

@ -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(