1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-27 06:18:07 +09:00
elk/unocss.config.ts

51 lines
1.2 KiB
TypeScript
Raw Normal View History

2022-11-13 14:34:43 +09:00
import {
defineConfig,
presetAttributify,
presetIcons,
presetTypography,
presetUno,
presetWebFonts,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
export default defineConfig({
shortcuts: [
2022-11-23 11:16:31 +09:00
{
'border-base': 'border-$c-border',
'bg-base': 'bg-$c-bg-base',
'text-base': 'text-$c-text-base',
2022-11-23 12:06:56 +09:00
'interact-disabled': 'disabled:opacity-50 disabled:pointer-events-none disabled:saturate-0',
'btn-solid': 'px-4 py-2 rounded text-white bg-$c-primary hover:bg-$c-primary-active interact-disabled',
2022-11-23 12:48:01 +09:00
'btn-outline': 'px-4 py-2 rounded text-$c-primary border border-$c-primary hover:bg-$c-primary hover:text-white interact-disabled',
'btn-text': 'px-4 py-2 text-$c-primary hover:text-$c-primary-active interact-disabled',
2022-11-23 11:16:31 +09:00
},
2022-11-13 14:34:43 +09:00
],
presets: [
2022-11-14 11:56:48 +09:00
presetUno({
attributifyPseudo: true,
}),
2022-11-13 14:34:43 +09:00
presetAttributify(),
presetIcons({
scale: 1.2,
}),
presetTypography(),
presetWebFonts({
fonts: {
sans: 'DM Sans',
serif: 'DM Serif Display',
mono: 'DM Mono',
},
}),
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
2022-11-14 01:05:32 +09:00
theme: {
colors: {
2022-11-23 11:16:31 +09:00
primary: 'var(--c-primary)',
2022-11-14 01:05:32 +09:00
},
},
2022-11-13 14:34:43 +09:00
})