-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathuno.config.ts
More file actions
47 lines (46 loc) · 1.25 KB
/
Copy pathuno.config.ts
File metadata and controls
47 lines (46 loc) · 1.25 KB
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
import {
defineConfig,
presetAttributify,
presetIcons,
presetUno,
presetWebFonts,
transformerAttributifyJsx,
transformerDirectives,
transformerVariantGroup,
} from "unocss";
export default defineConfig({
presets: [
presetUno(),
presetAttributify({
prefixedOnly: true,
}),
presetIcons({ scale: 1 }),
// presetTypography(),
presetWebFonts({
provider: "none",
fonts: {
sans: [
{ name: "LXGW Neo XiHei", provider: "none" },
{ name: "Microsoft YaHei", provider: "none" },
],
mono: [
{ name: "Ubuntu Mono", provider: "none" },
],
},
}),
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
transformerAttributifyJsx(),
],
rules: [
["h-content", { height: "calc(100vh - var(--g-header-height) - var(--g-footer-height) - 2rem)" }],
["min-h-content", { "min-height": "calc(100vh - var(--g-header-height) - var(--g-footer-height) - 2rem)" }],
[/^(?:grid-)?col-gap-(\d+)$/, ([,d]) => ({ "column-gap": `${Number(d) / 4}rem` })],
[/^(?:grid-)?row-gap-(\d+)$/, ([,d]) => ({ "row-gap": `${Number(d) / 4}rem` })],
],
shortcuts: [
["flex-table", "flex-grow-1 flex-shrink-0 flex-basis-16rem"],
],
});