uno.config.ts 884 B

123456789101112131415161718192021222324252627282930
  1. import { defineConfig } from '@unocss/vite';
  2. import transformerDirectives from '@unocss/transformer-directives';
  3. import transformerVariantGroup from '@unocss/transformer-variant-group';
  4. import presetUno from '@unocss/preset-uno';
  5. import type { Theme } from '@unocss/preset-uno';
  6. import { presetSoybeanAdmin } from '@sa/uno-preset';
  7. import { themeVars } from './src/theme/vars';
  8. export default defineConfig<Theme>({
  9. content: {
  10. pipeline: {
  11. exclude: ['node_modules', 'dist']
  12. }
  13. },
  14. theme: {
  15. ...themeVars,
  16. fontSize: {
  17. 'icon-xs': '0.875rem',
  18. 'icon-small': '1rem',
  19. icon: '1.125rem',
  20. 'icon-large': '1.5rem',
  21. 'icon-xl': '2rem'
  22. }
  23. },
  24. shortcuts: {
  25. 'card-wrapper': 'rd-8px shadow-sm'
  26. },
  27. transformers: [transformerDirectives(), transformerVariantGroup()],
  28. presets: [presetUno({ dark: 'class' }), presetSoybeanAdmin()]
  29. });