uno.config.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import { defineConfig, presetWind3, presetUno } from 'unocss'
  2. export default defineConfig({
  3. presets: [presetUno({ dark: 'class' }), presetWind3()],
  4. theme: {
  5. colors: {
  6. // 背景色
  7. bg: {
  8. primary: 'var(--bg-primary)',
  9. secondary: 'var(--bg-secondary)',
  10. tertiary: 'var(--bg-tertiary)',
  11. sidebar: 'var(--sidebar-bg)',
  12. input: 'var(--input-bg)',
  13. button: 'var(--button-bg)'
  14. },
  15. // 文本色
  16. text: {
  17. primary: 'var(--text-primary)',
  18. secondary: 'var(--text-secondary)'
  19. },
  20. // 强调色
  21. accent: {
  22. blue: 'var(--accent-blue)',
  23. green: 'var(--accent-green)',
  24. yellow: 'var(--accent-yellow)',
  25. red: 'var(--accent-red)'
  26. },
  27. // 边框色
  28. border: 'var(--border-color)',
  29. // 特殊元素
  30. scrollbar: 'var(--scrollbar)'
  31. },
  32. // 扩展其他主题设置
  33. boxShadow: {
  34. panel: '0 2px 8px rgba(0, 0, 0, 0.15)',
  35. 'dark-panel': '0 2px 8px rgba(0, 0, 0, 0.4)'
  36. }
  37. },
  38. shortcuts: {},
  39. rules: []
  40. })