/
lostSun
/
project-client-server-apps
Обзор
Документация
Войти
/
lostSun
/
project-client-server-apps
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
node_modules/tailwindcss/src/util/getAllConfigs.js
38 строк
1 KB
1lostsun
initial commit
05 май 2025, 11:35
05 май 2025, 11:35
fe8f535
Код
Авторство
О чём код?
import defaultFullConfig from '../../stubs/config.full.js' import { flagEnabled } from '../featureFlags' export default function getAllConfigs(config) { const configs = (config?.presets ?? [defaultFullConfig]) .slice() .reverse() .flatMap((preset) => getAllConfigs(preset instanceof Function ? preset() : preset)) const features = { // Add experimental configs here... respectDefaultRingColorOpacity: { theme: { ringColor: ({ theme }) => ({ DEFAULT: '#3b82f67f', ...theme('colors'), }), }, }, disableColorOpacityUtilitiesByDefault: { corePlugins: { backgroundOpacity: false, borderOpacity: false, divideOpacity: false, placeholderOpacity: false, ringOpacity: false, textOpacity: false, }, }, } const experimentals = Object.keys(features) .filter((feature) => flagEnabled(config, feature)) .map((feature) => features[feature]) return [config, ...experimentals, ...configs] }