-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuno.config.ts
52 lines (49 loc) · 1.12 KB
/
uno.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import type { UserConfig } from '@unocss/core'
import {
defineConfig,
presetIcons,
presetTypography,
presetUno,
presetWebFonts,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import { tailwindColors } from './app/utils/constants'
import { themeClasses } from './app/utils/themeClasses'
export const colors: string[] = tailwindColors
.map((key) => {
return Object.values(themeClasses(key))?.map(item => item.split(' ')).flat()
})
.flat()
export const unocssConfig: UserConfig<any> = {
presets: [
presetUno(),
presetIcons({
extraProperties: {
'display': 'inline-block',
'height': '1.2em',
'width': '1.2em',
'vertical-align': 'text-bottom',
},
}),
presetTypography(),
presetWebFonts({
provider: 'bunny',
fonts: {
sans: ['Poppins', 'Poppins:400,500,600,700'],
mono: 'DM Sans Mono',
},
}),
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
safelist: colors,
theme: {
container: {
center: true,
},
},
}
export default defineConfig(unocssConfig)