uno.config.js 739 B

123456789101112131415161718192021222324252627282930
  1. import { defineConfig, presetAttributify, presetIcons, presetUno } from 'unocss'
  2. import presetRemToPx from '@unocss/preset-rem-to-px'
  3. export default defineConfig({
  4. presets: [
  5. presetUno(),
  6. presetAttributify(),
  7. presetIcons({
  8. warn: true,
  9. prefix: 'i-',
  10. extraProperties: {
  11. display: 'inline-block',
  12. width: '1em',
  13. height: '1em',
  14. },
  15. }),
  16. presetRemToPx({ baseFontSize: 4 }),
  17. ],
  18. shortcuts: [
  19. ['wh-full', 'w-full h-full'],
  20. ['f-c-c', 'flex justify-center items-center'],
  21. ['flex-col', 'flex flex-col'],
  22. ['card-shadow', 'rounded-2 shadow-[0_2px_8px_rgba(0,0,0,0.15)]'],
  23. ],
  24. theme: {
  25. colors: {
  26. primary: 'var(--primary-color, #0891b2)',
  27. },
  28. },
  29. })