-
Notifications
You must be signed in to change notification settings - Fork 0
/
uno.config.ts
94 lines (92 loc) · 2.46 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
import { Preset, defineConfig } from "unocss";
import presetIcons from "@unocss/preset-icons";
import presetWind, { Theme } from "@unocss/preset-wind";
import presetWebFonts from "@unocss/preset-web-fonts";
const spacing = {
4: "4px",
8: "8px",
12: "12px",
16: "16px",
24: "24px",
32: "32px",
36: "36px",
42: "42px",
48: "48px",
64: "64px",
};
export default defineConfig({
presets: [
presetWind(),
presetIcons() as Preset<Theme>,
presetWebFonts({
provider: "google",
fonts: {
sans: "Inter:400,600,700",
},
}) as Preset<Theme>,
],
rules: [
[
/^size-(\d+)$/,
([, size]) => ({
width: `${size}px`,
height: `${size}px`,
}),
],
],
theme: {
container: {
center: true,
padding: {
DEFAULT: "24px",
},
maxWidth: {
md: "768px",
},
},
breakpoints: {
md: "768px",
},
spacing,
width: spacing,
height: spacing,
maxWidth: spacing,
maxHeight: spacing,
colors: {
primary: {
500: "#CE7879",
700: "#BC4749",
},
},
fontFamily: {
sans: "Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont",
},
// Based on https://www.modularscale.com/?16&px&1.125
fontSize: {
sm: ["0.889rem", "1.5rem"],
md: ["1rem", "1.5rem"],
lg: ["1.125em", "1.5rem"],
"xs-display": ["1.424rem", "1.25rem"],
"sm-display": ["1.802rem", "1.25rem"],
"md-display": ["2.027rem", "1.25rem"],
"lg-display": ["2.887rem", "1.25rem"],
"xl-display": ["3.653rem", "1.25rem"],
},
},
shortcuts: {
"text/lg/regular": "text-lg font-normal font-sans",
"text/lg/bold": "text-lg font-bold font-sans",
"text/md/regular": "text-md font-normal font-sans",
"text/md/bold": "text-md font-bold font-sans",
"text/sm/regular": "text-sm font-normal font-sans",
"text/sm/bold": "text-sm font-bold font-sans",
"display/xs/regular": "text-xs-display font-normal font-sans",
"display/sm/regular": "text-sm-display font-normal font-sans",
"display/sm/bold": "text-sm-display font-bold font-sans",
"display/md/regular": "text-md-display font-normal font-sans",
"display/lg/regular": "text-lg-display font-normal font-sans",
"display/xl/regular": "text-xl-display font-normal font-sans",
"display/xl/semibold": "text-xl-display font-semibold font-sans",
"display/xl/bold": "text-xl-display font-bold font-sans",
},
});