tailwind.config.js 723 B

123456789101112131415161718192021222324252627282930
  1. /** @type {import('tailwindcss').Config} */
  2. module.exports = {
  3. content: ["./src/**/*.{js,jsx,ts,tsx}", "./src/**/*.html"],
  4. theme: {
  5. extend: {
  6. // 小程序兼容的颜色
  7. colors: {
  8. gray: {
  9. 400: "#9CA3AF",
  10. 500: "#6B7280",
  11. },
  12. },
  13. // 小程序兼容的字体粗细
  14. fontWeight: {
  15. normal: "400",
  16. bold: "700",
  17. },
  18. // 小程序兼容的阴影
  19. boxShadow: {
  20. custom: "0 35px 60px -15px rgba(0,0,0,0.3)",
  21. },
  22. },
  23. },
  24. plugins: [],
  25. corePlugins: {
  26. // 根据 Taro 环境动态控制 preflight
  27. // 小程序端禁用 preflight,H5 端启用 preflight
  28. preflight: process.env.TARO_ENV === "h5",
  29. },
  30. };