-
Notifications
You must be signed in to change notification settings - Fork 0
/
uno.config.ts
85 lines (77 loc) · 2.48 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import { defineConfig, transformerCompileClass } from 'unocss';
import { presetUseful } from 'unocss-preset-useful';
import { theme as windTheme } from 'unocss/preset-wind';
export default defineConfig({
preflights: [
{
getCSS: ({ theme }) => `
@media (min-width: ${theme.breakpoints?.lg}) {
:root {
--font-heading-1: 2.5rem;
--leading-heading-1: 3rem;
--font-heading-2: 2rem;
--leading-heading-2: 2.5rem;
--font-heading-3: 2.5rem;
--leading-heading-3: 2rem;
--font-heading-4: 1.25rem;
--leading-heading-4: 1.75rem;
--font-body: 1rem;
--leading-body: 1.5rem;
--font-tiny: 0.875rem;
--leading-tiny: 1.25rem;
}
}
body {
color-scheme: light;
text-rendering: optimizeLegibility;
@apply font-sans font-normal text-body text-neutral-950 bg-neutral-100 font-synthesis-none antialiased;
}
`,
},
],
theme: {
colors: {
inherit: 'inherit',
current: 'currentColor',
transparent: 'transparent',
black: '#000',
white: '#fff',
primary: windTheme.colors?.blue || 'var(--color-primary)',
neutral: windTheme.colors?.gray || 'var(--color-neutral)',
danger: windTheme.colors?.red || 'var(--color-danger)',
warning: windTheme.colors?.amber || 'var(--color-warning)',
success: windTheme.colors?.green || 'var(--color-success)',
info: windTheme.colors?.sky || 'var(--color-info)',
},
fontSize: {
'heading-1': ['var(--font-heading-1, 2.25rem)', 'var(--leading-heading-1, 2.75rem)'],
'heading-2': ['var(--font-heading-2, 1.75rem)', 'var(--leading-heading-2, 2.25rem)'],
'heading-3': ['var(--font-heading-3, 1.5rem)', 'var(--leading-heading-3, 2rem)'],
'heading-4': ['var(--font-heading-4, 1.25rem)', 'var(--leading-heading-4, 1.75rem)'],
body: ['var(--font-body, 1rem)', 'var(--leading-body, 1.5rem)'],
tiny: ['var(--font-tiny, 0.875rem)', 'var(--leading-tiny, 1.25rem)'],
},
container: {
center: true,
padding: '2rem',
maxWidth: {
'2xl': '1400px',
},
},
},
presets: [
presetUseful({
enableMagicAnimations: false,
icons: {
scale: 1.25,
},
webFonts: {
provider: 'fontshare',
fonts: {
sans: 'Quicksand',
},
},
}),
],
transformers: [transformerCompileClass()],
});