-
Notifications
You must be signed in to change notification settings - Fork 124
/
uno.config.ts
45 lines (44 loc) · 1.09 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
import presetRemToPx from "@unocss/preset-rem-to-px";
import {
defineConfig,
presetIcons,
presetUno,
transformerDirectives,
transformerVariantGroup,
} from "unocss";
export default defineConfig({
presets: [
presetUno(),
presetIcons(),
presetRemToPx({
baseFontSize: 4,
}),
],
transformers: [
transformerVariantGroup(),
transformerDirectives({
applyVariable: ["--uno"],
}),
],
rules: [["outline-none", { outline: "none" }]],
shortcuts: [
[/^bg-(\d+)$/, ([, d]) => `bg-[var(--color-bg-${d})]`],
[/^color-(\d+)$/, ([, d]) => `text-[var(--color-text-${d})]`],
[/^b-color-(\d+)$/, ([, d]) => `b-[var(--color-border-${d})]`],
[/^(.*)-primary-(\d+)$/, ([, s, d]) => `${s}-[var(--ant-blue-${d})]`],
{
"antd-input":
"b hover:b-primary-5 transition outline-none focus:antd-input-focus",
"antd-input-focus":
"b-primary shadow-[0_0_0_2px_rgba(5,145,255,0.1)] dark:shadow-[0_0_0_2px_rgba(0,60,180,0.15)]",
},
],
theme: {
colors: {
primary: "var(--ant-blue)",
success: "var(--ant-green)",
danger: "var(--ant-red)",
gold: "var(--ant-gold)",
},
},
});