-
Notifications
You must be signed in to change notification settings - Fork 12
/
tailwind.config.js
188 lines (186 loc) · 7.17 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
const colors = require('tailwindcss/colors');
module.exports = {
prefix: 'atw-',
content: [
'./addons/styling/admin/options.php',
'./blocks/**/*.{php,js}',
'./includes/*.php',
'./templates/*.php',
'./templates/block-partials/*.php',
'./assets/js/*.js',
'./assets/css/*.css'
],
theme: {
extend: {},
btn: {
primary: {
color: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-btn-primary-color), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var(--wpa-btn-primary-color), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-btn-primary-color))`
},
background: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-btn-primary-background), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var(--wpa-btn-primary-background), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-btn-primary-background))`
},
border: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-btn-primary-border), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var(--wpa-btn-primary-border), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-btn-primary-border))`
},
}
},
colors: {
primary: {
main: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-primary-main), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var(--wpa-color-primary-main), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-primary-main))`
},
light: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-primary-light), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var(--wpa-color-primary-light), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-primary-light))`
},
dark: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-primary-dark), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var(--wpa-color-primary-dark), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-primary-dark))`
}
},
secondary: 'var(--wpa-color-secondary)',
transparent: 'transparent',
black: colors.black,
white: colors.white,
form: {
gray: {
50: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-gray-50), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var--wpa-color-gray-50), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-gray-50))`
},
100: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-gray-100), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var--wpa-color-gray-100), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-gray-100))`
},
200: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-gray-200), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var--wpa-color-gray-200), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-gray-200))`
},
300: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-gray-300), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var--wpa-color-gray-300), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-gray-300))`
},
400: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-gray-400), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var--wpa-color-gray-400), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-gray-400))`
},
500: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-gray-500), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var--wpa-color-gray-500), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-gray-500))`
},
600: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-gray-600), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var--wpa-color-gray-600), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-gray-600))`
},
700: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-gray-700), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var--wpa-color-gray-700), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-gray-700))`
},
800: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-gray-800), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var--wpa-color-gray-800), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-gray-800))`
},
900: ({ opacityVariable, opacityValue }) => {
if (opacityValue !== undefined) {
return `rgba(var(--wpa-color-gray-900), ${opacityValue})`
}
if (opacityVariable !== undefined) {
return `rgba(var--wpa-color-gray-900), var(${opacityVariable}, 1))`
}
return `rgb(var(--wpa-color-gray-900))`
}
}
},
gray: colors.gray,
indigo: colors.indigo,
blue: colors.blue,
red: colors.red,
green: colors.green,
yellow: colors.amber
}
},
plugins: [],
corePlugins: {
preflight: false
}
}