uno.config.ts 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // uno.config.ts
  2. import {
  3. defineConfig,
  4. presetAttributify,
  5. presetIcons,
  6. presetTypography,
  7. presetUno,
  8. presetWebFonts,
  9. transformerDirectives,
  10. transformerVariantGroup,
  11. } from "unocss";
  12. export default defineConfig({
  13. shortcuts: {
  14. "flex-center": "flex justify-center items-center",
  15. "flex-x-center": "flex justify-center",
  16. "flex-y-center": "flex items-center",
  17. "wh-full": "w-full h-full",
  18. "flex-x-between": "flex items-center justify-between",
  19. "flex-x-end": "flex items-center justify-end",
  20. "absolute-lt": "absolute left-0 top-0",
  21. "absolute-rt": "absolute right-0 top-0 ",
  22. "fixed-lt": "fixed left-0 top-0",
  23. },
  24. theme: {
  25. colors: {
  26. primary: "var(--el-color-primary)",
  27. primary_dark: "var(--el-color-primary-light-5)",
  28. },
  29. },
  30. presets: [
  31. presetUno(),
  32. presetAttributify(),
  33. presetIcons(),
  34. presetTypography(),
  35. presetWebFonts({
  36. fonts: {
  37. // ...
  38. },
  39. }),
  40. ],
  41. transformers: [transformerDirectives(), transformerVariantGroup()],
  42. });