-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtailwind.config.js
More file actions
64 lines (63 loc) · 1.94 KB
/
Copy pathtailwind.config.js
File metadata and controls
64 lines (63 loc) · 1.94 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
/**
* @type {import('tailwindcss/types/config').Config}
*/
import typography from '@tailwindcss/typography'
export default {
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],
darkMode: 'class',
theme: {
extend: {
screens: {
'xss': '280px',
'xs': '320px',
'sm': '640px',
'md': '768px',
'lg': '1024px',
'xl': '1280px',
'2xl': '1536px',
'3xl': '1920px'
},
// 字体大小
fontSize: {
'xxs': ['0.625rem', { lineHeight: '0.875rem' }], // 10px
'xs': ['0.75rem', { lineHeight: '1rem' }], // 12px
'sm': ['0.875rem', { lineHeight: '1.25rem' }], // 14px
'base': ['1rem', { lineHeight: '1.5rem' }], // 16px
'lg': ['1.125rem', { lineHeight: '1.75rem' }], // 18px
'xl': ['1.25rem', { lineHeight: '1.75rem' }], // 20px
'2xl': ['1.5rem', { lineHeight: '2rem' }] // 24px
},
// 自定义动画
keyframes: {
'fade-in': {
'0%': { opacity: '0', transform: 'translateY(20px)' },
'100%': { opacity: '1', transform: 'translateY(0)' }
},
'slide-in-right': {
'0%': { transform: 'translateX(100%)' },
'100%': { transform: 'translateX(0)' }
},
'slide-in-left': {
'0%': { transform: 'translateX(-100%)' },
'100%': { transform: 'translateX(0)' }
},
'float': {
'0%, 100%': { transform: 'translateY(0)' },
'50%': { transform: 'translateY(-20px)' }
},
'pulse-slow': {
'0%, 100%': { opacity: '1' },
'50%': { opacity: '0.5' }
}
},
animation: {
'fade-in': 'fade-in 1s ease-out',
'slide-in-right': 'slide-in-right 0.3s ease-out',
'slide-in-left': 'slide-in-left 0.3s ease-out',
'float': 'float 3s ease-in-out infinite',
'pulse-slow': 'pulse-slow 2s ease-in-out infinite'
}
}
},
plugins: [typography()]
}