-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathuno.config.ts
65 lines (62 loc) · 1.28 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
import {
defineConfig,
presetAttributify,
presetIcons,
presetUno,
toEscapedSelector,
transformerDirectives
} from 'unocss'
import presetRemToPx from '@unocss/preset-rem-to-px'
export default defineConfig({
presets: [
presetUno(),
presetAttributify(),
presetIcons(),
presetRemToPx({
baseFontSize: 4
})
],
transformers: [
transformerDirectives()
],
theme: {
colors: {
primary: '#692ee6',
success: '#52c41a',
warning: '#fe7d18',
danger: '#fa5555',
info: '#909399',
bgcolor: '#f2ecee'
}
},
rules: [
[
'navbar-shadow', {
'box-shadow': '0 1px 4px rgb(0 21 41 / 8%)'
}
],
[
/^wrapper-dialog-(.+)$/,
([, name], { rawSelector, theme }) => {
const themeColor = (theme as any).colors
const selector = toEscapedSelector(rawSelector)
return `
${ selector } {
display: flex;
flex-direction: column;
padding: 0;
overflow: hidden;
}
${ selector } .n-dialog__title {
padding: var(--n-padding);
}
${ selector } .n-dialog__content {
display: flex;
flex: 1;
min-height: 0;
}
`
}
]
]
})