tailwind.config.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /** @type {import('tailwindcss').Config} */
  2. module.exports = {
  3. content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
  4. theme: {
  5. colors: {
  6. white: 'var(--color-white)',
  7. primary: {
  8. DEFAULT: 'var(--el-color-primary)',
  9. 'light-3': 'var(--el-color-primary-light-3)',
  10. 'light-5': 'var(--el-color-primary-light-5)',
  11. 'light-7': 'var(--el-color-primary-light-7)',
  12. 'light-8': 'var(--el-color-primary-light-8)',
  13. 'light-9': 'var(--el-color-primary-light-9)',
  14. 'dark-2': 'var(--el-color-primary-dark-2)'
  15. },
  16. success: 'var(--el-color-success)',
  17. warning: 'var(--el-color-warning)',
  18. danger: 'var(--el-color-danger)',
  19. error: 'var(--el-color-error)',
  20. info: 'var(--el-color-info)',
  21. body: 'var(--el-bg-color)',
  22. page: 'var(--el-bg-color-page)',
  23. 'tx-primary': 'var(--el-text-color-primary)',
  24. 'tx-regular': 'var(--el-text-color-regular)',
  25. 'tx-secondary': 'var(--el-text-color-secondary)',
  26. 'tx-placeholder': 'var(--el-text-color-placeholder)',
  27. 'tx-disabled': 'var(--el-text-color-disabled)',
  28. br: 'var(--el-border-color)',
  29. 'br-light': 'var(--el-border-color-light)',
  30. 'br-extra-light': 'var(--el-border-color-extra-light)',
  31. 'br-dark': 'var( --el-border-color-dark)',
  32. fill: 'var(--el-fill-color)',
  33. 'fill-light': 'var(--el-fill-color-light)',
  34. 'fill-lighter': 'var(--el-fill-color-lighter)',
  35. mask: 'var(--el-mask-color)'
  36. },
  37. fontFamily: {
  38. sans: ['PingFang SC', 'Arial', 'Hiragino Sans GB', 'Microsoft YaHei', 'sans-serif']
  39. },
  40. boxShadow: {
  41. DEFAULT: 'var(--el-box-shadow)',
  42. light: 'var(--el-box-shadow-light)',
  43. lighter: 'var(--el-box-shadow-lighter)',
  44. dark: 'var(--el-box-shadow-dark)'
  45. },
  46. fontSize: {
  47. xs: 'var(--el-font-size-extra-small)',
  48. sm: 'var( --el-font-size-small)',
  49. base: 'var( --el-font-size-base)',
  50. lg: 'var( --el-font-size-medium)',
  51. xl: 'var( --el-font-size-large)',
  52. '2xl': 'var( --el-font-size-extra-large)',
  53. '3xl': '20px',
  54. '4xl': '24px',
  55. '5xl': '28px',
  56. '6xl': '30px',
  57. '7xl': '36px',
  58. '8xl': '48px',
  59. '9xl': '60px'
  60. },
  61. spacing: {
  62. px: '1px',
  63. 0: '0px',
  64. 0.5: '2px',
  65. 1: '4px',
  66. 1.5: '6px',
  67. 2: '8px',
  68. 2.5: '10px',
  69. 3: '12px',
  70. 3.5: '14px',
  71. 4: '16px',
  72. 5: '20px',
  73. 6: '24px',
  74. 7: '28px',
  75. 8: '32px',
  76. 9: '36px',
  77. 10: '40px',
  78. 11: '44px',
  79. 12: '48px',
  80. 14: '56px',
  81. 16: '64px',
  82. 20: '80px',
  83. 24: '96px',
  84. 28: '112px',
  85. 32: '128px',
  86. 36: '144px',
  87. 40: '160px',
  88. 44: '176px',
  89. 48: '192px',
  90. 52: '208px',
  91. 56: '224px',
  92. 60: '240px',
  93. 64: '256px',
  94. 72: '288px',
  95. 80: '320px',
  96. 96: '384px'
  97. },
  98. lineHeight: {
  99. none: '1',
  100. tight: '1.25',
  101. snug: '1.375',
  102. normal: '1.5',
  103. relaxed: '1.625',
  104. loose: '2',
  105. 3: '12px',
  106. 4: '16px',
  107. 5: '20px',
  108. 6: '24px',
  109. 7: '28px',
  110. 8: '32px',
  111. 9: '36px',
  112. 10: '40px'
  113. }
  114. },
  115. plugins: [
  116. require('@tailwindcss/line-clamp') // 引入插件
  117. ]
  118. }