-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtailwind.config.ts
107 lines (104 loc) · 3.28 KB
/
tailwind.config.ts
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import type { Config } from 'tailwindcss'
const config: Config = {
content: [
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./packages/**/*.{js,ts,jsx,tsx,mdx}',
'./src/**/*.{js,jsx,ts,tsx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
'./contents/**/*.{js,ts,jsx,tsx,mdx}',
],
variants: {
extend: {
visibility: ['group-hover'],
content: ['before', 'after'],
gridTemplateColumns: {
custom: '25% 30% 30% 15%',
},
},
},
theme: {
extend: {
width: {
inherit: 'inherit',
},
screens: {
sm: '480px',
md: '768px',
lg: '976px',
xl: '1280px',
'2xl': '1440px',
},
backgroundImage: {
'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))',
'gradient-conic':
'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))',
},
fontFamily: {
HarmonyOS: ['HarmonyOS_Regular'],
Barlow: ['Barlow'],
HarmonyOS_Bold: ['HarmonyOS_Bold'],
HarmonyOS_Medium: ['HarmonyOS_Medium'],
},
colors: {
// 亮色模式颜色配置
warnColor: '#A56B3B',
bgColor: '#FFFFFF',
bgDesColor: '#F6F6F6',
bg_color_5: 'rgba(0,0,0,0.05)',
footerColor: '#222121',
font: '#000000',
font_des: 'rgba(0,0,0,0.6)',
accountBg: 'rgba(0,0,0,0.9)',
border_des: '#F0F1F3',
border: '#E6E8Eb',
primary: '#1C6AFD',
bg_hover: 'rgba(28, 106, 253, 0.1)',
select_bg: 'rgba(28, 106, 253, 0.6)',
icon_border: 'rgba(0,0,0,0.2)',
bgCopy: 'rgba(51, 106, 250, 0.5)',
secondary: '#00FF00',
success: '#059b02',
tipColor: '#1c1c1c',
fvmBg: '#020A1A',
success_bg: 'rgba(64, 162, 145, 0.10)',
mobile_font: '#333',
// // 暗色模式颜色配置
// dark: {
// font:'#FFFFFF',
// bgColor: '#090A0A',
// border: '#222',
// border_des: '#1C1C1C',
// bgDesColor: 'rgba(255,255,255,0.1)',
// font_des:'rgba(255,255,255,0.6)',
// },
},
},
},
plugins: [],
// plugins: [
// plugin(function({ addUtilities, e, theme }) {
// const colors:any = theme('colors', {})
// const colorModes = ['light', 'dark']
// const createUtilityClass = (mode:string, property:any, color:any) => {
// return `.${mode === 'dark' ? 'dark ' : ''}${property}-${e(color)}`
// }
// const newUtilities = colorModes.reduce((acc:any, mode:string) => {
// const modeColors = colors[mode];
// console.log('--mode',mode)
// Object.keys(modeColors).forEach((color) => {
// const utilityClassBg = createUtilityClass(mode, 'bg', color)
// const utilityClassText = createUtilityClass(mode, 'text', color)
// const utilityClassBorder = createUtilityClass(mode, 'border', color)
// acc[utilityClassBg] = { backgroundColor: modeColors[color] }
// acc[utilityClassText] = { color: modeColors[color] }
// acc[utilityClassBorder] = { borderColor: modeColors[color] }
// })
// console.log('---3',acc)
// return acc
// }, {})
// addUtilities(newUtilities)
// }),
// ],
}
export default config