tailwindcss 3.1.7 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -8
- package/lib/cli/build/deps.js +54 -0
- package/lib/cli/build/index.js +44 -0
- package/lib/cli/build/plugin.js +335 -0
- package/lib/cli/build/utils.js +78 -0
- package/lib/cli/build/watching.js +113 -0
- package/lib/cli/help/index.js +71 -0
- package/lib/cli/index.js +18 -0
- package/lib/cli/init/index.js +46 -0
- package/lib/cli/shared.js +12 -0
- package/lib/cli.js +11 -590
- package/lib/corePlugins.js +332 -108
- package/lib/css/preflight.css +5 -0
- package/lib/featureFlags.js +7 -4
- package/lib/index.js +6 -1
- package/lib/lib/content.js +167 -0
- package/lib/lib/defaultExtractor.js +15 -10
- package/lib/lib/detectNesting.js +2 -2
- package/lib/lib/evaluateTailwindFunctions.js +17 -1
- package/lib/lib/expandApplyAtRules.js +71 -37
- package/lib/lib/expandTailwindAtRules.js +10 -42
- package/lib/lib/findAtConfigPath.js +44 -0
- package/lib/lib/generateRules.js +181 -96
- package/lib/lib/normalizeTailwindDirectives.js +1 -1
- package/lib/lib/offsets.js +217 -0
- package/lib/lib/regex.js +1 -1
- package/lib/lib/setupContextUtils.js +339 -100
- package/lib/lib/setupTrackingContext.js +5 -39
- package/lib/lib/sharedState.js +2 -0
- package/lib/public/colors.js +1 -1
- package/lib/util/buildMediaQuery.js +6 -3
- package/lib/util/configurePlugins.js +1 -1
- package/lib/util/dataTypes.js +15 -19
- package/lib/util/formatVariantSelector.js +92 -8
- package/lib/util/getAllConfigs.js +14 -3
- package/lib/util/isValidArbitraryValue.js +1 -1
- package/lib/util/nameClass.js +3 -0
- package/lib/util/negateValue.js +15 -2
- package/lib/util/normalizeConfig.js +17 -3
- package/lib/util/normalizeScreens.js +100 -3
- package/lib/util/parseAnimationValue.js +1 -1
- package/lib/util/parseBoxShadowValue.js +1 -1
- package/lib/util/parseDependency.js +33 -54
- package/lib/util/parseGlob.js +34 -0
- package/lib/util/parseObjectStyles.js +1 -1
- package/lib/util/pluginUtils.js +86 -17
- package/lib/util/resolveConfig.js +3 -3
- package/lib/util/splitAtTopLevelOnly.js +31 -81
- package/lib/util/transformThemeValue.js +9 -2
- package/lib/util/validateConfig.js +1 -1
- package/lib/util/validateFormalSyntax.js +24 -0
- package/package.json +14 -12
- package/peers/.DS_Store +0 -0
- package/peers/.svgo.yml +75 -0
- package/peers/index.js +3690 -2274
- package/peers/orders/concentric-css.json +299 -0
- package/peers/orders/smacss.json +299 -0
- package/peers/orders/source.json +295 -0
- package/plugin.d.ts +3 -3
- package/scripts/release-channel.js +18 -0
- package/scripts/release-notes.js +21 -0
- package/src/.DS_Store +0 -0
- package/src/cli/build/deps.js +56 -0
- package/src/cli/build/index.js +45 -0
- package/src/cli/build/plugin.js +397 -0
- package/src/cli/build/utils.js +76 -0
- package/src/cli/build/watching.js +134 -0
- package/src/cli/help/index.js +70 -0
- package/src/cli/index.js +3 -0
- package/src/cli/init/index.js +50 -0
- package/src/cli/shared.js +5 -0
- package/src/cli.js +4 -696
- package/src/corePlugins.js +262 -39
- package/src/css/preflight.css +5 -0
- package/src/featureFlags.js +12 -2
- package/src/index.js +5 -0
- package/src/lib/content.js +205 -0
- package/src/lib/defaultExtractor.js +3 -0
- package/src/lib/evaluateTailwindFunctions.js +22 -1
- package/src/lib/expandApplyAtRules.js +76 -29
- package/src/lib/expandTailwindAtRules.js +8 -46
- package/src/lib/findAtConfigPath.js +48 -0
- package/src/lib/generateRules.js +224 -105
- package/src/lib/offsets.js +270 -0
- package/src/lib/setupContextUtils.js +376 -89
- package/src/lib/setupTrackingContext.js +4 -45
- package/src/lib/sharedState.js +2 -0
- package/src/util/buildMediaQuery.js +5 -3
- package/src/util/dataTypes.js +15 -17
- package/src/util/formatVariantSelector.js +113 -9
- package/src/util/getAllConfigs.js +14 -2
- package/src/util/nameClass.js +4 -0
- package/src/util/negateValue.js +10 -2
- package/src/util/normalizeConfig.js +22 -2
- package/src/util/normalizeScreens.js +99 -4
- package/src/util/parseBoxShadowValue.js +1 -1
- package/src/util/parseDependency.js +37 -42
- package/src/util/parseGlob.js +24 -0
- package/src/util/pluginUtils.js +90 -14
- package/src/util/resolveConfig.js +2 -2
- package/src/util/splitAtTopLevelOnly.js +23 -49
- package/src/util/transformThemeValue.js +9 -1
- package/src/util/validateFormalSyntax.js +34 -0
- package/stubs/defaultConfig.stub.js +19 -3
- package/tmp.css +11 -0
- package/tmp.dependency-graph.js +2 -0
- package/tmp.in.css +3 -0
- package/tmp.js +0 -0
- package/tmp.out.css +524 -0
- package/types/config.d.ts +47 -13
- package/types/generated/default-theme.d.ts +11 -0
- package/CHANGELOG.md +0 -2222
package/tmp.out.css
ADDED
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
/*
|
|
2
|
+
! tailwindcss v3.1.8 | MIT License | https://tailwindcss.com
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
|
7
|
+
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
*,
|
|
11
|
+
::before,
|
|
12
|
+
::after {
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
/* 1 */
|
|
15
|
+
border-width: 0;
|
|
16
|
+
/* 2 */
|
|
17
|
+
border-style: solid;
|
|
18
|
+
/* 2 */
|
|
19
|
+
border-color: #e5e7eb;
|
|
20
|
+
/* 2 */
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
::before,
|
|
24
|
+
::after {
|
|
25
|
+
--tw-content: '';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/*
|
|
29
|
+
1. Use a consistent sensible line-height in all browsers.
|
|
30
|
+
2. Prevent adjustments of font size after orientation changes in iOS.
|
|
31
|
+
3. Use a more readable tab size.
|
|
32
|
+
4. Use the user's configured `sans` font-family by default.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
html {
|
|
36
|
+
line-height: 1.5;
|
|
37
|
+
/* 1 */
|
|
38
|
+
-webkit-text-size-adjust: 100%;
|
|
39
|
+
/* 2 */
|
|
40
|
+
/* 3 */
|
|
41
|
+
tab-size: 4;
|
|
42
|
+
/* 3 */
|
|
43
|
+
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
44
|
+
/* 4 */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/*
|
|
48
|
+
1. Remove the margin in all browsers.
|
|
49
|
+
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
body {
|
|
53
|
+
margin: 0;
|
|
54
|
+
/* 1 */
|
|
55
|
+
line-height: inherit;
|
|
56
|
+
/* 2 */
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/*
|
|
60
|
+
1. Add the correct height in Firefox.
|
|
61
|
+
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
|
62
|
+
3. Ensure horizontal rules are visible by default.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
hr {
|
|
66
|
+
height: 0;
|
|
67
|
+
/* 1 */
|
|
68
|
+
color: inherit;
|
|
69
|
+
/* 2 */
|
|
70
|
+
border-top-width: 1px;
|
|
71
|
+
/* 3 */
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/*
|
|
75
|
+
Add the correct text decoration in Chrome, Edge, and Safari.
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
abbr:where([title]) {
|
|
79
|
+
-webkit-text-decoration: underline dotted;
|
|
80
|
+
text-decoration: underline dotted;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/*
|
|
84
|
+
Remove the default font size and weight for headings.
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
h1,
|
|
88
|
+
h2,
|
|
89
|
+
h3,
|
|
90
|
+
h4,
|
|
91
|
+
h5,
|
|
92
|
+
h6 {
|
|
93
|
+
font-size: inherit;
|
|
94
|
+
font-weight: inherit;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
Reset links to optimize for opt-in styling instead of opt-out.
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
a {
|
|
102
|
+
color: inherit;
|
|
103
|
+
text-decoration: inherit;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/*
|
|
107
|
+
Add the correct font weight in Edge and Safari.
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
b,
|
|
111
|
+
strong {
|
|
112
|
+
font-weight: bolder;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/*
|
|
116
|
+
1. Use the user's configured `mono` font family by default.
|
|
117
|
+
2. Correct the odd `em` font sizing in all browsers.
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
code,
|
|
121
|
+
kbd,
|
|
122
|
+
samp,
|
|
123
|
+
pre {
|
|
124
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
125
|
+
/* 1 */
|
|
126
|
+
font-size: 1em;
|
|
127
|
+
/* 2 */
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/*
|
|
131
|
+
Add the correct font size in all browsers.
|
|
132
|
+
*/
|
|
133
|
+
|
|
134
|
+
small {
|
|
135
|
+
font-size: 80%;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/*
|
|
139
|
+
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
sub,
|
|
143
|
+
sup {
|
|
144
|
+
font-size: 75%;
|
|
145
|
+
line-height: 0;
|
|
146
|
+
position: relative;
|
|
147
|
+
vertical-align: baseline;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
sub {
|
|
151
|
+
bottom: -0.25em;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
sup {
|
|
155
|
+
top: -0.5em;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/*
|
|
159
|
+
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
|
|
160
|
+
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
|
|
161
|
+
3. Remove gaps between table borders by default.
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
table {
|
|
165
|
+
text-indent: 0;
|
|
166
|
+
/* 1 */
|
|
167
|
+
border-color: inherit;
|
|
168
|
+
/* 2 */
|
|
169
|
+
border-collapse: collapse;
|
|
170
|
+
/* 3 */
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/*
|
|
174
|
+
1. Change the font styles in all browsers.
|
|
175
|
+
2. Remove the margin in Firefox and Safari.
|
|
176
|
+
3. Remove default padding in all browsers.
|
|
177
|
+
*/
|
|
178
|
+
|
|
179
|
+
button,
|
|
180
|
+
input,
|
|
181
|
+
optgroup,
|
|
182
|
+
select,
|
|
183
|
+
textarea {
|
|
184
|
+
font-family: inherit;
|
|
185
|
+
/* 1 */
|
|
186
|
+
font-size: 100%;
|
|
187
|
+
/* 1 */
|
|
188
|
+
font-weight: inherit;
|
|
189
|
+
/* 1 */
|
|
190
|
+
line-height: inherit;
|
|
191
|
+
/* 1 */
|
|
192
|
+
color: inherit;
|
|
193
|
+
/* 1 */
|
|
194
|
+
margin: 0;
|
|
195
|
+
/* 2 */
|
|
196
|
+
padding: 0;
|
|
197
|
+
/* 3 */
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/*
|
|
201
|
+
Remove the inheritance of text transform in Edge and Firefox.
|
|
202
|
+
*/
|
|
203
|
+
|
|
204
|
+
button,
|
|
205
|
+
select {
|
|
206
|
+
text-transform: none;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/*
|
|
210
|
+
1. Correct the inability to style clickable types in iOS and Safari.
|
|
211
|
+
2. Remove default button styles.
|
|
212
|
+
*/
|
|
213
|
+
|
|
214
|
+
button,
|
|
215
|
+
[type='button'],
|
|
216
|
+
[type='reset'],
|
|
217
|
+
[type='submit'] {
|
|
218
|
+
-webkit-appearance: button;
|
|
219
|
+
/* 1 */
|
|
220
|
+
background-color: transparent;
|
|
221
|
+
/* 2 */
|
|
222
|
+
background-image: none;
|
|
223
|
+
/* 2 */
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/*
|
|
227
|
+
Use the modern Firefox focus style for all focusable elements.
|
|
228
|
+
*/
|
|
229
|
+
|
|
230
|
+
:-moz-focusring {
|
|
231
|
+
outline: auto;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/*
|
|
235
|
+
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
|
|
236
|
+
*/
|
|
237
|
+
|
|
238
|
+
:-moz-ui-invalid {
|
|
239
|
+
box-shadow: none;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/*
|
|
243
|
+
Add the correct vertical alignment in Chrome and Firefox.
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
progress {
|
|
247
|
+
vertical-align: baseline;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/*
|
|
251
|
+
Correct the cursor style of increment and decrement buttons in Safari.
|
|
252
|
+
*/
|
|
253
|
+
|
|
254
|
+
::-webkit-inner-spin-button,
|
|
255
|
+
::-webkit-outer-spin-button {
|
|
256
|
+
height: auto;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/*
|
|
260
|
+
1. Correct the odd appearance in Chrome and Safari.
|
|
261
|
+
2. Correct the outline style in Safari.
|
|
262
|
+
*/
|
|
263
|
+
|
|
264
|
+
[type='search'] {
|
|
265
|
+
-webkit-appearance: textfield;
|
|
266
|
+
/* 1 */
|
|
267
|
+
outline-offset: -2px;
|
|
268
|
+
/* 2 */
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/*
|
|
272
|
+
Remove the inner padding in Chrome and Safari on macOS.
|
|
273
|
+
*/
|
|
274
|
+
|
|
275
|
+
::-webkit-search-decoration {
|
|
276
|
+
-webkit-appearance: none;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/*
|
|
280
|
+
1. Correct the inability to style clickable types in iOS and Safari.
|
|
281
|
+
2. Change font properties to `inherit` in Safari.
|
|
282
|
+
*/
|
|
283
|
+
|
|
284
|
+
::-webkit-file-upload-button {
|
|
285
|
+
-webkit-appearance: button;
|
|
286
|
+
/* 1 */
|
|
287
|
+
font: inherit;
|
|
288
|
+
/* 2 */
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/*
|
|
292
|
+
Add the correct display in Chrome and Safari.
|
|
293
|
+
*/
|
|
294
|
+
|
|
295
|
+
summary {
|
|
296
|
+
display: list-item;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/*
|
|
300
|
+
Removes the default spacing and border for appropriate elements.
|
|
301
|
+
*/
|
|
302
|
+
|
|
303
|
+
blockquote,
|
|
304
|
+
dl,
|
|
305
|
+
dd,
|
|
306
|
+
h1,
|
|
307
|
+
h2,
|
|
308
|
+
h3,
|
|
309
|
+
h4,
|
|
310
|
+
h5,
|
|
311
|
+
h6,
|
|
312
|
+
hr,
|
|
313
|
+
figure,
|
|
314
|
+
p,
|
|
315
|
+
pre {
|
|
316
|
+
margin: 0;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
fieldset {
|
|
320
|
+
margin: 0;
|
|
321
|
+
padding: 0;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
legend {
|
|
325
|
+
padding: 0;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
ol,
|
|
329
|
+
ul,
|
|
330
|
+
menu {
|
|
331
|
+
list-style: none;
|
|
332
|
+
margin: 0;
|
|
333
|
+
padding: 0;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/*
|
|
337
|
+
Prevent resizing textareas horizontally by default.
|
|
338
|
+
*/
|
|
339
|
+
|
|
340
|
+
textarea {
|
|
341
|
+
resize: vertical;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/*
|
|
345
|
+
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
|
|
346
|
+
2. Set the default placeholder color to the user's configured gray 400 color.
|
|
347
|
+
*/
|
|
348
|
+
|
|
349
|
+
input::placeholder,
|
|
350
|
+
textarea::placeholder {
|
|
351
|
+
opacity: 1;
|
|
352
|
+
/* 1 */
|
|
353
|
+
color: #9ca3af;
|
|
354
|
+
/* 2 */
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/*
|
|
358
|
+
Set the default cursor for buttons.
|
|
359
|
+
*/
|
|
360
|
+
|
|
361
|
+
button,
|
|
362
|
+
[role="button"] {
|
|
363
|
+
cursor: pointer;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/*
|
|
367
|
+
Make sure disabled buttons don't get the pointer cursor.
|
|
368
|
+
*/
|
|
369
|
+
|
|
370
|
+
:disabled {
|
|
371
|
+
cursor: default;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/*
|
|
375
|
+
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
|
|
376
|
+
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
|
|
377
|
+
This can trigger a poorly considered lint error in some tools but is included by design.
|
|
378
|
+
*/
|
|
379
|
+
|
|
380
|
+
img,
|
|
381
|
+
svg,
|
|
382
|
+
video,
|
|
383
|
+
canvas,
|
|
384
|
+
audio,
|
|
385
|
+
iframe,
|
|
386
|
+
embed,
|
|
387
|
+
object {
|
|
388
|
+
display: block;
|
|
389
|
+
/* 1 */
|
|
390
|
+
vertical-align: middle;
|
|
391
|
+
/* 2 */
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/*
|
|
395
|
+
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
|
|
396
|
+
*/
|
|
397
|
+
|
|
398
|
+
img,
|
|
399
|
+
video {
|
|
400
|
+
max-width: 100%;
|
|
401
|
+
height: auto;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* Make elements with the HTML hidden attribute stay hidden by default */
|
|
405
|
+
|
|
406
|
+
[hidden] {
|
|
407
|
+
display: none;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
*, ::before, ::after {
|
|
411
|
+
--tw-border-spacing-x: 0;
|
|
412
|
+
--tw-border-spacing-y: 0;
|
|
413
|
+
--tw-translate-x: 0;
|
|
414
|
+
--tw-translate-y: 0;
|
|
415
|
+
--tw-rotate: 0;
|
|
416
|
+
--tw-skew-x: 0;
|
|
417
|
+
--tw-skew-y: 0;
|
|
418
|
+
--tw-scale-x: 1;
|
|
419
|
+
--tw-scale-y: 1;
|
|
420
|
+
--tw-pan-x: ;
|
|
421
|
+
--tw-pan-y: ;
|
|
422
|
+
--tw-pinch-zoom: ;
|
|
423
|
+
--tw-scroll-snap-strictness: proximity;
|
|
424
|
+
--tw-ordinal: ;
|
|
425
|
+
--tw-slashed-zero: ;
|
|
426
|
+
--tw-numeric-figure: ;
|
|
427
|
+
--tw-numeric-spacing: ;
|
|
428
|
+
--tw-numeric-fraction: ;
|
|
429
|
+
--tw-ring-inset: ;
|
|
430
|
+
--tw-ring-offset-width: 0px;
|
|
431
|
+
--tw-ring-offset-color: #fff;
|
|
432
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
433
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
434
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
435
|
+
--tw-shadow: 0 0 #0000;
|
|
436
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
437
|
+
--tw-blur: ;
|
|
438
|
+
--tw-brightness: ;
|
|
439
|
+
--tw-contrast: ;
|
|
440
|
+
--tw-grayscale: ;
|
|
441
|
+
--tw-hue-rotate: ;
|
|
442
|
+
--tw-invert: ;
|
|
443
|
+
--tw-saturate: ;
|
|
444
|
+
--tw-sepia: ;
|
|
445
|
+
--tw-drop-shadow: ;
|
|
446
|
+
--tw-backdrop-blur: ;
|
|
447
|
+
--tw-backdrop-brightness: ;
|
|
448
|
+
--tw-backdrop-contrast: ;
|
|
449
|
+
--tw-backdrop-grayscale: ;
|
|
450
|
+
--tw-backdrop-hue-rotate: ;
|
|
451
|
+
--tw-backdrop-invert: ;
|
|
452
|
+
--tw-backdrop-opacity: ;
|
|
453
|
+
--tw-backdrop-saturate: ;
|
|
454
|
+
--tw-backdrop-sepia: ;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
::backdrop {
|
|
458
|
+
--tw-border-spacing-x: 0;
|
|
459
|
+
--tw-border-spacing-y: 0;
|
|
460
|
+
--tw-translate-x: 0;
|
|
461
|
+
--tw-translate-y: 0;
|
|
462
|
+
--tw-rotate: 0;
|
|
463
|
+
--tw-skew-x: 0;
|
|
464
|
+
--tw-skew-y: 0;
|
|
465
|
+
--tw-scale-x: 1;
|
|
466
|
+
--tw-scale-y: 1;
|
|
467
|
+
--tw-pan-x: ;
|
|
468
|
+
--tw-pan-y: ;
|
|
469
|
+
--tw-pinch-zoom: ;
|
|
470
|
+
--tw-scroll-snap-strictness: proximity;
|
|
471
|
+
--tw-ordinal: ;
|
|
472
|
+
--tw-slashed-zero: ;
|
|
473
|
+
--tw-numeric-figure: ;
|
|
474
|
+
--tw-numeric-spacing: ;
|
|
475
|
+
--tw-numeric-fraction: ;
|
|
476
|
+
--tw-ring-inset: ;
|
|
477
|
+
--tw-ring-offset-width: 0px;
|
|
478
|
+
--tw-ring-offset-color: #fff;
|
|
479
|
+
--tw-ring-color: rgb(59 130 246 / 0.5);
|
|
480
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
481
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
482
|
+
--tw-shadow: 0 0 #0000;
|
|
483
|
+
--tw-shadow-colored: 0 0 #0000;
|
|
484
|
+
--tw-blur: ;
|
|
485
|
+
--tw-brightness: ;
|
|
486
|
+
--tw-contrast: ;
|
|
487
|
+
--tw-grayscale: ;
|
|
488
|
+
--tw-hue-rotate: ;
|
|
489
|
+
--tw-invert: ;
|
|
490
|
+
--tw-saturate: ;
|
|
491
|
+
--tw-sepia: ;
|
|
492
|
+
--tw-drop-shadow: ;
|
|
493
|
+
--tw-backdrop-blur: ;
|
|
494
|
+
--tw-backdrop-brightness: ;
|
|
495
|
+
--tw-backdrop-contrast: ;
|
|
496
|
+
--tw-backdrop-grayscale: ;
|
|
497
|
+
--tw-backdrop-hue-rotate: ;
|
|
498
|
+
--tw-backdrop-invert: ;
|
|
499
|
+
--tw-backdrop-opacity: ;
|
|
500
|
+
--tw-backdrop-saturate: ;
|
|
501
|
+
--tw-backdrop-sepia: ;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
.text-3xl {
|
|
505
|
+
font-size: 1.875rem;
|
|
506
|
+
line-height: 2.25rem;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
.font-bold {
|
|
510
|
+
font-weight: 700;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.italic {
|
|
514
|
+
font-style: italic;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.text-gray-900 {
|
|
518
|
+
--tw-text-opacity: 1;
|
|
519
|
+
color: rgb(17 24 39 / var(--tw-text-opacity));
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.underline {
|
|
523
|
+
text-decoration-line: underline;
|
|
524
|
+
}
|
package/types/config.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ interface RecursiveKeyValuePair<K extends keyof any = string, V = string> {
|
|
|
12
12
|
[key: string]: V | RecursiveKeyValuePair<K, V>
|
|
13
13
|
}
|
|
14
14
|
type ResolvableTo<T> = T | ((utils: PluginUtils) => T)
|
|
15
|
-
type CSSRuleObject = RecursiveKeyValuePair<string, string | string[]>
|
|
15
|
+
type CSSRuleObject = RecursiveKeyValuePair<string, null | string | string[]>
|
|
16
16
|
|
|
17
17
|
interface PluginUtils {
|
|
18
18
|
colors: DefaultColors
|
|
@@ -31,6 +31,7 @@ type ContentConfig =
|
|
|
31
31
|
| (FilePath | RawFile)[]
|
|
32
32
|
| {
|
|
33
33
|
files: (FilePath | RawFile)[]
|
|
34
|
+
relative?: boolean
|
|
34
35
|
extract?: ExtractorFn | { [extension: string]: ExtractorFn }
|
|
35
36
|
transform?: TransformerFn | { [extension: string]: TransformerFn }
|
|
36
37
|
}
|
|
@@ -49,27 +50,31 @@ type SafelistConfig =
|
|
|
49
50
|
| string[]
|
|
50
51
|
| {
|
|
51
52
|
pattern: RegExp
|
|
52
|
-
variants
|
|
53
|
+
variants?: string[]
|
|
53
54
|
}[]
|
|
54
55
|
|
|
55
56
|
// Presets related config
|
|
56
57
|
type PresetsConfig = Config[]
|
|
57
58
|
|
|
58
59
|
// Future related config
|
|
59
|
-
type FutureConfigValues =
|
|
60
|
+
type FutureConfigValues =
|
|
61
|
+
| 'hoverOnlyWhenSupported'
|
|
62
|
+
| 'respectDefaultRingColorOpacity'
|
|
63
|
+
| 'disableColorOpacityUtilitiesByDefault'
|
|
64
|
+
| 'relativeContentPathsByDefault'
|
|
60
65
|
type FutureConfig = Expand<'all' | Partial<Record<FutureConfigValues, boolean>>> | []
|
|
61
66
|
|
|
62
67
|
// Experimental related config
|
|
63
|
-
type ExperimentalConfigValues = 'optimizeUniversalDefaults'
|
|
68
|
+
type ExperimentalConfigValues = 'optimizeUniversalDefaults' | 'matchVariant'
|
|
64
69
|
type ExperimentalConfig = Expand<'all' | Partial<Record<ExperimentalConfigValues, boolean>>> | []
|
|
65
70
|
|
|
66
71
|
// DarkMode related config
|
|
67
72
|
type DarkModeConfig =
|
|
68
73
|
// Use the `media` query strategy.
|
|
69
74
|
| 'media'
|
|
70
|
-
// Use the `class`
|
|
75
|
+
// Use the `class` strategy, which requires a `.dark` class on the `html`.
|
|
71
76
|
| 'class'
|
|
72
|
-
// Use the `class`
|
|
77
|
+
// Use the `class` strategy with a custom class instead of `.dark`.
|
|
73
78
|
| ['class', string]
|
|
74
79
|
|
|
75
80
|
type Screen = { raw: string } | { min: string } | { max: string } | { min: string; max: string }
|
|
@@ -153,7 +158,14 @@ interface ThemeConfig {
|
|
|
153
158
|
objectPosition: ResolvableTo<KeyValuePair>
|
|
154
159
|
padding: ThemeConfig['spacing']
|
|
155
160
|
textIndent: ThemeConfig['spacing']
|
|
156
|
-
fontFamily: ResolvableTo<
|
|
161
|
+
fontFamily: ResolvableTo<
|
|
162
|
+
KeyValuePair<
|
|
163
|
+
string,
|
|
164
|
+
| string
|
|
165
|
+
| string[]
|
|
166
|
+
| [fontFamily: string | string[], configuration: Partial<{ fontFeatureSettings: string }>]
|
|
167
|
+
>
|
|
168
|
+
>
|
|
157
169
|
fontSize: ResolvableTo<
|
|
158
170
|
KeyValuePair<
|
|
159
171
|
string,
|
|
@@ -251,13 +263,17 @@ export interface PluginAPI {
|
|
|
251
263
|
}>
|
|
252
264
|
): void
|
|
253
265
|
// for registering new dynamic utility styles
|
|
254
|
-
matchUtilities<T>(
|
|
255
|
-
utilities: KeyValuePair<
|
|
266
|
+
matchUtilities<T = string, U = string>(
|
|
267
|
+
utilities: KeyValuePair<
|
|
268
|
+
string,
|
|
269
|
+
(value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
|
|
270
|
+
>,
|
|
256
271
|
options?: Partial<{
|
|
257
272
|
respectPrefix: boolean
|
|
258
273
|
respectImportant: boolean
|
|
259
274
|
type: ValueType | ValueType[]
|
|
260
275
|
values: KeyValuePair<string, T>
|
|
276
|
+
modifiers: 'any' | KeyValuePair<string, U>
|
|
261
277
|
supportsNegativeValues: boolean
|
|
262
278
|
}>
|
|
263
279
|
): void
|
|
@@ -270,13 +286,17 @@ export interface PluginAPI {
|
|
|
270
286
|
}>
|
|
271
287
|
): void
|
|
272
288
|
// for registering new dynamic component styles
|
|
273
|
-
matchComponents<T>(
|
|
274
|
-
components: KeyValuePair<
|
|
289
|
+
matchComponents<T = string, U = string>(
|
|
290
|
+
components: KeyValuePair<
|
|
291
|
+
string,
|
|
292
|
+
(value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
|
|
293
|
+
>,
|
|
275
294
|
options?: Partial<{
|
|
276
295
|
respectPrefix: boolean
|
|
277
296
|
respectImportant: boolean
|
|
278
297
|
type: ValueType | ValueType[]
|
|
279
298
|
values: KeyValuePair<string, T>
|
|
299
|
+
modifiers: 'any' | KeyValuePair<string, U>
|
|
280
300
|
supportsNegativeValues: boolean
|
|
281
301
|
}>
|
|
282
302
|
): void
|
|
@@ -284,6 +304,17 @@ export interface PluginAPI {
|
|
|
284
304
|
addBase(base: CSSRuleObject | CSSRuleObject[]): void
|
|
285
305
|
// for registering custom variants
|
|
286
306
|
addVariant(name: string, definition: string | string[] | (() => string) | (() => string)[]): void
|
|
307
|
+
matchVariant<T = string>(
|
|
308
|
+
name: string,
|
|
309
|
+
cb: (value: T | string, extra: { modifier: string | null }) => string | string[],
|
|
310
|
+
options?: {
|
|
311
|
+
values?: KeyValuePair<string, T>
|
|
312
|
+
sort?(
|
|
313
|
+
a: { value: T | string; modifier: string | null },
|
|
314
|
+
b: { value: T | string; modifier: string | null }
|
|
315
|
+
): number
|
|
316
|
+
}
|
|
317
|
+
): void
|
|
287
318
|
// for looking up values in the user’s theme configuration
|
|
288
319
|
theme: <TDefaultValue = Config['theme']>(
|
|
289
320
|
path?: string,
|
|
@@ -299,8 +330,11 @@ export interface PluginAPI {
|
|
|
299
330
|
export type PluginCreator = (api: PluginAPI) => void
|
|
300
331
|
export type PluginsConfig = (
|
|
301
332
|
| PluginCreator
|
|
302
|
-
| { handler: PluginCreator; config?: Config }
|
|
303
|
-
| {
|
|
333
|
+
| { handler: PluginCreator; config?: Partial<Config> }
|
|
334
|
+
| {
|
|
335
|
+
(options: any): { handler: PluginCreator; config?: Partial<Config> }
|
|
336
|
+
__isOptionsFunction: true
|
|
337
|
+
}
|
|
304
338
|
)[]
|
|
305
339
|
|
|
306
340
|
// Top level config related
|
|
@@ -70,6 +70,17 @@ export type DefaultTheme = Config['theme'] & {
|
|
|
70
70
|
string
|
|
71
71
|
>
|
|
72
72
|
animation: Record<'none' | 'spin' | 'ping' | 'pulse' | 'bounce', string>
|
|
73
|
+
aria: Record<
|
|
74
|
+
| 'checked'
|
|
75
|
+
| 'disabled'
|
|
76
|
+
| 'expanded'
|
|
77
|
+
| 'hidden'
|
|
78
|
+
| 'pressed'
|
|
79
|
+
| 'readonly'
|
|
80
|
+
| 'required'
|
|
81
|
+
| 'selected',
|
|
82
|
+
string
|
|
83
|
+
>
|
|
73
84
|
aspectRatio: Record<'auto' | 'square' | 'video', string>
|
|
74
85
|
backgroundImage: Record<
|
|
75
86
|
| 'none'
|