File size: 941 Bytes
320c9b0
 
c697336
320c9b0
 
c697336
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320c9b0
 
 
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
import { sveltekit } from '@sveltejs/kit/vite';
import type { UserConfig } from 'vite';
import Unocss from 'unocss/vite'

const config: UserConfig = {
	plugins: [sveltekit(), Unocss({
		rules: [
			[/^text-(.*)$/, ([, c], { theme }) => {
				if (c in theme.colors)
					return { color: theme.colors[c as keyof typeof theme.colors] };
			}], 
			[/^bg-(.*)$/, ([, c], { theme }) => {
				if (c in theme.colors)
					return { "background-color": theme.colors[c as keyof typeof theme.colors] };
			}],
		],
		shortcuts: {
			input: "w-full max-w-80 text-lg pl-2 border border-solid border-2 rounded-xl",
			link: "underline text-brunswick",
			btn: "text-white bg-oxford px-4 py-2 rounded-3xl font-bold border-0",
			"btn-sunray": "text-white bg-sunray px-4 py-2 rounded-3xl font-bold border-0",
		},
		theme: {
			colors: {
				"oxford": "#0a274c",
				"sunray": "#d3a95a",
				"brunswick": "#1e4832"
			},
		}
	})]
};

export default config;