-
Notifications
You must be signed in to change notification settings - Fork 0
/
uno.config.ts
65 lines (64 loc) · 1.24 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import {
defineConfig,
presetUno,
presetTypography,
presetWebFonts,
} from "unocss";
import { presetForms } from "@julr/unocss-preset-forms";
export default defineConfig({
presets: [
presetUno(),
presetTypography({
cssExtend: {
"h1,h2,h3,h4,h5.h6": {
"font-family": "'Poppins'",
},
},
}),
presetWebFonts(),
presetForms(),
],
rules: [
// Match bg-accent-xxx to the a theme CSS variable (background color)
// e.g. bg-accent-500 -> --theme-bg-accent-500
[
/^bg-accent-(\d+)$/,
([, d]) => ({
"--un-bg-opacity": "1",
"background-color": `rgba(var(--theme-bg-accent-${d}), var(--un-bg-opacity))`,
}),
],
[
/^fill-accent-(\d+)$/,
([, d]) => ({
fill: `rgb(var(--theme-bg-accent-${d}))`,
}),
],
[
/^ring-accent-(\d+)$/,
([, d]) => ({
"--un-ring-color": `rgb(var(--theme-bg-accent-${d}))`,
}),
],
[
/^border-accent-(\d+)$/,
([, d]) => ({
"border-color": `rgb(var(--theme-bg-accent-${d}))`,
}),
],
// Do the same for text-color
[
/^text-accent-(\d+)$/,
([, d]) => ({
color: `var(--theme-color-accent-${d})`,
}),
],
],
content: {
pipeline: {
include: [
/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html|ts)($|\?)/,
],
},
},
});