-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathunocss.config.ts
51 lines (49 loc) · 1.82 KB
/
unocss.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 { defineConfig } from 'unocss'
import transformerDirectives from '@unocss/transformer-directives'
export default defineConfig({
shortcuts: [
{ 'text-color': 'text-gray-7 dark:text-gray-2' },
{ 'text-color-lighter': 'text-gray-5 dark:text-gray-4' },
],
rules: [
[/^bg-([\d]+)\/(\d+)/, ([_, color, opacity]) => ({
'--gp-bg-opacity': opacity,
'background-color': `rgba(var(--color-primary-${color}), ${Number(opacity) / 100})`,
})],
[/^shadow-([\d]+)\/(\d+)/, ([_, color, opacity]) => ({
'--gp-shadow-opacity': opacity,
'--un-shadow-color': `rgba(var(--color-primary-${color}), ${Number(opacity) / 100})`,
})],
],
theme: {
colors: {
primary: {
50: 'rgb(var(--color-primary-50))',
100: 'rgb(var(--color-primary-100))',
200: 'rgb(var(--color-primary-200))',
300: 'rgb(var(--color-primary-300))',
400: 'rgb(var(--color-primary-400))',
500: 'rgb(var(--color-primary-500))',
600: 'rgb(var(--color-primary-600))',
700: 'rgb(var(--color-primary-700))',
800: 'rgb(var(--color-primary-800))',
900: 'rgb(var(--color-primary-900))',
DEFAULT: 'rgb(var(--color-primary-500))',
// 50: '#eadbf0',
// 100: '#efd8f3',
// 200: '#eed0f0',
// 300: '#e0b1e7',
// 400: '#cd83d8',
// 500: '#b95ec9',
// 600: '#a741aa',
// 700: '#903597',
// 800: '#762d7c',
// 900: '#672862',
// DEFAULT: '#b95ec9',
},
},
},
transformers: [
transformerDirectives(),
],
})