47 lines
1.0 KiB
TypeScript
47 lines
1.0 KiB
TypeScript
import type { Config } from 'tailwindcss'
|
|
import { isMp, isQuickapp } from '@uni-helper/uni-env'
|
|
import { basePreset, elementPlusPreset, miniprogramBasePreset } from 'tailwind-extensions'
|
|
|
|
const presets: Config['presets'] = [basePreset]
|
|
if (isMp || isQuickapp) {
|
|
presets.push(
|
|
miniprogramBasePreset,
|
|
)
|
|
}
|
|
else {
|
|
presets.push(elementPlusPreset())
|
|
}
|
|
|
|
const theme: Config['theme'] = {
|
|
|
|
extend: {
|
|
colors: {
|
|
primary: '#4545E5',
|
|
default: '#828282',
|
|
disabled: '#D9D9D9',
|
|
},
|
|
backgroundColor: {
|
|
regular: '#F5F6F7',
|
|
},
|
|
spacing: {
|
|
'safe-top': 'env(safe-area-inset-top)',
|
|
'safe-bottom': 'env(safe-area-inset-bottom)',
|
|
'safe-left': 'env(safe-area-inset-left)',
|
|
'safe-right': 'env(safe-area-inset-right)',
|
|
},
|
|
},
|
|
boxShadow: {
|
|
'cell-group': '0px 4px 12px 0px rgba(0, 0, 0, 0.10)',
|
|
},
|
|
}
|
|
if (isMp || isQuickapp)
|
|
theme.screens = {}
|
|
|
|
const config: Config = {
|
|
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
|
|
presets,
|
|
theme,
|
|
}
|
|
|
|
export default config
|