-
Notifications
You must be signed in to change notification settings - Fork 1
/
windi.config.ts
108 lines (105 loc) · 2.68 KB
/
windi.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
108
import { defineConfig } from 'vite-plugin-windicss'
import plugin from 'windicss/plugin'
export default defineConfig({
darkMode: 'media',
theme: {
extend: {
colors: {
ttred: {
'500': '#fe3500',
'900': '#da1100'
},
ttyellow: {
'300': '#feedb2',
'500': '#fec500'
}
},
},
fontFamily: {
sans: ['"PT Sans"', 'sans-serif']
}
},
plugins: [
require('windicss/plugin/forms'),
require('windicss/plugin/aspect-ratio'),
plugin(({ addBase, theme }) => {
addBase({
p: {
marginBottom: '0.5rem'
},
'p a': {
color: theme('colors.blue.500') as string,
textDecorationLine: 'underline',
textUnderlineOffset: '1px',
'&:hover': {
color: theme('colors.blue.800') as string,
textUnderlineOffset: '3px',
}
},
h1: {
fontSize: '2.25rem',
lineHeight: '2.5rem',
fontWeight: '600'
},
h2: {
fontSize: '1.125rem',
lineHeight: '1.75rem',
fontWeight: '600'
}
})
}),
plugin(({ addComponents, theme }) => {
addComponents({
'.btn': {
padding: '.5rem',
borderRadius: '.25rem',
display: 'block',
width: '100%',
backgroundColor: theme('colors.white') as string,
borderColor: theme('colors.gray.300') as string,
borderWidth: '1px',
borderStyle: 'solid',
cursor: 'pointer',
textAlign: 'center',
'&:hover': {
backgroundColor: theme('colors.gray.200') as string
},
'&:disabled': {
cursor: 'default',
backgroundColor: theme('colors.gray.200')as string,
color: theme('colors.gray.500') as string
}
},
'form:invalid .btn': {
cursor: 'default',
backgroundColor: theme('colors.gray.200') as string,
color: theme('colors.gray.500') as string
},
'.trick-level': {
'&:before': {
right: '100%'
},
'&:after': {
left: '100%'
},
'&:before, &:after': {
content: '" "',
borderBottomWidth: '2px',
borderColor: theme('colors.gray.300') as string,
position: 'absolute',
width: '100%',
maxWidth: '20vw',
top: '50%'
}
},
'.prose p, .prose ul': {
marginBottom: '.5rem'
},
'.prose ul': {
listStyle: 'disc',
paddingLeft: '3rem'
}
})
})
]
})