This repository has been archived by the owner on Sep 15, 2023. It is now read-only.
/
tailwind.config.js
139 lines (134 loc) · 3.84 KB
/
tailwind.config.js
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// tailwind.config.js
const plugin = require('windicss/plugin')
const colors = require('windicss/colors')
module.exports = {
theme: {
colors: {
transparent: 'transparent',
current: 'currentColor',
...colors,
primary: colors.pink,
link: colors.blue,
info: colors.indigo,
success: colors.green,
warning: colors.yellow,
danger: colors.red,
},
},
plugins: [
require('windicss/plugin/forms'),
require('windicss/plugin/typography'),
plugin(function ({ addBase, theme }) {
addBase({
'h1, h2, h3': {
fontWeight: theme('fontWeight.semibold'),
lineHeight: theme('lineHeight.tight'),
},
h1: {
fontSize: theme('fontSize.5xl'),
},
h2: {
fontSize: theme('fontSize.3xl'),
},
h3: {
fontSize: theme('fontSize.xl'),
},
summary: {
display: 'block',
},
'summary::marker': {
display: 'none',
},
'summary::-webkit-details-marker': {
display: 'none',
},
'details[open] > summary > span.g-summary-arrow': {
transform: 'rotate(180deg)',
},
'th, dt': {
fontWeight: theme('font.bold'),
padding: `${theme('spacing.2')} ${theme('spacing.2')}`,
backgroundColor: theme('colors.gray.100'),
'&:hover': {
backgroundColor: theme('colors.gray.200'),
},
},
'td, dd': {
padding: `${theme('spacing.2')} ${theme('spacing.2')}`,
},
})
}),
plugin(function ({ addComponents, theme }) {
const button = {
'.button': {
backgroundColor: theme('colors.white'),
borderWidth: '1px',
borderColor: theme('colors.gray.300'),
borderRadius: theme('borderRadius.md'),
paddingTop: theme('spacing.2'),
paddingBottom: theme('spacing.2'),
paddingLeft: theme('spacing.4'),
paddingRight: theme('spacing.4'),
cursor: 'pointer',
textAlign: 'center',
whiteSpace: 'nowrap',
'&.is-white': {
backgroundColor: theme('colors.white'),
borderColor: 'transparent',
},
'&.is-light': {
backgroundColor: theme('colors.gray.200'),
},
'&.is-dark': {
backgroundColor: theme('colors.gray.700'),
color: theme('colors.gray.200'),
},
'&.is-black': {
backgroundColor: theme('colors.black'),
color: theme('colors.white'),
},
'&.is-text': {
backgroundColor: 'transparent',
borderColor: 'transparent',
textDecoration: 'underline',
},
'&.is-ghost': {
background: '0 0',
borderColor: 'transparent',
color: theme('colors.blue.600'),
},
},
}
addComponents(button)
}),
plugin(function ({ addComponents, theme }) {
const colors = {
'.is-primary': {
backgroundColor: theme('colors.primary.600'),
color: theme('colors.white'),
},
'.is-link': {
backgroundColor: theme('colors.link.600'),
color: theme('colors.white'),
},
'.is-info': {
backgroundColor: theme('colors.info.600'),
color: theme('colors.white'),
},
'.is-success': {
backgroundColor: theme('colors.success.600'),
color: theme('colors.white'),
},
'.is-warning': {
backgroundColor: theme('colors.warning.600'),
color: theme('colors.black'),
},
'.is-danger': {
backgroundColor: theme('colors.danger.600'),
color: theme('colors.white'),
},
}
addComponents(colors)
}),
],
}