This commit is contained in:
2023-05-10 22:18:22 +02:00
parent fed5006110
commit 9703d24784
14 changed files with 283 additions and 42 deletions

View File

@@ -1,9 +1,8 @@
import {
defineConfig, presetAttributify, presetIcons,
presetTypography, presetUno, presetWind,
transformerDirectives, transformerVariantGroup,
} from 'unocss'
import transformerVariantGroup from '@unocss/transformer-variant-group'
import transformerDirectives from '@unocss/transformer-directives'
import { presetScrollbar } from 'unocss-preset-scrollbar'
import { ColorsTheme } from './types'
@@ -18,17 +17,27 @@ export default defineConfig({
dark: 'class',
}),
],
theme: {
boxShadow: {
'header-active-light': 'inset 0 -1px 0 0 #eaeaea',
'header-active-dark': 'inset 0 -1px 0 0 #333',
'announcement-light': '0 0 0 1px rgba(0,0,0,.03), 0 2px 4px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05)',
'announcement-dark': '0 0 0 1px rgba(150,150,150,.06), 0 2px 4px rgba(150,150,150,.1), 0 4px 16px rgba(150,150,150,.1)',
},
},
transformers: [
transformerDirectives(),
transformerVariantGroup(),
transformerDirectives(),
],
safelist: [
// Theme text colors
...Object.values(ColorsTheme).map(color => `text-${color}-500`),
...Object.values(ColorsTheme).map(color => `hover:text-${color}-500`),
...'bg-black dark:bg-white dark:text-black text-white'.split(' '),
// Theme background colors
...Object.values(ColorsTheme).map(color => `bg-${color}-500`),
...Object.values(ColorsTheme).map(color => `hover:bg-${color}-500`),
...'text-black dark:text-white'.split(' '),
],
})