tailwindcss 0.0.0-insiders.0ddc71e → 0.0.0-insiders.0de1f0c
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 +2 -3
- package/lib/cli/build/plugin.js +10 -17
- package/lib/cli/build/watching.js +1 -1
- package/lib/cli.js +1 -5
- package/lib/corePluginList.js +5 -1
- package/lib/corePlugins.js +195 -40
- package/lib/css/preflight.css +25 -8
- package/lib/featureFlags.js +2 -6
- package/lib/lib/defaultExtractor.js +33 -25
- package/lib/lib/evaluateTailwindFunctions.js +5 -3
- package/lib/lib/expandApplyAtRules.js +19 -0
- package/lib/lib/expandTailwindAtRules.js +23 -18
- package/lib/lib/generateRules.js +51 -26
- package/lib/lib/load-config.js +18 -3
- package/lib/lib/offsets.js +51 -2
- package/lib/lib/resolveDefaultsAtRules.js +3 -1
- package/lib/lib/setupContextUtils.js +81 -38
- package/lib/lib/setupTrackingContext.js +2 -1
- package/lib/lib/sharedState.js +2 -10
- package/lib/plugin.js +3 -53
- package/lib/processTailwindFeatures.js +2 -4
- package/lib/util/cloneNodes.js +33 -13
- package/lib/util/color.js +1 -1
- package/lib/util/dataTypes.js +142 -17
- package/lib/util/formatVariantSelector.js +10 -3
- package/lib/util/isPlainObject.js +1 -1
- package/lib/util/normalizeConfig.js +1 -2
- package/lib/util/parseAnimationValue.js +1 -1
- package/lib/util/parseGlob.js +1 -2
- package/lib/util/pluginUtils.js +14 -1
- package/lib/util/prefixSelector.js +1 -1
- package/lib/util/pseudoElements.js +13 -30
- package/lib/util/splitAtTopLevelOnly.js +1 -5
- package/lib/value-parser/LICENSE +22 -0
- package/lib/value-parser/README.md +3 -0
- package/lib/value-parser/index.d.js +2 -0
- package/lib/value-parser/index.js +22 -0
- package/lib/value-parser/parse.js +259 -0
- package/lib/value-parser/stringify.js +38 -0
- package/lib/value-parser/unit.js +86 -0
- package/lib/value-parser/walk.js +16 -0
- package/nesting/index.d.ts +4 -0
- package/package.json +8 -12
- package/peers/index.js +2296 -2044
- package/resolveConfig.d.ts +22 -3
- package/scripts/generate-types.js +1 -2
- package/src/cli/build/plugin.js +10 -17
- package/src/cli/build/watching.js +1 -1
- package/src/cli.js +1 -5
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +182 -41
- package/src/css/preflight.css +25 -8
- package/src/featureFlags.js +3 -11
- package/src/lib/defaultExtractor.js +30 -17
- package/src/lib/evaluateTailwindFunctions.js +4 -1
- package/src/lib/expandApplyAtRules.js +24 -0
- package/src/lib/expandTailwindAtRules.js +29 -30
- package/src/lib/generateRules.js +51 -27
- package/src/lib/load-config.ts +13 -0
- package/src/lib/offsets.js +61 -2
- package/src/lib/resolveDefaultsAtRules.js +5 -1
- package/src/lib/setupContextUtils.js +83 -39
- package/src/lib/setupTrackingContext.js +1 -3
- package/src/lib/sharedState.js +0 -4
- package/src/plugin.js +3 -63
- package/src/processTailwindFeatures.js +3 -5
- package/src/util/cloneNodes.js +35 -14
- package/src/util/color.js +1 -1
- package/src/util/dataTypes.js +150 -19
- package/src/util/formatVariantSelector.js +11 -3
- package/src/util/isPlainObject.js +1 -1
- package/src/util/normalizeConfig.js +1 -3
- package/src/util/parseAnimationValue.js +1 -1
- package/src/util/parseGlob.js +1 -2
- package/src/util/pluginUtils.js +17 -1
- package/src/util/prefixSelector.js +1 -0
- package/src/util/pseudoElements.js +14 -13
- package/src/util/splitAtTopLevelOnly.js +1 -5
- package/src/value-parser/LICENSE +22 -0
- package/src/value-parser/README.md +3 -0
- package/src/value-parser/index.d.ts +177 -0
- package/src/value-parser/index.js +28 -0
- package/src/value-parser/parse.js +303 -0
- package/src/value-parser/stringify.js +41 -0
- package/src/value-parser/unit.js +118 -0
- package/src/value-parser/walk.js +18 -0
- package/stubs/config.full.js +87 -15
- package/types/config.d.ts +17 -9
- package/types/generated/corePluginList.d.ts +1 -1
- package/types/generated/default-theme.d.ts +35 -9
- package/types/index.d.ts +7 -3
- package/lib/lib/detectNesting.js +0 -45
- package/lib/oxide/cli/build/deps.js +0 -89
- package/lib/oxide/cli/build/index.js +0 -53
- package/lib/oxide/cli/build/plugin.js +0 -375
- package/lib/oxide/cli/build/utils.js +0 -87
- package/lib/oxide/cli/build/watching.js +0 -179
- package/lib/oxide/cli/help/index.js +0 -72
- package/lib/oxide/cli/index.js +0 -214
- package/lib/oxide/cli/init/index.js +0 -52
- package/lib/oxide/cli.js +0 -5
- package/lib/oxide/postcss-plugin.js +0 -2
- package/scripts/swap-engines.js +0 -40
- package/src/lib/detectNesting.js +0 -47
- package/src/oxide/cli/build/deps.ts +0 -91
- package/src/oxide/cli/build/index.ts +0 -47
- package/src/oxide/cli/build/plugin.ts +0 -442
- package/src/oxide/cli/build/utils.ts +0 -74
- package/src/oxide/cli/build/watching.ts +0 -225
- package/src/oxide/cli/help/index.ts +0 -69
- package/src/oxide/cli/index.ts +0 -204
- package/src/oxide/cli/init/index.ts +0 -59
- package/src/oxide/cli.ts +0 -1
- package/src/oxide/postcss-plugin.ts +0 -1
package/README.md
CHANGED
|
@@ -12,15 +12,14 @@
|
|
|
12
12
|
A utility-first CSS framework for rapidly building custom user interfaces.
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
|
-
|
|
16
15
|
<p align="center">
|
|
17
|
-
<a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/actions/workflow/status/tailwindlabs/tailwindcss/ci
|
|
16
|
+
<a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/actions/workflow/status/tailwindlabs/tailwindcss/ci.yml?branch=master" alt="Build Status"></a>
|
|
18
17
|
<a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a>
|
|
19
18
|
<a href="https://github.com/tailwindcss/tailwindcss/releases"><img src="https://img.shields.io/npm/v/tailwindcss.svg" alt="Latest Release"></a>
|
|
20
19
|
<a href="https://github.com/tailwindcss/tailwindcss/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/tailwindcss.svg" alt="License"></a>
|
|
21
20
|
</p>
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
---
|
|
24
23
|
|
|
25
24
|
## Documentation
|
|
26
25
|
|
package/lib/cli/build/plugin.js
CHANGED
|
@@ -167,17 +167,10 @@ let state = {
|
|
|
167
167
|
// TODO: When we make the postcss plugin async-capable this can become async
|
|
168
168
|
let files = _fastglob.default.sync(this.contentPatterns.all);
|
|
169
169
|
for (let file of files){
|
|
170
|
-
|
|
171
|
-
content.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
});
|
|
175
|
-
} else {
|
|
176
|
-
content.push({
|
|
177
|
-
content: _fs.default.readFileSync(_path.default.resolve(file), "utf8"),
|
|
178
|
-
extension: _path.default.extname(file).slice(1)
|
|
179
|
-
});
|
|
180
|
-
}
|
|
170
|
+
content.push({
|
|
171
|
+
content: _fs.default.readFileSync(_path.default.resolve(file), "utf8"),
|
|
172
|
+
extension: _path.default.extname(file).slice(1)
|
|
173
|
+
});
|
|
181
174
|
}
|
|
182
175
|
// Resolve raw content in the tailwind config
|
|
183
176
|
let rawContent = this.config.content.files.filter((file)=>{
|
|
@@ -192,14 +185,14 @@ let state = {
|
|
|
192
185
|
return content;
|
|
193
186
|
},
|
|
194
187
|
getContext ({ createContext , cliConfigPath , root , result , content }) {
|
|
195
|
-
if (this.context) {
|
|
196
|
-
this.context.changedContent = this.changedContent.splice(0);
|
|
197
|
-
return this.context;
|
|
198
|
-
}
|
|
199
188
|
_sharedState.env.DEBUG && console.time("Searching for config");
|
|
200
189
|
var _findAtConfigPath1;
|
|
201
190
|
let configPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : cliConfigPath;
|
|
202
191
|
_sharedState.env.DEBUG && console.timeEnd("Searching for config");
|
|
192
|
+
if (this.context) {
|
|
193
|
+
this.context.changedContent = this.changedContent.splice(0);
|
|
194
|
+
return this.context;
|
|
195
|
+
}
|
|
203
196
|
_sharedState.env.DEBUG && console.time("Loading config");
|
|
204
197
|
let config = this.loadConfig(configPath, content);
|
|
205
198
|
_sharedState.env.DEBUG && console.timeEnd("Loading config");
|
|
@@ -245,9 +238,9 @@ async function createProcessor(args, cliConfigPath) {
|
|
|
245
238
|
let tailwindPlugin = ()=>{
|
|
246
239
|
return {
|
|
247
240
|
postcssPlugin: "tailwindcss",
|
|
248
|
-
Once (root, { result }) {
|
|
241
|
+
async Once (root, { result }) {
|
|
249
242
|
_sharedState.env.DEBUG && console.time("Compiling CSS");
|
|
250
|
-
(0, _processTailwindFeatures.default)(({ createContext })=>{
|
|
243
|
+
await (0, _processTailwindFeatures.default)(({ createContext })=>{
|
|
251
244
|
console.error();
|
|
252
245
|
console.error("Rebuilding...");
|
|
253
246
|
return ()=>{
|
|
@@ -126,7 +126,7 @@ function createWatcher(args, { state , rebuild }) {
|
|
|
126
126
|
// This is very likely a chokidar bug but it's one we need to work around
|
|
127
127
|
// We treat this as a change event and rebuild the CSS
|
|
128
128
|
watcher.on("raw", (evt, filePath, meta)=>{
|
|
129
|
-
if (evt !== "rename") {
|
|
129
|
+
if (evt !== "rename" || filePath === null) {
|
|
130
130
|
return;
|
|
131
131
|
}
|
|
132
132
|
let watchedPath = meta.watchedPath;
|
package/lib/cli.js
CHANGED
package/lib/corePluginList.js
CHANGED
|
@@ -32,6 +32,7 @@ const _default = [
|
|
|
32
32
|
"lineClamp",
|
|
33
33
|
"display",
|
|
34
34
|
"aspectRatio",
|
|
35
|
+
"size",
|
|
35
36
|
"height",
|
|
36
37
|
"maxHeight",
|
|
37
38
|
"minHeight",
|
|
@@ -98,6 +99,7 @@ const _default = [
|
|
|
98
99
|
"textOverflow",
|
|
99
100
|
"hyphens",
|
|
100
101
|
"whitespace",
|
|
102
|
+
"textWrap",
|
|
101
103
|
"wordBreak",
|
|
102
104
|
"borderRadius",
|
|
103
105
|
"borderWidth",
|
|
@@ -183,5 +185,7 @@ const _default = [
|
|
|
183
185
|
"transitionDuration",
|
|
184
186
|
"transitionTimingFunction",
|
|
185
187
|
"willChange",
|
|
186
|
-
"
|
|
188
|
+
"contain",
|
|
189
|
+
"content",
|
|
190
|
+
"forcedColorAdjust"
|
|
187
191
|
];
|
package/lib/corePlugins.js
CHANGED
|
@@ -35,6 +35,7 @@ const _parseBoxShadowValue = require("./util/parseBoxShadowValue");
|
|
|
35
35
|
const _removeAlphaVariables = require("./util/removeAlphaVariables");
|
|
36
36
|
const _featureFlags = require("./featureFlags");
|
|
37
37
|
const _dataTypes = require("./util/dataTypes");
|
|
38
|
+
const _setupContextUtils = require("./lib/setupContextUtils");
|
|
38
39
|
function _interop_require_default(obj) {
|
|
39
40
|
return obj && obj.__esModule ? obj : {
|
|
40
41
|
default: obj
|
|
@@ -80,6 +81,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
80
81
|
return newObj;
|
|
81
82
|
}
|
|
82
83
|
let variantPlugins = {
|
|
84
|
+
childVariant: ({ addVariant })=>{
|
|
85
|
+
addVariant("*", "& > *");
|
|
86
|
+
},
|
|
83
87
|
pseudoElementVariants: ({ addVariant })=>{
|
|
84
88
|
addVariant("first-letter", "&::first-letter");
|
|
85
89
|
addVariant("first-line", "&::first-line");
|
|
@@ -135,7 +139,7 @@ let variantPlugins = {
|
|
|
135
139
|
return "&::after";
|
|
136
140
|
});
|
|
137
141
|
},
|
|
138
|
-
pseudoClassVariants: ({ addVariant , matchVariant , config })=>{
|
|
142
|
+
pseudoClassVariants: ({ addVariant , matchVariant , config , prefix })=>{
|
|
139
143
|
let pseudoVariants = [
|
|
140
144
|
// Positional
|
|
141
145
|
[
|
|
@@ -216,17 +220,17 @@ let variantPlugins = {
|
|
|
216
220
|
}
|
|
217
221
|
let variants = {
|
|
218
222
|
group: (_, { modifier })=>modifier ? [
|
|
219
|
-
`:merge(.group\\/${(0, _escapeClassName.default)(modifier)})`,
|
|
223
|
+
`:merge(${prefix(".group")}\\/${(0, _escapeClassName.default)(modifier)})`,
|
|
220
224
|
" &"
|
|
221
225
|
] : [
|
|
222
|
-
`:merge(.group)`,
|
|
226
|
+
`:merge(${prefix(".group")})`,
|
|
223
227
|
" &"
|
|
224
228
|
],
|
|
225
229
|
peer: (_, { modifier })=>modifier ? [
|
|
226
|
-
`:merge(.peer\\/${(0, _escapeClassName.default)(modifier)})`,
|
|
230
|
+
`:merge(${prefix(".peer")}\\/${(0, _escapeClassName.default)(modifier)})`,
|
|
227
231
|
" ~ &"
|
|
228
232
|
] : [
|
|
229
|
-
`:merge(.peer)`,
|
|
233
|
+
`:merge(${prefix(".peer")})`,
|
|
230
234
|
" ~ &"
|
|
231
235
|
]
|
|
232
236
|
};
|
|
@@ -255,20 +259,23 @@ let variantPlugins = {
|
|
|
255
259
|
// result.replace(/&(\S+)?/g, (_, pseudo = '') => a + pseudo + b)
|
|
256
260
|
return result.slice(0, start) + a + result.slice(start + 1, end) + b + result.slice(end);
|
|
257
261
|
}, {
|
|
258
|
-
values: Object.fromEntries(pseudoVariants)
|
|
262
|
+
values: Object.fromEntries(pseudoVariants),
|
|
263
|
+
[_setupContextUtils.INTERNAL_FEATURES]: {
|
|
264
|
+
respectPrefix: false
|
|
265
|
+
}
|
|
259
266
|
});
|
|
260
267
|
}
|
|
261
268
|
},
|
|
262
269
|
directionVariants: ({ addVariant })=>{
|
|
263
|
-
addVariant("ltr", '
|
|
264
|
-
addVariant("rtl", '
|
|
270
|
+
addVariant("ltr", '&:where([dir="ltr"], [dir="ltr"] *)');
|
|
271
|
+
addVariant("rtl", '&:where([dir="rtl"], [dir="rtl"] *)');
|
|
265
272
|
},
|
|
266
273
|
reducedMotionVariants: ({ addVariant })=>{
|
|
267
274
|
addVariant("motion-safe", "@media (prefers-reduced-motion: no-preference)");
|
|
268
275
|
addVariant("motion-reduce", "@media (prefers-reduced-motion: reduce)");
|
|
269
276
|
},
|
|
270
277
|
darkVariants: ({ config , addVariant })=>{
|
|
271
|
-
let [mode,
|
|
278
|
+
let [mode, selector = ".dark"] = [].concat(config("darkMode", "media"));
|
|
272
279
|
if (mode === false) {
|
|
273
280
|
mode = "media";
|
|
274
281
|
_log.default.warn("darkmode-false", [
|
|
@@ -277,10 +284,48 @@ let variantPlugins = {
|
|
|
277
284
|
"https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration"
|
|
278
285
|
]);
|
|
279
286
|
}
|
|
280
|
-
if (mode === "
|
|
281
|
-
|
|
287
|
+
if (mode === "variant") {
|
|
288
|
+
let formats;
|
|
289
|
+
if (Array.isArray(selector)) {
|
|
290
|
+
formats = selector;
|
|
291
|
+
} else if (typeof selector === "function") {
|
|
292
|
+
formats = selector;
|
|
293
|
+
} else if (typeof selector === "string") {
|
|
294
|
+
formats = [
|
|
295
|
+
selector
|
|
296
|
+
];
|
|
297
|
+
}
|
|
298
|
+
// TODO: We could also add these warnings if the user passes a function that returns string | string[]
|
|
299
|
+
// But this is an advanced enough use case that it's probably not necessary
|
|
300
|
+
if (Array.isArray(formats)) {
|
|
301
|
+
for (let format of formats){
|
|
302
|
+
if (format === ".dark") {
|
|
303
|
+
mode = false;
|
|
304
|
+
_log.default.warn("darkmode-variant-without-selector", [
|
|
305
|
+
"When using `variant` for `darkMode`, you must provide a selector.",
|
|
306
|
+
'Example: `darkMode: ["variant", ".your-selector &"]`'
|
|
307
|
+
]);
|
|
308
|
+
} else if (!format.includes("&")) {
|
|
309
|
+
mode = false;
|
|
310
|
+
_log.default.warn("darkmode-variant-without-ampersand", [
|
|
311
|
+
"When using `variant` for `darkMode`, your selector must contain `&`.",
|
|
312
|
+
'Example `darkMode: ["variant", ".your-selector &"]`'
|
|
313
|
+
]);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
selector = formats;
|
|
318
|
+
}
|
|
319
|
+
if (mode === "selector") {
|
|
320
|
+
// New preferred behavior
|
|
321
|
+
addVariant("dark", `&:where(${selector}, ${selector} *)`);
|
|
282
322
|
} else if (mode === "media") {
|
|
283
323
|
addVariant("dark", "@media (prefers-color-scheme: dark)");
|
|
324
|
+
} else if (mode === "variant") {
|
|
325
|
+
addVariant("dark", selector);
|
|
326
|
+
} else if (mode === "class") {
|
|
327
|
+
// Old behavior
|
|
328
|
+
addVariant("dark", `&:is(${selector} *)`);
|
|
284
329
|
}
|
|
285
330
|
},
|
|
286
331
|
printVariant: ({ addVariant })=>{
|
|
@@ -398,7 +443,7 @@ let variantPlugins = {
|
|
|
398
443
|
matchVariant("supports", (value = "")=>{
|
|
399
444
|
let check = (0, _dataTypes.normalize)(value);
|
|
400
445
|
let isRaw = /^\w*\s*\(/.test(check);
|
|
401
|
-
// Chrome has a bug where `(
|
|
446
|
+
// Chrome has a bug where `(condition1)or(condition2)` is not valid
|
|
402
447
|
// But `(condition1) or (condition2)` is supported.
|
|
403
448
|
check = isRaw ? check.replace(/\b(and|or|not)\b/g, " $1 ") : check;
|
|
404
449
|
if (isRaw) {
|
|
@@ -415,6 +460,26 @@ let variantPlugins = {
|
|
|
415
460
|
values: (_theme = theme("supports")) !== null && _theme !== void 0 ? _theme : {}
|
|
416
461
|
});
|
|
417
462
|
},
|
|
463
|
+
hasVariants: ({ matchVariant , prefix })=>{
|
|
464
|
+
matchVariant("has", (value)=>`&:has(${(0, _dataTypes.normalize)(value)})`, {
|
|
465
|
+
values: {},
|
|
466
|
+
[_setupContextUtils.INTERNAL_FEATURES]: {
|
|
467
|
+
respectPrefix: false
|
|
468
|
+
}
|
|
469
|
+
});
|
|
470
|
+
matchVariant("group-has", (value, { modifier })=>modifier ? `:merge(${prefix(".group")}\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) &` : `:merge(${prefix(".group")}):has(${(0, _dataTypes.normalize)(value)}) &`, {
|
|
471
|
+
values: {},
|
|
472
|
+
[_setupContextUtils.INTERNAL_FEATURES]: {
|
|
473
|
+
respectPrefix: false
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
matchVariant("peer-has", (value, { modifier })=>modifier ? `:merge(${prefix(".peer")}\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) ~ &` : `:merge(${prefix(".peer")}):has(${(0, _dataTypes.normalize)(value)}) ~ &`, {
|
|
477
|
+
values: {},
|
|
478
|
+
[_setupContextUtils.INTERNAL_FEATURES]: {
|
|
479
|
+
respectPrefix: false
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
},
|
|
418
483
|
ariaVariants: ({ matchVariant , theme })=>{
|
|
419
484
|
var _theme;
|
|
420
485
|
matchVariant("aria", (value)=>`&[aria-${(0, _dataTypes.normalize)(value)}]`, {
|
|
@@ -450,6 +515,9 @@ let variantPlugins = {
|
|
|
450
515
|
prefersContrastVariants: ({ addVariant })=>{
|
|
451
516
|
addVariant("contrast-more", "@media (prefers-contrast: more)");
|
|
452
517
|
addVariant("contrast-less", "@media (prefers-contrast: less)");
|
|
518
|
+
},
|
|
519
|
+
forcedColorsVariants: ({ addVariant })=>{
|
|
520
|
+
addVariant("forced-colors", "@media (forced-colors: active)");
|
|
453
521
|
}
|
|
454
522
|
};
|
|
455
523
|
let cssTransformValue = [
|
|
@@ -735,7 +803,9 @@ let corePlugins = {
|
|
|
735
803
|
"gridColumnStart"
|
|
736
804
|
]
|
|
737
805
|
]
|
|
738
|
-
]
|
|
806
|
+
], {
|
|
807
|
+
supportsNegativeValues: true
|
|
808
|
+
}),
|
|
739
809
|
gridColumnEnd: (0, _createUtilityPlugin.default)("gridColumnEnd", [
|
|
740
810
|
[
|
|
741
811
|
"col-end",
|
|
@@ -743,7 +813,9 @@ let corePlugins = {
|
|
|
743
813
|
"gridColumnEnd"
|
|
744
814
|
]
|
|
745
815
|
]
|
|
746
|
-
]
|
|
816
|
+
], {
|
|
817
|
+
supportsNegativeValues: true
|
|
818
|
+
}),
|
|
747
819
|
gridRow: (0, _createUtilityPlugin.default)("gridRow", [
|
|
748
820
|
[
|
|
749
821
|
"row",
|
|
@@ -759,7 +831,9 @@ let corePlugins = {
|
|
|
759
831
|
"gridRowStart"
|
|
760
832
|
]
|
|
761
833
|
]
|
|
762
|
-
]
|
|
834
|
+
], {
|
|
835
|
+
supportsNegativeValues: true
|
|
836
|
+
}),
|
|
763
837
|
gridRowEnd: (0, _createUtilityPlugin.default)("gridRowEnd", [
|
|
764
838
|
[
|
|
765
839
|
"row-end",
|
|
@@ -767,9 +841,17 @@ let corePlugins = {
|
|
|
767
841
|
"gridRowEnd"
|
|
768
842
|
]
|
|
769
843
|
]
|
|
770
|
-
]
|
|
844
|
+
], {
|
|
845
|
+
supportsNegativeValues: true
|
|
846
|
+
}),
|
|
771
847
|
float: ({ addUtilities })=>{
|
|
772
848
|
addUtilities({
|
|
849
|
+
".float-start": {
|
|
850
|
+
float: "inline-start"
|
|
851
|
+
},
|
|
852
|
+
".float-end": {
|
|
853
|
+
float: "inline-end"
|
|
854
|
+
},
|
|
773
855
|
".float-right": {
|
|
774
856
|
float: "right"
|
|
775
857
|
},
|
|
@@ -783,6 +865,12 @@ let corePlugins = {
|
|
|
783
865
|
},
|
|
784
866
|
clear: ({ addUtilities })=>{
|
|
785
867
|
addUtilities({
|
|
868
|
+
".clear-start": {
|
|
869
|
+
clear: "inline-start"
|
|
870
|
+
},
|
|
871
|
+
".clear-end": {
|
|
872
|
+
clear: "inline-end"
|
|
873
|
+
},
|
|
786
874
|
".clear-left": {
|
|
787
875
|
clear: "left"
|
|
788
876
|
},
|
|
@@ -966,6 +1054,15 @@ let corePlugins = {
|
|
|
966
1054
|
]
|
|
967
1055
|
]
|
|
968
1056
|
]),
|
|
1057
|
+
size: (0, _createUtilityPlugin.default)("size", [
|
|
1058
|
+
[
|
|
1059
|
+
"size",
|
|
1060
|
+
[
|
|
1061
|
+
"width",
|
|
1062
|
+
"height"
|
|
1063
|
+
]
|
|
1064
|
+
]
|
|
1065
|
+
]),
|
|
969
1066
|
height: (0, _createUtilityPlugin.default)("height", [
|
|
970
1067
|
[
|
|
971
1068
|
"h",
|
|
@@ -1283,7 +1380,7 @@ let corePlugins = {
|
|
|
1283
1380
|
});
|
|
1284
1381
|
},
|
|
1285
1382
|
animation: ({ matchUtilities , theme , config })=>{
|
|
1286
|
-
let prefixName = (name)
|
|
1383
|
+
let prefixName = (name)=>(0, _escapeClassName.default)(config("prefix") + name);
|
|
1287
1384
|
var _theme;
|
|
1288
1385
|
let keyframes = Object.fromEntries(Object.entries((_theme = theme("keyframes")) !== null && _theme !== void 0 ? _theme : {}).map(([key, value])=>{
|
|
1289
1386
|
return [
|
|
@@ -1609,6 +1706,9 @@ let corePlugins = {
|
|
|
1609
1706
|
addUtilities({
|
|
1610
1707
|
".appearance-none": {
|
|
1611
1708
|
appearance: "none"
|
|
1709
|
+
},
|
|
1710
|
+
".appearance-auto": {
|
|
1711
|
+
appearance: "auto"
|
|
1612
1712
|
}
|
|
1613
1713
|
});
|
|
1614
1714
|
},
|
|
@@ -1939,15 +2039,6 @@ let corePlugins = {
|
|
|
1939
2039
|
matchUtilities({
|
|
1940
2040
|
"space-x": (value)=>{
|
|
1941
2041
|
value = value === "0" ? "0px" : value;
|
|
1942
|
-
if (false) {
|
|
1943
|
-
return {
|
|
1944
|
-
"& > :not([hidden]) ~ :not([hidden])": {
|
|
1945
|
-
"--tw-space-x-reverse": "0",
|
|
1946
|
-
"margin-inline-end": `calc(${value} * var(--tw-space-x-reverse))`,
|
|
1947
|
-
"margin-inline-start": `calc(${value} * calc(1 - var(--tw-space-x-reverse)))`
|
|
1948
|
-
}
|
|
1949
|
-
};
|
|
1950
|
-
}
|
|
1951
2042
|
return {
|
|
1952
2043
|
"& > :not([hidden]) ~ :not([hidden])": {
|
|
1953
2044
|
"--tw-space-x-reverse": "0",
|
|
@@ -1983,16 +2074,6 @@ let corePlugins = {
|
|
|
1983
2074
|
matchUtilities({
|
|
1984
2075
|
"divide-x": (value)=>{
|
|
1985
2076
|
value = value === "0" ? "0px" : value;
|
|
1986
|
-
if (false) {
|
|
1987
|
-
return {
|
|
1988
|
-
"& > :not([hidden]) ~ :not([hidden])": {
|
|
1989
|
-
"@defaults border-width": {},
|
|
1990
|
-
"--tw-divide-x-reverse": "0",
|
|
1991
|
-
"border-inline-end-width": `calc(${value} * var(--tw-divide-x-reverse))`,
|
|
1992
|
-
"border-inline-start-width": `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`
|
|
1993
|
-
}
|
|
1994
|
-
};
|
|
1995
|
-
}
|
|
1996
2077
|
return {
|
|
1997
2078
|
"& > :not([hidden]) ~ :not([hidden])": {
|
|
1998
2079
|
"@defaults border-width": {},
|
|
@@ -2293,6 +2374,22 @@ let corePlugins = {
|
|
|
2293
2374
|
}
|
|
2294
2375
|
});
|
|
2295
2376
|
},
|
|
2377
|
+
textWrap: ({ addUtilities })=>{
|
|
2378
|
+
addUtilities({
|
|
2379
|
+
".text-wrap": {
|
|
2380
|
+
"text-wrap": "wrap"
|
|
2381
|
+
},
|
|
2382
|
+
".text-nowrap": {
|
|
2383
|
+
"text-wrap": "nowrap"
|
|
2384
|
+
},
|
|
2385
|
+
".text-balance": {
|
|
2386
|
+
"text-wrap": "balance"
|
|
2387
|
+
},
|
|
2388
|
+
".text-pretty": {
|
|
2389
|
+
"text-wrap": "pretty"
|
|
2390
|
+
}
|
|
2391
|
+
});
|
|
2392
|
+
},
|
|
2296
2393
|
wordBreak: ({ addUtilities })=>{
|
|
2297
2394
|
addUtilities({
|
|
2298
2395
|
".break-normal": {
|
|
@@ -3593,6 +3690,9 @@ let corePlugins = {
|
|
|
3593
3690
|
".mix-blend-luminosity": {
|
|
3594
3691
|
"mix-blend-mode": "luminosity"
|
|
3595
3692
|
},
|
|
3693
|
+
".mix-blend-plus-darker": {
|
|
3694
|
+
"mix-blend-mode": "plus-darker"
|
|
3695
|
+
},
|
|
3596
3696
|
".mix-blend-plus-lighter": {
|
|
3597
3697
|
"mix-blend-mode": "plus-lighter"
|
|
3598
3698
|
}
|
|
@@ -3606,7 +3706,7 @@ let corePlugins = {
|
|
|
3606
3706
|
`var(--tw-shadow)`
|
|
3607
3707
|
].join(", ");
|
|
3608
3708
|
return function({ matchUtilities , addDefaults , theme }) {
|
|
3609
|
-
addDefaults("
|
|
3709
|
+
addDefaults("box-shadow", {
|
|
3610
3710
|
"--tw-ring-offset-shadow": "0 0 #0000",
|
|
3611
3711
|
"--tw-ring-shadow": "0 0 #0000",
|
|
3612
3712
|
"--tw-shadow": "0 0 #0000",
|
|
@@ -3829,7 +3929,7 @@ let corePlugins = {
|
|
|
3829
3929
|
matchUtilities({
|
|
3830
3930
|
blur: (value)=>{
|
|
3831
3931
|
return {
|
|
3832
|
-
"--tw-blur": `blur(${value})`,
|
|
3932
|
+
"--tw-blur": value.trim() === "" ? " " : `blur(${value})`,
|
|
3833
3933
|
"@defaults filter": {},
|
|
3834
3934
|
filter: cssFilterValue
|
|
3835
3935
|
};
|
|
@@ -3969,7 +4069,7 @@ let corePlugins = {
|
|
|
3969
4069
|
matchUtilities({
|
|
3970
4070
|
"backdrop-blur": (value)=>{
|
|
3971
4071
|
return {
|
|
3972
|
-
"--tw-backdrop-blur": `blur(${value})`,
|
|
4072
|
+
"--tw-backdrop-blur": value.trim() === "" ? " " : `blur(${value})`,
|
|
3973
4073
|
"@defaults backdrop-filter": {},
|
|
3974
4074
|
"backdrop-filter": cssBackdropFilterValue
|
|
3975
4075
|
};
|
|
@@ -4158,6 +4258,51 @@ let corePlugins = {
|
|
|
4158
4258
|
]
|
|
4159
4259
|
]
|
|
4160
4260
|
]),
|
|
4261
|
+
contain: ({ addDefaults , addUtilities })=>{
|
|
4262
|
+
let cssContainValue = "var(--tw-contain-size) var(--tw-contain-layout) var(--tw-contain-paint) var(--tw-contain-style)";
|
|
4263
|
+
addDefaults("contain", {
|
|
4264
|
+
"--tw-contain-size": " ",
|
|
4265
|
+
"--tw-contain-layout": " ",
|
|
4266
|
+
"--tw-contain-paint": " ",
|
|
4267
|
+
"--tw-contain-style": " "
|
|
4268
|
+
});
|
|
4269
|
+
addUtilities({
|
|
4270
|
+
".contain-none": {
|
|
4271
|
+
contain: "none"
|
|
4272
|
+
},
|
|
4273
|
+
".contain-content": {
|
|
4274
|
+
contain: "content"
|
|
4275
|
+
},
|
|
4276
|
+
".contain-strict": {
|
|
4277
|
+
contain: "strict"
|
|
4278
|
+
},
|
|
4279
|
+
".contain-size": {
|
|
4280
|
+
"@defaults contain": {},
|
|
4281
|
+
"--tw-contain-size": "size",
|
|
4282
|
+
contain: cssContainValue
|
|
4283
|
+
},
|
|
4284
|
+
".contain-inline-size": {
|
|
4285
|
+
"@defaults contain": {},
|
|
4286
|
+
"--tw-contain-size": "inline-size",
|
|
4287
|
+
contain: cssContainValue
|
|
4288
|
+
},
|
|
4289
|
+
".contain-layout": {
|
|
4290
|
+
"@defaults contain": {},
|
|
4291
|
+
"--tw-contain-layout": "layout",
|
|
4292
|
+
contain: cssContainValue
|
|
4293
|
+
},
|
|
4294
|
+
".contain-paint": {
|
|
4295
|
+
"@defaults contain": {},
|
|
4296
|
+
"--tw-contain-paint": "paint",
|
|
4297
|
+
contain: cssContainValue
|
|
4298
|
+
},
|
|
4299
|
+
".contain-style": {
|
|
4300
|
+
"@defaults contain": {},
|
|
4301
|
+
"--tw-contain-style": "style",
|
|
4302
|
+
contain: cssContainValue
|
|
4303
|
+
}
|
|
4304
|
+
});
|
|
4305
|
+
},
|
|
4161
4306
|
content: (0, _createUtilityPlugin.default)("content", [
|
|
4162
4307
|
[
|
|
4163
4308
|
"content",
|
|
@@ -4169,5 +4314,15 @@ let corePlugins = {
|
|
|
4169
4314
|
]
|
|
4170
4315
|
]
|
|
4171
4316
|
]
|
|
4172
|
-
])
|
|
4317
|
+
]),
|
|
4318
|
+
forcedColorAdjust: ({ addUtilities })=>{
|
|
4319
|
+
addUtilities({
|
|
4320
|
+
".forced-color-adjust-auto": {
|
|
4321
|
+
"forced-color-adjust": "auto"
|
|
4322
|
+
},
|
|
4323
|
+
".forced-color-adjust-none": {
|
|
4324
|
+
"forced-color-adjust": "none"
|
|
4325
|
+
}
|
|
4326
|
+
});
|
|
4327
|
+
}
|
|
4173
4328
|
};
|
package/lib/css/preflight.css
CHANGED
|
@@ -24,16 +24,19 @@
|
|
|
24
24
|
4. Use the user's configured `sans` font-family by default.
|
|
25
25
|
5. Use the user's configured `sans` font-feature-settings by default.
|
|
26
26
|
6. Use the user's configured `sans` font-variation-settings by default.
|
|
27
|
+
7. Disable tap highlights on iOS
|
|
27
28
|
*/
|
|
28
29
|
|
|
29
|
-
html
|
|
30
|
+
html,
|
|
31
|
+
:host {
|
|
30
32
|
line-height: 1.5; /* 1 */
|
|
31
33
|
-webkit-text-size-adjust: 100%; /* 2 */
|
|
32
34
|
-moz-tab-size: 4; /* 3 */
|
|
33
35
|
tab-size: 4; /* 3 */
|
|
34
|
-
font-family: theme('fontFamily.sans', ui-sans-serif, system-ui,
|
|
36
|
+
font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
|
|
35
37
|
font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */
|
|
36
38
|
font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */
|
|
39
|
+
-webkit-tap-highlight-color: transparent; /* 7 */
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
/*
|
|
@@ -99,8 +102,10 @@ strong {
|
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
/*
|
|
102
|
-
1. Use the user's configured `mono` font
|
|
103
|
-
2.
|
|
105
|
+
1. Use the user's configured `mono` font-family by default.
|
|
106
|
+
2. Use the user's configured `mono` font-feature-settings by default.
|
|
107
|
+
3. Use the user's configured `mono` font-variation-settings by default.
|
|
108
|
+
4. Correct the odd `em` font sizing in all browsers.
|
|
104
109
|
*/
|
|
105
110
|
|
|
106
111
|
code,
|
|
@@ -108,7 +113,9 @@ kbd,
|
|
|
108
113
|
samp,
|
|
109
114
|
pre {
|
|
110
115
|
font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */
|
|
111
|
-
font-
|
|
116
|
+
font-feature-settings: theme('fontFamily.mono[1].fontFeatureSettings', normal); /* 2 */
|
|
117
|
+
font-variation-settings: theme('fontFamily.mono[1].fontVariationSettings', normal); /* 3 */
|
|
118
|
+
font-size: 1em; /* 4 */
|
|
112
119
|
}
|
|
113
120
|
|
|
114
121
|
/*
|
|
@@ -163,9 +170,12 @@ optgroup,
|
|
|
163
170
|
select,
|
|
164
171
|
textarea {
|
|
165
172
|
font-family: inherit; /* 1 */
|
|
173
|
+
font-feature-settings: inherit; /* 1 */
|
|
174
|
+
font-variation-settings: inherit; /* 1 */
|
|
166
175
|
font-size: 100%; /* 1 */
|
|
167
176
|
font-weight: inherit; /* 1 */
|
|
168
177
|
line-height: inherit; /* 1 */
|
|
178
|
+
letter-spacing: inherit; /* 1 */
|
|
169
179
|
color: inherit; /* 1 */
|
|
170
180
|
margin: 0; /* 2 */
|
|
171
181
|
padding: 0; /* 3 */
|
|
@@ -186,9 +196,9 @@ select {
|
|
|
186
196
|
*/
|
|
187
197
|
|
|
188
198
|
button,
|
|
189
|
-
[type='button'],
|
|
190
|
-
[type='reset'],
|
|
191
|
-
[type='submit'] {
|
|
199
|
+
input:where([type='button']),
|
|
200
|
+
input:where([type='reset']),
|
|
201
|
+
input:where([type='submit']) {
|
|
192
202
|
-webkit-appearance: button; /* 1 */
|
|
193
203
|
background-color: transparent; /* 2 */
|
|
194
204
|
background-image: none; /* 2 */
|
|
@@ -300,6 +310,13 @@ menu {
|
|
|
300
310
|
padding: 0;
|
|
301
311
|
}
|
|
302
312
|
|
|
313
|
+
/*
|
|
314
|
+
Reset default styling for dialogs.
|
|
315
|
+
*/
|
|
316
|
+
dialog {
|
|
317
|
+
padding: 0;
|
|
318
|
+
}
|
|
319
|
+
|
|
303
320
|
/*
|
|
304
321
|
Prevent resizing textareas horizontally by default.
|
|
305
322
|
*/
|
package/lib/featureFlags.js
CHANGED
|
@@ -29,12 +29,8 @@ function _interop_require_default(obj) {
|
|
|
29
29
|
let defaults = {
|
|
30
30
|
optimizeUniversalDefaults: false,
|
|
31
31
|
generalizedModifiers: true,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
get relativeContentPathsByDefault () {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
32
|
+
disableColorOpacityUtilitiesByDefault: false,
|
|
33
|
+
relativeContentPathsByDefault: false
|
|
38
34
|
};
|
|
39
35
|
let featureFlags = {
|
|
40
36
|
future: [
|