mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Replace cool new JS features with lodash because node 8/10
This commit is contained in:
parent
29b0739c35
commit
d7732c70fc
@ -1,16 +1,18 @@
|
||||
import _ from 'lodash'
|
||||
|
||||
export default function() {
|
||||
return function({ addBase, addUtilities, e, theme, variants }) {
|
||||
const keyframesConfig = theme('keyframes')
|
||||
const keyframesStyles = Object.fromEntries(
|
||||
Object.entries(keyframesConfig).map(([name, keyframes]) => {
|
||||
const keyframesStyles = _.fromPairs(
|
||||
_.toPairs(keyframesConfig).map(([name, keyframes]) => {
|
||||
return [`@keyframes ${name}`, keyframes]
|
||||
})
|
||||
)
|
||||
addBase(keyframesStyles)
|
||||
|
||||
const animationConfig = theme('animation')
|
||||
const utilities = Object.fromEntries(
|
||||
Object.entries(animationConfig).map(([suffix, animation]) => {
|
||||
const utilities = _.fromPairs(
|
||||
_.toPairs(animationConfig).map(([suffix, animation]) => {
|
||||
return [
|
||||
`.${e(`animate-${suffix}`)}`,
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user