-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
uno.config.ts
51 lines (50 loc) · 1.62 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
import { fileURLToPath } from 'node:url'
import {
defineConfig,
presetAttributify,
presetIcons,
presetTypography,
presetUno,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import { variantMatcher } from '@unocss/preset-mini/utils'
export default defineConfig({
safelist: [
'!opacity-0',
'prose',
],
shortcuts: {
'bg-main': 'bg-white dark:bg-[#121212]',
'bg-active': 'bg-gray-400/10',
'border-main': 'border-gray/20',
'text-main': 'text-[#181818] dark:text-[#ddd]',
'text-primary': 'color-$slidev-theme-primary',
'bg-primary': 'bg-$slidev-theme-primary',
'border-primary': 'border-$slidev-theme-primary',
'abs-tl': 'absolute top-0 left-0',
'abs-tr': 'absolute top-0 right-0',
'abs-b': 'absolute bottom-0 left-0 right-0',
'abs-bl': 'absolute bottom-0 left-0',
'abs-br': 'absolute bottom-0 right-0',
},
// Slidev Specific Variants, probably extrat to a preset later
variants: [
// `forward:` and `backward:` variant to selectively apply styles based on the direction of the slide
// For example, `forward:text-red` will only apply to the slides that are navigated forward
variantMatcher('forward', input => ({ prefix: `.slidev-nav-go-forward ${input.prefix}` })),
variantMatcher('backward', input => ({ prefix: `.slidev-nav-go-forward ${input.prefix}` })),
],
presets: [
presetUno(),
presetAttributify(),
presetIcons({
collectionsNodeResolvePath: fileURLToPath(import.meta.url),
}),
presetTypography(),
],
transformers: [
transformerDirectives({ enforce: 'pre' }),
transformerVariantGroup(),
],
})