-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtailwind.config.js
More file actions
65 lines (65 loc) · 2.62 KB
/
Copy pathtailwind.config.js
File metadata and controls
65 lines (65 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/** @type {import('tailwindcss').Config} */
export default {
content: ['./index.html', './src/**/*.{ts,tsx,js,jsx}'],
darkMode: 'class',
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',
},
// 语义化颜色
success: {
50: '#f0fdf4', 100: '#dcfce7', 200: '#bbf7d0', 300: '#86efac',
400: '#4ade80', 500: '#22c55e', 600: '#16a34a', 700: '#15803d',
},
warning: {
50: '#fffbeb', 100: '#fef3c7', 200: '#fde68a', 300: '#fcd34d',
400: '#fbbf24', 500: '#f59e0b', 600: '#d97706', 700: '#b45309',
},
danger: {
50: '#fef2f2', 100: '#fee2e2', 200: '#fecaca', 300: '#fca5a5',
400: '#f87171', 500: '#ef4444', 600: '#dc2626', 700: '#b91c1c',
},
info: {
50: '#eff6ff', 100: '#dbeafe', 200: '#bfdbfe', 300: '#93c5fd',
400: '#60a5fa', 500: '#3b82f6', 600: '#2563eb', 700: '#1d4ed8',
},
},
fontFamily: {
sans: ['Inter', 'system-ui', '-apple-system', 'Microsoft YaHei', 'sans-serif'],
mono: ['JetBrains Mono', 'Fira Code', 'Consolas', 'monospace'],
},
fontSize: {
// 标题层级
'h1': ['1.5rem', { lineHeight: '2rem', fontWeight: '700' }],
'h2': ['1.25rem', { lineHeight: '1.75rem', fontWeight: '600' }],
'h3': ['1.125rem', { lineHeight: '1.5rem', fontWeight: '600' }],
'h4': ['1rem', { lineHeight: '1.5rem', fontWeight: '500' }],
// 正文层级
'body': ['0.875rem', { lineHeight: '1.5rem' }],
'body-sm': ['0.8125rem', { lineHeight: '1.375rem' }],
'caption': ['0.75rem', { lineHeight: '1.25rem' }],
'tiny': ['0.625rem', { lineHeight: '1rem' }],
},
animation: {
'fade-in': 'fadeIn 0.2s ease-in-out',
'slide-in': 'slideIn 0.2s ease-out',
'scale-in': 'scaleIn 0.15s ease-out',
},
keyframes: {
fadeIn: { '0%': { opacity: '0' }, '100%': { opacity: '1' } },
slideIn: { '0%': { transform: 'translateY(-8px)', opacity: '0' }, '100%': { transform: 'translateY(0)', opacity: '1' } },
scaleIn: { '0%': { opacity: '0', transform: 'scale(0.95)' }, '100%': { opacity: '1', transform: 'scale(1)' } },
},
},
},
plugins: [],
}