-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuno.config.ts
More file actions
76 lines (74 loc) · 2.55 KB
/
uno.config.ts
File metadata and controls
76 lines (74 loc) · 2.55 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
import type { Preset } from 'unocss'
import {
defineConfig,
presetAttributify,
presetWind3,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import presetTheme from 'unocss-preset-theme'
import { themeConfig } from './src/config.ts'
const { light, dark } = themeConfig.color
export default defineConfig({
presets: [
presetWind3(),
presetAttributify(),
presetTheme({
theme: {
dark: {
colors: {
...dark,
highlight: 'oklch(0.93 0.195089 103.2532 / 0.2)', // rgba(255,235,0,0.2)
note: 'oklch(70.7% 0.165 254.624 / 0.8)', // blue-400
tip: 'oklch(76.5% 0.177 163.223 / 0.8)', // emerald-400
important: 'oklch(71.4% 0.203 305.504 / 0.8)', // purple-400
warning: 'oklch(82.8% 0.189 84.429 / 0.8)', // amber-400
caution: 'oklch(70.4% 0.191 22.216 / 0.8)', // red-400
},
},
},
}) as Preset<object>,
],
theme: {
colors: {
...light,
highlight: 'oklch(0.93 0.195089 103.2532 / 0.5)', // rgba(255,235,0,0.5)
note: 'oklch(48.8% 0.243 264.376 / 0.8)', // blue-700
tip: 'oklch(50.8% 0.118 165.612 / 0.8)', // emerald-700
important: 'oklch(49.6% 0.265 301.924 / 0.8)', // purple-700
warning: 'oklch(55.5% 0.163 48.998 / 0.8)', // amber-700
caution: 'oklch(50.5% 0.213 27.518 / 0.8)', // red-700
},
fontFamily: {
title: ['Snell-Black', 'EarlySummer-Subset', 'EarlySummer', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
navbar: ['STIX-Italic', 'EarlySummer-Subset', 'EarlySummer', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
time: ['Snell-Bold', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
serif: ['STIX', 'EarlySummer', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
},
},
rules: [
['scrollbar-hidden', {
'scrollbar-width': 'none',
'-ms-overflow-style': 'none',
}],
],
shortcuts: {
'uno-desktop-column': 'fixed right-[max(5rem,calc(50vw-35rem))] w-14rem',
'uno-decorative-line': 'mb-4.5 h-0.25 w-10 bg-secondary/25 lg:(mb-6 w-11)',
'uno-round-border': 'border border-secondary/5 rounded border-solid',
},
variants: [
(matcher) => {
if (!matcher.startsWith('cjk:'))
return matcher
return {
matcher: matcher.slice(4),
selector: s => `${s}:is(:lang(zh), :lang(ja), :lang(ko))`,
}
},
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
})