tailwind.config.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /** @type {import('tailwindcss').Config} */
  2. export default {
  3. content: [
  4. './src/pages/**/*.{js,ts,jsx,tsx,mdx}',
  5. './src/components/**/*.{js,ts,jsx,tsx,mdx}',
  6. './src/app/**/*.{js,ts,jsx,tsx,mdx}',
  7. ],
  8. theme: {
  9. extend: {
  10. colors: {
  11. // Typora 风格配色 - 极简现代
  12. 'pure-white': '#FFFFFF',
  13. 'bg-gray': '#FAFAFA',
  14. 'light-gray': '#F5F5F5',
  15. 'border-gray': '#E0E0E0',
  16. 'text-primary': '#2C3E50',
  17. 'text-secondary': '#7F8C8D',
  18. 'text-muted': '#BDC3C7',
  19. 'accent': {
  20. DEFAULT: '#5B9BD5',
  21. light: '#7BAADE',
  22. dark: '#4A7FB5',
  23. },
  24. },
  25. fontFamily: {
  26. sans: ['-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'sans-serif'],
  27. mono: ['SF Mono', 'Monaco', 'Consolas', 'monospace'],
  28. },
  29. typography: (theme) => ({
  30. DEFAULT: {
  31. css: {
  32. maxWidth: '100%',
  33. color: theme('colors.text-primary'),
  34. lineHeight: '1.7',
  35. letterSpacing: '0.01em',
  36. h1: {
  37. color: theme('colors.text-primary'),
  38. fontWeight: '600',
  39. letterSpacing: '-0.02em',
  40. },
  41. h2: {
  42. color: theme('colors.text-primary'),
  43. fontWeight: '600',
  44. letterSpacing: '-0.02em',
  45. },
  46. h3: {
  47. color: theme('colors.text-primary'),
  48. fontWeight: '600',
  49. letterSpacing: '-0.02em',
  50. },
  51. p: {
  52. color: theme('colors.text-primary'),
  53. },
  54. a: {
  55. color: theme('colors.accent.DEFAULT'),
  56. textDecoration: 'none',
  57. transition: 'color 0.2s ease',
  58. '&:hover': {
  59. color: theme('colors.accent.dark'),
  60. },
  61. },
  62. },
  63. },
  64. }),
  65. boxShadow: {
  66. 'minimal': '0 1px 3px rgba(0, 0, 0, 0.04)',
  67. 'minimal-hover': '0 4px 12px rgba(0, 0, 0, 0.08)',
  68. 'soft': '0 2px 8px rgba(0, 0, 0, 0.06)',
  69. },
  70. },
  71. },
  72. plugins: [
  73. import('@tailwindcss/typography'),
  74. ],
  75. }