/
githubmirror
/
tailwindcss
Обзор
Документация
Войти
/
githubmirror
/
tailwindcss
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v3.4.19
src/util/parseObjectStyles.js
19 строк
429 B
Robin Malfait
Remove lodash (#5390)
06 сен 2021, 21:15
Не верифицирован
06 сен 2021, 21:15
a34bd62
Код
Авторство
О чём код?
import postcss from 'postcss' import postcssNested from 'postcss-nested' import postcssJs from 'postcss-js' export default function parseObjectStyles(styles) { if (!Array.isArray(styles)) { return parseObjectStyles([styles]) } return styles.flatMap((style) => { return postcss([ postcssNested({ bubble: ['screen'], }), ]).process(style, { parser: postcssJs, }).root.nodes }) }