-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunocss.config.ts
62 lines (61 loc) · 1.51 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
55
56
57
58
59
60
61
62
import { presetWind, theme } from "@unocss/preset-wind";
import {
transformerDirectives,
defineConfig,
transformerVariantGroup,
} from "unocss";
const parseValue = (value: string) => {
return value.replace(/_/g, " ");
};
// mask-image-[linear-gradient(135deg,#000_calc(50%_-_1px),transparent_calc(50%_-_1px))]
export default defineConfig({
rules: [
[
/^bg-image-\[(.+)\]$/,
([_, d]) => ({ "background-image": parseValue(d) }),
],
[/^transition-prop-\[(.+)\]$/, ([_, d]) => ({ transition: parseValue(d) })],
[
/^mask-image-\[(.+)\]$/,
([_, d]) => ({
"-webkit-mask-image": parseValue(d),
"mask-image": parseValue(d),
}),
],
],
theme: {
breakpoints: {
...theme.breakpoints,
md: "850px",
},
colors: {
brand: {
default: "#2c4f7c",
dark: "#335d92",
medium: "#446b9e",
light: "#4f88c6",
},
solid: {
default: "#2c4f7c",
darkbg: "#222222",
darkLighterBg: "#444444",
darkdefault: "#b8d7ff",
darkgray: "#252525",
gray: "#414042",
mediumgray: "#9d9d9d",
lightgray: "#f3f5f7",
dark: "#07254A",
medium: "#446b9e",
light: "#4f88c6",
accent: "#0cdc73",
secondaccent: "#0dfc85",
},
other: "#1e1e1e",
},
fontFamily: {
sans: "Gordita, " + theme.fontFamily!.sans,
},
},
presets: [presetWind()],
transformers: [transformerDirectives(), transformerVariantGroup()],
});