uno.config.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import { defineConfig } from '@unocss/vite';
  2. import presetUno from '@unocss/preset-uno';
  3. export default defineConfig({
  4. content: {
  5. pipeline: {
  6. exclude: ['node_modules', 'dist', '.git', '.husky', '.vscode', 'public', 'build', 'mock', './stats.html']
  7. }
  8. },
  9. presets: [presetUno({ dark: 'class' })],
  10. shortcuts: {
  11. 'wh-full': 'w-full h-full',
  12. 'flex-center': 'flex justify-center items-center',
  13. 'flex-col-center': 'flex-center flex-col',
  14. 'flex-x-center': 'flex justify-center',
  15. 'flex-y-center': 'flex items-center',
  16. 'i-flex-center': 'inline-flex justify-center items-center',
  17. 'i-flex-x-center': 'inline-flex justify-center',
  18. 'i-flex-y-center': 'inline-flex items-center',
  19. 'flex-col': 'flex flex-col',
  20. 'flex-col-stretch': 'flex-col items-stretch',
  21. 'i-flex-col': 'inline-flex flex-col',
  22. 'i-flex-col-stretch': 'i-flex-col items-stretch',
  23. 'flex-1-hidden': 'flex-1 overflow-hidden',
  24. 'absolute-lt': 'absolute left-0 top-0',
  25. 'absolute-lb': 'absolute left-0 bottom-0',
  26. 'absolute-rt': 'absolute right-0 top-0',
  27. 'absolute-rb': 'absolute right-0 bottom-0',
  28. 'absolute-tl': 'absolute-lt',
  29. 'absolute-tr': 'absolute-rt',
  30. 'absolute-bl': 'absolute-lb',
  31. 'absolute-br': 'absolute-rb',
  32. 'absolute-center': 'absolute-lt flex-center wh-full',
  33. 'fixed-lt': 'fixed left-0 top-0',
  34. 'fixed-lb': 'fixed left-0 bottom-0',
  35. 'fixed-rt': 'fixed right-0 top-0',
  36. 'fixed-rb': 'fixed right-0 bottom-0',
  37. 'fixed-tl': 'fixed-lt',
  38. 'fixed-tr': 'fixed-rt',
  39. 'fixed-bl': 'fixed-lb',
  40. 'fixed-br': 'fixed-rb',
  41. 'fixed-center': 'fixed-lt flex-center wh-full',
  42. 'nowrap-hidden': 'whitespace-nowrap overflow-hidden',
  43. 'ellipsis-text': 'nowrap-hidden overflow-ellipsis',
  44. 'transition-base': 'transition-all duration-300 ease-in-out'
  45. },
  46. theme: {}
  47. });