2022-11-13 08:34:43 +03:00
|
|
|
import {
|
|
|
|
defineConfig,
|
|
|
|
presetAttributify,
|
|
|
|
presetIcons,
|
|
|
|
presetTypography,
|
|
|
|
presetUno,
|
|
|
|
presetWebFonts,
|
|
|
|
transformerDirectives,
|
|
|
|
transformerVariantGroup,
|
|
|
|
} from 'unocss'
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
shortcuts: [
|
2022-11-23 05:16:31 +03:00
|
|
|
{
|
|
|
|
'border-base': 'border-$c-border',
|
2022-11-27 07:48:23 +03:00
|
|
|
'border-bg-base': 'border-$c-bg-base',
|
2022-11-24 11:04:53 +03:00
|
|
|
|
|
|
|
// background
|
2022-11-23 05:16:31 +03:00
|
|
|
'bg-base': 'bg-$c-bg-base',
|
2022-11-23 07:20:59 +03:00
|
|
|
'bg-active': 'bg-$c-bg-active',
|
2022-11-24 06:42:03 +03:00
|
|
|
'bg-code': 'bg-$c-bg-code',
|
2022-12-01 10:32:07 +03:00
|
|
|
'bg-fade': 'bg-$c-bg-fade',
|
2022-11-24 11:04:53 +03:00
|
|
|
|
2022-11-27 06:54:46 +03:00
|
|
|
// text colors
|
2022-11-23 05:16:31 +03:00
|
|
|
'text-base': 'text-$c-text-base',
|
2022-11-30 07:50:29 +03:00
|
|
|
'text-code': 'text-$c-text-code',
|
2022-11-29 23:04:23 +03:00
|
|
|
'text-inverted': 'text-$c-bg-base',
|
2022-11-23 10:46:34 +03:00
|
|
|
'text-secondary': 'text-$c-text-secondary',
|
2022-11-26 23:41:18 +03:00
|
|
|
'text-secondary-light': 'text-$c-text-secondary-light',
|
2022-11-24 11:04:53 +03:00
|
|
|
|
|
|
|
// buttons
|
2022-11-27 15:37:06 +03:00
|
|
|
'btn-base': 'cursor-pointer disabled:pointer-events-none disabled:bg-$c-bg-btn-disabled disabled:text-$c-text-btn-disabled',
|
|
|
|
'btn-solid': 'btn-base px-4 py-2 rounded text-$c-text-btn bg-$c-primary hover:bg-$c-primary-active',
|
2022-11-29 23:04:23 +03:00
|
|
|
'btn-outline': 'btn-base px-4 py-2 rounded text-$c-primary border border-$c-primary hover:bg-$c-primary hover:text-inverted',
|
2022-11-24 10:53:27 +03:00
|
|
|
'btn-text': 'btn-base px-4 py-2 text-$c-primary hover:text-$c-primary-active',
|
|
|
|
'btn-action-icon': 'btn-base hover:bg-active rounded-full h9 w9 flex items-center justify-center',
|
2022-11-24 11:04:53 +03:00
|
|
|
|
2022-11-27 06:54:46 +03:00
|
|
|
// link
|
|
|
|
'text-link-rounded': 'focus:outline-none focus:ring-(2 primary inset) hover:bg-active rounded md:rounded-full px2 mx--2',
|
|
|
|
|
2022-11-24 11:04:53 +03:00
|
|
|
// utils
|
|
|
|
'flex-center': 'items-center justify-center',
|
|
|
|
'flex-v-center': 'items-center',
|
|
|
|
'flex-h-center': 'justify-center',
|
2022-11-23 05:16:31 +03:00
|
|
|
},
|
2022-11-13 08:34:43 +03:00
|
|
|
],
|
|
|
|
presets: [
|
2022-11-14 05:56:48 +03:00
|
|
|
presetUno({
|
|
|
|
attributifyPseudo: true,
|
|
|
|
}),
|
2022-11-13 08:34:43 +03:00
|
|
|
presetAttributify(),
|
|
|
|
presetIcons({
|
|
|
|
scale: 1.2,
|
2022-12-01 09:48:22 +03:00
|
|
|
extraProperties: {
|
|
|
|
color: 'inherit',
|
|
|
|
},
|
2022-11-13 08:34:43 +03:00
|
|
|
}),
|
|
|
|
presetTypography(),
|
|
|
|
presetWebFonts({
|
|
|
|
fonts: {
|
|
|
|
sans: 'DM Sans',
|
|
|
|
serif: 'DM Serif Display',
|
|
|
|
mono: 'DM Mono',
|
2022-11-24 05:38:14 +03:00
|
|
|
script: 'Homemade Apple',
|
2022-11-13 08:34:43 +03:00
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
transformers: [
|
|
|
|
transformerDirectives(),
|
|
|
|
transformerVariantGroup(),
|
|
|
|
],
|
2022-11-13 19:05:32 +03:00
|
|
|
theme: {
|
|
|
|
colors: {
|
2022-11-23 17:21:18 +03:00
|
|
|
primary: {
|
|
|
|
DEFAULT: 'var(--c-primary)',
|
|
|
|
active: 'var(--c-primary-active)',
|
|
|
|
},
|
2022-11-13 19:05:32 +03:00
|
|
|
},
|
|
|
|
},
|
2022-11-13 08:34:43 +03:00
|
|
|
})
|