平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

uno.config.ts 3.3 KiB

3 months ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import { defineConfig, presetUno, transformerDirectives } from "unocss";
  2. export default defineConfig({
  3. content: {
  4. pipeline: {
  5. exclude: ["node_modules", "dist", ".git", ".husky", ".vscode", "public", "build"]
  6. }
  7. },
  8. presets: [presetUno({ dark: "class" })],
  9. transformers: [transformerDirectives()],
  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 text-ellipsis",
  44. "transition-base": "transition-all duration-300 ease-in-out"
  45. },
  46. theme: {
  47. colors: {
  48. primary: "rgb(var(--primary-color))",
  49. primary_hover: "rgb(var(--primary-color-hover))",
  50. primary_pressed: "rgb(var(--primary-color-pressed))",
  51. primary_active: "rgba(var(--primary-color-active),0.1)",
  52. primary_1: "rgb(var(--primary-color1))",
  53. primary_2: "rgb(var(--primary-color2))",
  54. primary_3: "rgb(var(--primary-color3))",
  55. primary_4: "rgb(var(--primary-color4))",
  56. primary_5: "rgb(var(--primary-color5))",
  57. primary_6: "rgb(var(--primary-color6))",
  58. primary_7: "rgb(var(--primary-color7))",
  59. primary_8: "rgb(var(--primary-color8))",
  60. primary_9: "rgb(var(--primary-color9))",
  61. info: "rgb(var(--info-color))",
  62. info_hover: "rgb(var(--info-color-hover))",
  63. info_pressed: "rgb(var(--info-color-pressed))",
  64. info_active: "rgb(var(--info-color-active),0.1)",
  65. success: "rgb(var(--success-color))",
  66. success_hover: "rgb(var(--success-color-hover))",
  67. success_pressed: "rgb(var(--success-color-pressed))",
  68. success_active: "rgb(var(--success-color-active),0.1)",
  69. warning: "rgb(var(--warning-color))",
  70. warning_hover: "rgb(var(--warning-color-hover))",
  71. warning_pressed: "rgb(var(--warning-color-pressed))",
  72. warning_active: "rgb(var(--warning-color-active),0.1)",
  73. error: "rgb(var(--error-color))",
  74. error_hover: "rgb(var(--error-color-hover))",
  75. error_pressed: "rgb(var(--error-color-pressed))",
  76. error_active: "rgb(var(--error-color-active),0.1)",
  77. dark: "#141414"
  78. }
  79. }
  80. });