-
Notifications
You must be signed in to change notification settings - Fork 2
/
uno.config.ts
45 lines (44 loc) · 1.21 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
import { defineConfig, presetAttributify, presetWind } from "unocss";
import presetWebFonts from "@unocss/preset-web-fonts";
export default defineConfig({
presets: [
presetAttributify(),
presetWind({
dark: "class",
}),
presetWebFonts({
provider: "google",
fonts: {
lato: "Lato",
},
}),
],
variants: [
(matcher) => {
if (matcher.startsWith("htmx-request:")) {
return {
matcher: matcher.slice("htmx-request:".length),
selector: (s) => `.htmx-request ${s}, ${s}.htmx-request`,
};
}
if (matcher.startsWith("htmx-settling:")) {
return {
matcher: matcher.slice("htmx-settling:".length),
selector: (s) => `.htmx-settling ${s}, ${s}.htmx-settling`,
};
}
if (matcher.startsWith("htmx-swapping:")) {
return {
matcher: matcher.slice("htmx-swapping:".length),
selector: (s) => `.htmx-swapping ${s}, ${s}.htmx-swapping`,
};
}
if (matcher.startsWith("htmx-added:")) {
return {
matcher: matcher.slice("htmx-added:".length),
selector: (s) => `.htmx-added ${s}, ${s}.htmx-added`,
};
}
},
],
});