forked from ielvisd/boostpow-meetings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuno.config.js
56 lines (55 loc) · 1.29 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
import { defineConfig, presetUno, presetAttributify } from "unocss";
import transformerDirective from '@unocss/transformer-directives'
export default defineConfig({
presets: [presetAttributify({}), presetUno()],
transformers: [
transformerDirective(),
],
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] };
},
],
],
});