Repository navigation
Expand file tree
/
Copy pathuno.config.ts
More file actions
59 lines (53 loc) · 1.59 KB
/
Copy pathuno.config.ts
File metadata and controls
59 lines (53 loc) · 1.59 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
48
49
50
51
52
53
54
55
56
57
58
59
// uno.config.ts
import { defineConfig, presetWind3 } from "unocss";
import presetIcons from "@unocss/preset-icons";
import transformerDirectives from "@unocss/transformer-directives";
// import extractorPug from '@unocss/extractor-pug'
export default defineConfig({
presets: [presetWind3(), presetIcons()],
extractors: [
// extractorPug(),
],
content: {
pipeline: {
include: [
/\.(vue|svelte|[jt]sx?|mdx?|astro|elm|php|typ|html)($|\?)/,
]
}
},
blocklist: ["b", "container", "me", "my", "pl", "pr", "pt", "pb", "px"],
rules: [
// theme
["text-2nd", { color: "var(--text-secondary)" }],
["text-hint", { color: "var(--text-hint)" }],
["resizable", { resize: "inline"}],
// vertical
["upright", { "text-combine-upright": "all" }],
["yoko", { "text-combine-upright": "all" }],
["bn", { "text-decoration-style": "wavy", "text-decoration-line": "underline" }],
// overflow
[/overflow-(inline|block)-(hidden|auto|scroll|clip)/, function* ([, axis, type]) {
yield {
overflow: type
}
yield {
[`overflow-${axis}`]: type
}
}
],
// transform
[/flip-(x|y)/, ([, axis]) => ({
transform: `scale${axis.toUpperCase()}(-1)`
})],
[/flip-(inline|block)/, function* ([, axis], { symbols }) {
yield {
transform: `scale${axis === "inline" ? "X" : "Y"}(-1)`
}
yield {
[symbols.selector]: selector => `#vert:target ${selector}`,
transform: `scale${axis === "block" ? "X" : "Y"}(-1)`
}
}],
],
transformers: [transformerDirectives()],
});