-
Notifications
You must be signed in to change notification settings - Fork 0
/
uno.config.ts
104 lines (103 loc) · 3.03 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import {
defineConfig,
presetAttributify,
presetIcons,
presetTagify,
presetTypography,
presetUno,
presetWebFonts,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import transformerAttributifyJsx from '@unocss/transformer-attributify-jsx-babel'
export default defineConfig({
shortcuts: [
{
'flex-center': 'flex justify-center items-center',
'flex-between': 'flex justify-between items-center',
'flex-end': 'flex justify-end items-center',
},
],
theme: {
colors: {
'white': 'var(--white)',
'content-bg': 'var(--content-bg)',
'success-color': 'var(--success-color)',
'warning-color': 'var(--warning-color)',
'error-color': 'var(--error-color)',
'info-color': 'var(--info-color)',
'success-background-color': 'var(--success-background-color)',
'warning-background-color': 'var(--warning-background-color)',
'error-background-color': 'var(--error-background-color)',
'info-background-color': 'var(--info-background-color)',
'primary-color': 'var(--primary-color)',
'primary-hover-color': 'var(--primary-hover-color)',
'primary-active-color': 'var(--primary-active-color)',
'processing-color': 'var(--processing-color)',
'link-color': 'var(--link-color)',
'text-color': 'var(--text-color)',
'border-color': 'var(--border-color)',
'component-background': 'var(--component-background-color)',
'layout-body-background': 'var(--layout-body-background)',
'white-hover': 'var(--white-hover)',
'white-active': 'var(--white-active)',
'ims-bg': 'var(--ims-bg)',
},
fontFamily: {
code: 'FiraCode',
mone: 'OperatorMono',
moneItalic: 'OperatorMonoItalic',
},
breakpoints: {
xs: '480px',
sm: '576px',
md: '768px',
lg: '992px',
xl: '1200px',
xxl: '1600px',
},
},
presets: [
presetUno({
dark: 'class',
}),
// presetRemToPx({
// baseFontSize: 4,
// }),
presetAttributify({
// prefix: 'ims-',
// prefixedOnly: true,
}),
presetTypography(),
presetTagify({
// prefix: 'ims-',
extraProperties: { display: 'block' },
}),
presetIcons({
extraProperties: {
'scale': '1.2',
'display': 'inline-block',
'height': '1.2em',
'width': '1.2em',
'vertical-align': 'middle',
},
warn: true,
}),
presetWebFonts(),
],
transformers: [transformerAttributifyJsx(), transformerDirectives(), transformerVariantGroup()],
rules: [
[
'p-safe',
{
padding:
'env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)',
},
],
['pt-safe', { 'padding-top': 'env(safe-area-inset-top)' }],
['pb-safe', { 'padding-bottom': 'env(safe-area-inset-bottom)' }],
// [/^m-([\\.\d]+)$/, ([_, num]) => ({ margin: `${num}` })],
// [/^p-([\\.\d]+)$/, ([_, num]) => ({ padding: `${num}` })],
],
safelist: 'p-1 p-2 p-3 p-4'.split(' '),
})