File size: 1,158 Bytes
320c9b0 d38ac2f 320c9b0 d38ac2f de10f77 c697336 d38ac2f 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 35 36 37 38 39 40 41 42 43 44 45 |
import { sveltekit } from '@sveltejs/kit/vite';
import type { UserConfig } from 'vite';
import Unocss from 'unocss/vite';
import presetIcons from '@unocss/preset-icons';
import presetUno from '@unocss/preset-uno';
const config: UserConfig = {
plugins: [
sveltekit(),
Unocss({
presets: [presetUno(), presetIcons()],
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 cursor-pointer',
'btn-sunray': 'text-white bg-sunray px-4 py-2 rounded-3xl font-bold border-0 cursor-pointer'
},
theme: {
colors: {
oxford: '#0a274c',
sunray: '#d3a95a',
brunswick: '#1e4832'
}
}
})
]
};
export default config;
|