blog/uno.config.ts

56 lines
1.5 KiB
TypeScript

import type { Theme } from 'unocss/preset-uno'
import {
defineConfig,
presetAttributify,
presetTypography,
presetUno,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import presetTheme from 'unocss-preset-theme'
import { themeConfig } from './src/config'
const { light, dark } = themeConfig.color
export default defineConfig({
presets: [
presetUno(),
presetAttributify(),
presetTypography(),
presetTheme<Theme>({
theme: {
dark: {
colors: dark,
},
},
}),
],
theme: {
colors: light,
fontFamily: {
title: ['Snell-Black', 'EarlySummer-subset', 'EarlySummer', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
navbar: ['STIX-italic', 'EarlySummer-subset', 'EarlySummer', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
time: ['Snell-Bold', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
serif: ['STIX', 'EarlySummer', 'Georgia', 'ui-serif', 'Georgia', 'Cambria', 'Times New Roman', 'Times', 'serif'],
},
},
shortcuts: {},
rules: [
['scrollbar-hidden', {
'scrollbar-width': 'none',
'-ms-overflow-style': 'none',
}],
['ios-flash-fix', {
'backface-visibility': 'hidden',
'-webkit-backface-visibility': 'hidden',
}],
['force-gpu', {
'transform': 'translateZ(0)',
'-webkit-transform': 'translateZ(0)',
}],
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
})