-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuno.config.js
76 lines (75 loc) · 1.62 KB
/
uno.config.js
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
import {
defineConfig,
presetAttributify,
presetIcons,
presetWind,
presetWebFonts,
} from "unocss";
export default defineConfig({
presets: [
presetAttributify({}),
presetWind({}),
presetIcons({
collections: {
mdi: () =>
import("@iconify-json/mdi/icons.json").then((i) => i.default),
},
}),
presetWebFonts({
provider: "google", // default provider
fonts: {
// these will extend the default theme
sans: "Roboto",
mono: ["Fira Code", "Fira Mono:400,700"],
fredoka: "Fredoka",
},
}),
],
theme: {
colors: {},
size: {
xs: "4px",
sm: "8px",
md: "16px",
lg: "24px",
xl: "48px",
},
},
rules: [
["no-shadow", { "box-shadow": "none" }],
["q-ma-auto", { margin: "auto" }],
["q-pa-auto", { padding: "auto" }],
[
/^q-m[xy]-(\d+)$/,
([, d]) => ({
"margin-left": `${d / 4}rem`,
"margin-right": `${d / 4}rem`,
}),
],
[/^q-ma-(\d+)$/, ([, d]) => ({ margin: `${d / 4}rem` })],
[
/^q-p[xy]-(\d+)$/,
([, d]) => ({
"padding-left": `${d / 4}rem`,
"padding-right": `${d / 4}rem`,
}),
],
[/^q-pa-(\d+)$/, ([, d]) => ({ padding: `${d / 4}rem` })],
[
/^q-p[xy]-(.*)$/,
([, c], { theme }) => {
if (theme.size[c])
return {
"padding-left": theme.size[c],
"padding-right": theme.size[c],
};
},
],
[
/^q-pa-(.*)$/,
([, c], { theme }) => {
if (theme.size[c]) return { padding: theme.size[c] };
},
],
],
});