-
Notifications
You must be signed in to change notification settings - Fork 0
/
unocss.config.ts
46 lines (45 loc) · 1.05 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 { defineConfig, presetAttributify, presetUno, presetIcons } from 'unocss'
export default defineConfig({
content: {
pipeline: {
exclude: [
'node_modules',
'dist',
'.git',
'.husky',
'.vscode',
'public',
'build',
'mock',
'./stats.html',
],
},
},
shortcuts: [
{
'flex-center': 'flex justify-center items-center',
},
],
rules: [
[
'font-yahei',
{ 'font-family': '"Microsoft YaHei","Microsoft Sans Serif","Microsoft SanSerf","微软雅黑"' },
],
[
/^color-(\d+)$/,
([, colorNum]) => {
return { color: `rgb(var(--color-${colorNum}))` }
// return { color: `var(--color-${colorNum})${hexAlpha}` }
},
],
[
/^bgc-(\d+)$/,
([, colorNum]) => {
return { 'background-color': `rgb(var(--color-${colorNum}))` }
// return { color: `var(--color-${colorNum})${hexAlpha}` }
},
],
],
theme: {},
presets: [presetUno(), presetIcons(), presetAttributify()],
})