-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathunocss.config.ts
More file actions
83 lines (78 loc) · 2.38 KB
/
Copy pathunocss.config.ts
File metadata and controls
83 lines (78 loc) · 2.38 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
import { defineConfig, presetWind4 } from 'unocss'
export default defineConfig({
presets: [
presetWind4(),
],
// Wind4 uses color-mix with oklch - opacity modifiers (bg-surface/50)
// don't work with CSS variables. Use color-mix shortcuts instead.
shortcuts: {
'bg-glass-surface': '[background:color-mix(in_srgb,var(--v0-surface)_70%,transparent)] backdrop-blur-12',
'border-subtle': '[border-color:color-mix(in_srgb,var(--v0-divider)_50%,transparent)]',
'sr-only': 'absolute w-1px h-1px p-0 -m-1px overflow-hidden whitespace-nowrap border-0',
},
preflights: [
{
getCSS: ({ theme }) => `
:root {
--font-sans: ${theme.font.sans.join(', ')};
--font-mono: ${theme.font.mono.join(', ')};
}
html {
scrollbar-gutter: stable;
}
button:not(:disabled),
[role="button"]:not(:disabled) {
cursor: pointer;
}
*:focus-visible {
outline: 2px solid var(--v0-primary);
outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
`,
},
],
theme: {
font: {
sans: [
'"Recursive Variable"',
'system-ui',
'sans-serif',
],
mono: [
'"Recursive Mono"',
'monospace',
],
},
colors: {
'primary': 'var(--v0-primary)',
'secondary': 'var(--v0-secondary)',
'error': 'var(--v0-error)',
'info': 'var(--v0-info)',
'success': 'var(--v0-success)',
'warning': 'var(--v0-warning)',
'background': 'var(--v0-background)',
'surface': 'var(--v0-surface)',
'surface-tint': 'var(--v0-surface-tint)',
'surface-variant': 'var(--v0-surface-variant)',
'divider': 'var(--v0-divider)',
'on-primary': 'var(--v0-on-primary)',
'on-secondary': 'var(--v0-on-secondary)',
'on-error': 'var(--v0-on-error)',
'on-info': 'var(--v0-on-info)',
'on-success': 'var(--v0-on-success)',
'on-warning': 'var(--v0-on-warning)',
'on-background': 'var(--v0-on-background)',
'on-surface': 'var(--v0-on-surface)',
'on-surface-variant': 'var(--v0-on-surface-variant)',
},
},
})