100 lines
2.1 KiB
JavaScript
100 lines
2.1 KiB
JavaScript
/** @type {import('tailwindcss').Config} */
|
|
module.exports = {
|
|
// 内容路径配置
|
|
content: [
|
|
'./src/pages/**/*.{js,ts,jsx,tsx,mdx}',
|
|
'./src/components/**/*.{js,ts,jsx,tsx,mdx}',
|
|
'./src/app/**/*.{js,ts,jsx,tsx,mdx}',
|
|
],
|
|
|
|
// 主题配置
|
|
theme: {
|
|
extend: {
|
|
// 自定义颜色
|
|
colors: {
|
|
primary: {
|
|
50: '#eff6ff',
|
|
100: '#dbeafe',
|
|
200: '#bfdbfe',
|
|
300: '#93c5fd',
|
|
400: '#60a5fa',
|
|
500: '#3b82f6',
|
|
600: '#2563eb',
|
|
700: '#1d4ed8',
|
|
800: '#1e40af',
|
|
900: '#1e3a8a',
|
|
},
|
|
gray: {
|
|
50: '#f9fafb',
|
|
100: '#f3f4f6',
|
|
200: '#e5e7eb',
|
|
300: '#d1d5db',
|
|
400: '#9ca3af',
|
|
500: '#6b7280',
|
|
600: '#4b5563',
|
|
700: '#374151',
|
|
800: '#1f2937',
|
|
900: '#111827',
|
|
},
|
|
},
|
|
|
|
// 自定义字体
|
|
fontFamily: {
|
|
sans: ['Inter', 'system-ui', 'sans-serif'],
|
|
mono: ['Fira Code', 'monospace'],
|
|
},
|
|
|
|
// 自定义间距
|
|
spacing: {
|
|
'18': '4.5rem',
|
|
'88': '22rem',
|
|
},
|
|
|
|
// 自定义圆角
|
|
borderRadius: {
|
|
'4xl': '2rem',
|
|
},
|
|
|
|
// 自定义阴影
|
|
boxShadow: {
|
|
'soft': '0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04)',
|
|
},
|
|
|
|
// 自定义动画
|
|
animation: {
|
|
'fade-in': 'fadeIn 0.5s ease-in-out',
|
|
'slide-up': 'slideUp 0.3s ease-out',
|
|
'bounce-slow': 'bounce 2s infinite',
|
|
},
|
|
|
|
// 关键帧
|
|
keyframes: {
|
|
fadeIn: {
|
|
'0%': { opacity: '0' },
|
|
'100%': { opacity: '1' },
|
|
},
|
|
slideUp: {
|
|
'0%': { transform: 'translateY(10px)', opacity: '0' },
|
|
'100%': { transform: 'translateY(0)', opacity: '1' },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
// 插件配置
|
|
plugins: [
|
|
// 添加自定义插件
|
|
function({ addUtilities }) {
|
|
const newUtilities = {
|
|
'.text-balance': {
|
|
'text-wrap': 'balance',
|
|
},
|
|
};
|
|
addUtilities(newUtilities);
|
|
},
|
|
],
|
|
|
|
// 暗色模式配置
|
|
darkMode: 'class',
|
|
};
|