-
-
Notifications
You must be signed in to change notification settings - Fork 779
/
unocss.config.ts
52 lines (50 loc) · 1.42 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
47
48
49
50
51
52
// eslint-disable-next-line no-restricted-imports
import {
defineConfig,
presetAttributify,
presetIcons,
presetUno,
presetWebFonts,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
export const defaultConfig = defineConfig<{}>({
details: true,
presets: [
presetUno(),
presetAttributify(),
],
})
export default defineConfig({
...defaultConfig,
presets: [
...defaultConfig.presets!,
presetIcons({
scale: 1.2,
}),
presetWebFonts({
fonts: {
sans: 'Inter:100,200,400,700,800',
mono: 'IBM Plex Mono',
},
}),
],
shortcuts: [
{
'border-base': 'border-gray-500:10',
'bg-base': 'bg-white dark:bg-hex-121212',
'btn': 'px-4 py-1 inline-block bg-cyan6 hover:bg-cyan7 text-white cursor-pointer disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50',
'link': 'op50 hover:op100 hover:text-cyan6',
'divider': 'border-b border-base',
},
[/^badge-xs-(.*)$/, ([, c]) => `badge-${c} text-xs px2 py0.5`],
[/^badge-sm-(.*)$/, ([, c]) => `badge-${c} text-sm px3 py0.6`],
[/^badge-lg-(.*)$/, ([, c]) => `badge-${c} px3 py0.8`],
[/^badge-square-(.*)$/, ([, c]) => `badge-${c} w-7 h-7 text-lg font-200 flex flex-none items-center justify-center`],
[/^badge-(.*)$/, ([, c]) => `bg-${c}4:10 text-${c}5 rounded`],
],
transformers: [
transformerVariantGroup(),
transformerDirectives(),
],
})