-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuno.config.ts
More file actions
161 lines (152 loc) · 4 KB
/
uno.config.ts
File metadata and controls
161 lines (152 loc) · 4 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
import {
defineConfig,
presetIcons,
presetTypography,
presetWind3,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import presetAnimations from 'unocss-preset-animations'
import presetShadcn from 'unocss-preset-shadcn'
export default defineConfig({
shortcuts: [
{
code: 'rounded-sm bg-muted-foreground/20 px-1 font-mono',
},
],
rules: [
[/^no-scrollbar$/, () => `
.no-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
display: none;
}
`],
[
'backdrop-pixelate',
{
'backdrop-filter': 'url(#pixelate) blur(1px)',
},
],
[
'scrollbar-gutter-stable',
{
'scrollbar-gutter': 'stable',
},
],
[/^bg-speckles$/, ([,]) => `
.bg-speckles {
background-color: hsl(var(--background));
background-image:
radial-gradient(hsl(var(--foreground) / 0.12) 1px, transparent 1px),
radial-gradient(hsl(var(--foreground) / 0.09) 1px, transparent 1px),
radial-gradient(hsl(var(--foreground) / 0.08) 1px, transparent 1px),
radial-gradient(hsl(var(--foreground) / 0.075) 1px, transparent 1px),
radial-gradient(hsl(var(--foreground) / 0.07) 1px, transparent 1px);
background-size:
48px 48px,
48px 48px,
64px 64px,
64px 64px,
80px 80px;
background-position:
0 0,
24px 24px,
12px 36px,
36px 12px,
40px 0;
}
`],
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
presets: [
presetWind3(),
presetTypography(),
presetAnimations(),
presetShadcn(
{
color: 'neutral',
},
),
presetIcons({
collections: {
logo: {
yuo: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> <path fill="currentColor" d="M46.1 187l324.6 411.4c11.5 14.6 12.1 35 1.5 50.3L239.5 839.9c-19.5 28.1.6 66.5 34.7 66.5h223.7c14.5 0 27.9-7.4 35.6-19.6l446.9-704.1c17.8-28.1-2.4-64.9-35.8-64.9h-84.4L698 118c-11.5 0-26.4 7.4-33.4 16.5L553.9 278.1c-18 23.4-47.9 23.7-66.5.8l-117-145.3c-6.9-8.6-21.7-15.7-32.9-15.7H185.5l-106.5.8C43.9 118.7 24.4 159.4 46.1 187z"/></svg>',
},
},
extraProperties: {
'display': 'inline-block',
'vertical-align': 'middle',
},
}),
],
preflights: [
{
getCSS: () => {
return `
html {
padding: 0;
margin: 0;
height: 100dvh;
width: 100dvw;
overflow: hidden;
scrollbar-width: thin;
scrollbar-color: black transparent;
}
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: hsl(var(--background));
}
::-webkit-scrollbar-thumb {
background-color: hsl(var(--primary));
border-radius: 4px;
transition: background-color .2s ease-in-out;
}
::-webkit-scrollbar-thumb:hover {
background-color: hsl(var(--primary));
}
@view-transition {
navigation: auto;
}
::view-transition-old(root) {
animation: 400ms cubic-bezier(0.4, 0, 0.2, 1) both fade-out;
}
::view-transition-new(root) {
animation: 400ms cubic-bezier(0.4, 0, 0.2, 1) both fade-in;
}
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fade-out {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
`
},
},
],
content: {
pipeline: {
include: [
/\.(vue|svelte|[jt]sx|mdx?|astro|elm|php|phtml|html)($|\?)/,
'src/**/*.{js,ts}',
],
},
},
})