-
Notifications
You must be signed in to change notification settings - Fork 0
/
unocss.config.ts
46 lines (44 loc) · 1.1 KB
/
unocss.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
import { resolve } from 'path'
import {
defineConfig,
presetAttributify,
presetIcons,
presetTypography,
presetUno,
transformerCompileClass,
transformerVariantGroup,
} from 'unocss'
import presetRemToPx from '@unocss/preset-rem-to-px'
import presetLegacyCompat from '@unocss/preset-legacy-compat'
// loader helpers
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders'
import { presetDaisy } from 'unocss-preset-daisy'
// icons path
const iconsPath = resolve(__dirname, 'src/assets/icons')
export default defineConfig({
presets: [
presetUno(),
presetDaisy(),
presetAttributify(),
presetTypography(),
presetRemToPx({
baseFontSize: 16,
}),
presetLegacyCompat({
commaStyleColorFunction: true,
}),
presetIcons({
extraProperties: {
display: 'inline-block',
'vertical-align': 'middle',
},
collections: {
custom: FileSystemIconLoader(iconsPath),
},
}),
],
transformers: [transformerCompileClass(), transformerVariantGroup()],
shortcuts: {
'wh-full': ['w-full', 'h-full'],
},
})