-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
unocss.config.ts
54 lines (50 loc) · 1.29 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
53
54
import {
defineConfig,
presetAttributify,
presetIcons,
presetUno,
transformerDirectives,
transformerVariantGroup,
} from "unocss";
import presetChinese from "unocss-preset-chinese";
import presetEase from "unocss-preset-ease";
export default defineConfig({
presets: [
presetUno(),
presetAttributify(),
presetChinese(),
presetEase(),
presetIcons({
scale: 1.5,
}),
],
shortcuts: {
// position
"common-bg": "bg-gray-100 dark:bg-gray-900",
"pr": "relative",
"pa": "absolute",
"pf": "fixed",
"ps": "sticky",
// position layout
"position-x-center": "absolute left-1/2 -translate-x-1/2",
"pxc": "position-x-center",
"position-y-center": "absolute top-1/2 -translate-y-1/2",
"pyc": "position-y-center",
"position-center": "position-x-center position-y-center",
"pc": "position-center",
// size
"size-0": "w-0 h-0",
"size-full": "w-full h-full",
"size-screen": "w-screen h-screen",
"size-1/2": "w-1/2 h-1/2",
// flex layout
"flex-center": "flex justify-center items-center",
"flex-col-center": "flex-center flex-col",
"flex-x-center": "flex justify-center",
"flex-y-center": "flex items-center",
},
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
});