uno.config.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. active: 'var(--text-active)'
  20. },
  21. // 强调色
  22. accent: {
  23. blue: 'var(--accent-blue)',
  24. green: 'var(--accent-green)',
  25. yellow: 'var(--accent-yellow)',
  26. red: 'var(--accent-red)'
  27. },
  28. // 边框色
  29. border: 'var(--border-color)',
  30. // 特殊元素
  31. scrollbar: 'var(--scrollbar)'
  32. },
  33. // 扩展其他主题设置
  34. boxShadow: {
  35. panel: '0 2px 8px rgba(0, 0, 0, 0.15)',
  36. 'dark-panel': '0 2px 8px rgba(0, 0, 0, 0.4)'
  37. }
  38. },
  39. shortcuts: {},
  40. rules: []
  41. })