-
Notifications
You must be signed in to change notification settings - Fork 0
/
uno.config.ts
82 lines (80 loc) · 1.66 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// refer: https://github.com/antfu/antfu.me/blob/main/unocss.config.ts
import {
defineConfig,
presetUno,
presetIcons,
presetAttributify,
presetWebFonts,
transformerDirectives
} from 'unocss'
export default defineConfig({
presets: [
presetUno(),
presetAttributify({
/* preset options */
}),
presetIcons({
extraProperties: {
display: 'inline-block',
height: '1.2em',
width: '1.2em',
'vertical-align': 'text-bottom'
}
}),
presetWebFonts({
fonts: {
sans: 'Inter:400,600,800',
mono: 'DM Mono:400,600'
}
})
],
shortcuts: [
{
'bg-base': 'bg-white dark:bg-black',
'border-base': 'border-[#8884]'
},
[
/^btn-(\w+)$/,
([, color]) =>
`op50 px2.5 py1 transition-all duration-200 ease-out no-underline! hover:(op100 text-${color} bg-${color}/10) border border-base! rounded`
]
],
rules: [
[
'transition-transform-op',
{
transition:
'transform 0.2s ease-in-out 0s, opacity 0.2s ease-in-out 0.1s !important;'
}
],
[
'text-shadow-6',
{
'text-shadow': '15px 10px 10px gray'
}
],
[
'color-rainbow',
{
color: 'var(--rainbow-color)'
}
],
[
'text-rainbow',
{
background: 'var(--rainbow-background)',
'background-clip': 'text',
'-webkit-background-clip': 'text',
'-webkit-text-fill-color': 'transparent'
}
],
[
'font-fantasy',
{
'font-family': 'fantasy'
}
]
],
transformers: [transformerDirectives()],
safelist: ['i-ri-menu-2-fill']
})