tailwindcss 0.0.0-insiders.f49b054 → 0.0.0-insiders.f5408d6
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/lib/cli/build/plugin.js +11 -16
- package/lib/cli/build/watching.js +1 -1
- package/lib/cli/init/index.js +0 -4
- package/lib/corePluginList.js +5 -1
- package/lib/corePlugins.js +170 -13
- package/lib/css/preflight.css +19 -9
- package/lib/lib/content.js +35 -23
- package/lib/lib/defaultExtractor.js +33 -25
- package/lib/lib/expandApplyAtRules.js +6 -0
- package/lib/lib/expandTailwindAtRules.js +23 -6
- package/lib/lib/generateRules.js +47 -25
- package/lib/lib/load-config.js +14 -3
- package/lib/lib/normalizeTailwindDirectives.js +13 -15
- package/lib/lib/offsets.js +51 -2
- package/lib/lib/resolveDefaultsAtRules.js +3 -1
- package/lib/lib/setupContextUtils.js +76 -37
- package/lib/lib/setupTrackingContext.js +2 -1
- package/lib/oxide/cli/build/plugin.js +44 -23
- package/lib/oxide/cli/init/index.js +0 -4
- package/lib/plugin.js +3 -5
- package/lib/processTailwindFeatures.js +2 -2
- package/lib/util/cloneNodes.js +33 -13
- package/lib/util/color.js +1 -1
- package/lib/util/dataTypes.js +122 -11
- package/lib/util/formatVariantSelector.js +10 -3
- package/lib/util/getAllConfigs.js +1 -3
- package/lib/util/isPlainObject.js +1 -1
- package/lib/util/normalizeConfig.js +8 -30
- package/lib/util/pluginUtils.js +13 -0
- package/lib/util/prefixSelector.js +1 -1
- package/lib/util/pseudoElements.js +13 -30
- package/lib/util/validateConfig.js +1 -7
- package/nesting/index.d.ts +4 -0
- package/package.json +5 -5
- package/peers/index.js +701 -617
- package/resolveConfig.d.ts +22 -3
- package/scripts/generate-types.js +1 -2
- package/src/cli/build/plugin.js +7 -14
- package/src/cli/build/watching.js +1 -1
- package/src/cli/init/index.js +0 -5
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +149 -12
- package/src/css/preflight.css +19 -9
- package/src/featureFlags.js +1 -5
- package/src/lib/content.js +43 -29
- package/src/lib/defaultExtractor.js +30 -17
- package/src/lib/expandApplyAtRules.js +7 -0
- package/src/lib/expandTailwindAtRules.js +23 -6
- package/src/lib/generateRules.js +50 -26
- package/src/lib/load-config.ts +8 -0
- package/src/lib/normalizeTailwindDirectives.js +24 -26
- package/src/lib/offsets.js +61 -2
- package/src/lib/resolveDefaultsAtRules.js +5 -1
- package/src/lib/setupContextUtils.js +77 -38
- package/src/lib/setupTrackingContext.js +1 -3
- package/src/oxide/cli/build/plugin.ts +41 -18
- package/src/oxide/cli/init/index.ts +0 -5
- package/src/plugin.js +3 -5
- package/src/processTailwindFeatures.js +3 -2
- package/src/util/cloneNodes.js +35 -14
- package/src/util/color.js +1 -1
- package/src/util/dataTypes.js +128 -14
- package/src/util/formatVariantSelector.js +11 -3
- package/src/util/getAllConfigs.js +1 -8
- package/src/util/isPlainObject.js +1 -1
- package/src/util/normalizeConfig.js +17 -51
- package/src/util/pluginUtils.js +16 -0
- package/src/util/prefixSelector.js +1 -0
- package/src/util/pseudoElements.js +14 -13
- package/src/util/validateConfig.js +1 -8
- package/stubs/config.full.js +85 -14
- package/types/config.d.ts +17 -9
- package/types/generated/corePluginList.d.ts +1 -1
- package/types/generated/default-theme.d.ts +34 -9
- package/types/index.d.ts +7 -3
- package/index.css +0 -5
- package/lib/lib/handleImportAtRules.js +0 -49
- package/src/lib/handleImportAtRules.js +0 -33
package/lib/cli/build/plugin.js
CHANGED
|
@@ -29,7 +29,6 @@ const _findAtConfigPath = require("../../lib/findAtConfigPath.js");
|
|
|
29
29
|
const _log = /*#__PURE__*/ _interop_require_default(require("../../util/log"));
|
|
30
30
|
const _loadconfig = require("../../lib/load-config");
|
|
31
31
|
const _getModuleDependencies = /*#__PURE__*/ _interop_require_default(require("../../lib/getModuleDependencies"));
|
|
32
|
-
const _validateConfig = require("../../util/validateConfig");
|
|
33
32
|
function _interop_require_default(obj) {
|
|
34
33
|
return obj && obj.__esModule ? obj : {
|
|
35
34
|
default: obj
|
|
@@ -145,15 +144,11 @@ let state = {
|
|
|
145
144
|
}
|
|
146
145
|
};
|
|
147
146
|
// @ts-ignore
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
files: []
|
|
154
|
-
}
|
|
155
|
-
}));
|
|
156
|
-
}
|
|
147
|
+
this.configBag.config = (0, _resolveConfig.default)(this.configBag.config, {
|
|
148
|
+
content: {
|
|
149
|
+
files: []
|
|
150
|
+
}
|
|
151
|
+
});
|
|
157
152
|
// Override content files if `--content` has been passed explicitly
|
|
158
153
|
if ((content === null || content === void 0 ? void 0 : content.length) > 0) {
|
|
159
154
|
this.configBag.config.content.files = content;
|
|
@@ -197,14 +192,14 @@ let state = {
|
|
|
197
192
|
return content;
|
|
198
193
|
},
|
|
199
194
|
getContext ({ createContext , cliConfigPath , root , result , content }) {
|
|
200
|
-
if (this.context) {
|
|
201
|
-
this.context.changedContent = this.changedContent.splice(0);
|
|
202
|
-
return this.context;
|
|
203
|
-
}
|
|
204
195
|
_sharedState.env.DEBUG && console.time("Searching for config");
|
|
205
196
|
var _findAtConfigPath1;
|
|
206
197
|
let configPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : cliConfigPath;
|
|
207
198
|
_sharedState.env.DEBUG && console.timeEnd("Searching for config");
|
|
199
|
+
if (this.context) {
|
|
200
|
+
this.context.changedContent = this.changedContent.splice(0);
|
|
201
|
+
return this.context;
|
|
202
|
+
}
|
|
208
203
|
_sharedState.env.DEBUG && console.time("Loading config");
|
|
209
204
|
let config = this.loadConfig(configPath, content);
|
|
210
205
|
_sharedState.env.DEBUG && console.timeEnd("Loading config");
|
|
@@ -250,9 +245,9 @@ async function createProcessor(args, cliConfigPath) {
|
|
|
250
245
|
let tailwindPlugin = ()=>{
|
|
251
246
|
return {
|
|
252
247
|
postcssPlugin: "tailwindcss",
|
|
253
|
-
Once (root, { result }) {
|
|
248
|
+
async Once (root, { result }) {
|
|
254
249
|
_sharedState.env.DEBUG && console.time("Compiling CSS");
|
|
255
|
-
(0, _processTailwindFeatures.default)(({ createContext })=>{
|
|
250
|
+
await (0, _processTailwindFeatures.default)(({ createContext })=>{
|
|
256
251
|
console.error();
|
|
257
252
|
console.error("Rebuilding...");
|
|
258
253
|
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/init/index.js
CHANGED
|
@@ -37,10 +37,6 @@ function init(args) {
|
|
|
37
37
|
} else {
|
|
38
38
|
let stubContentsFile = _fs.default.readFileSync(args["--full"] ? _path.default.resolve(__dirname, "../../../stubs/config.full.js") : _path.default.resolve(__dirname, "../../../stubs/config.simple.js"), "utf8");
|
|
39
39
|
let stubFile = _fs.default.readFileSync(_path.default.resolve(__dirname, `../../../stubs/tailwind.config.${syntax}`), "utf8");
|
|
40
|
-
// Drop `content` in the oxide engine to promote auto content
|
|
41
|
-
if (false) {
|
|
42
|
-
stubContentsFile = stubContentsFile.replace(/ *content: \[\],\n/, "");
|
|
43
|
-
}
|
|
44
40
|
// Change colors import
|
|
45
41
|
stubContentsFile = stubContentsFile.replace("../colors", "tailwindcss/colors");
|
|
46
42
|
// Replace contents of {ts,js,cjs} file with the stub {simple,full}.
|
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 })=>{
|
|
@@ -415,6 +460,17 @@ let variantPlugins = {
|
|
|
415
460
|
values: (_theme = theme("supports")) !== null && _theme !== void 0 ? _theme : {}
|
|
416
461
|
});
|
|
417
462
|
},
|
|
463
|
+
hasVariants: ({ matchVariant })=>{
|
|
464
|
+
matchVariant("has", (value)=>`&:has(${(0, _dataTypes.normalize)(value)})`, {
|
|
465
|
+
values: {}
|
|
466
|
+
});
|
|
467
|
+
matchVariant("group-has", (value, { modifier })=>modifier ? `:merge(.group\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) &` : `:merge(.group):has(${(0, _dataTypes.normalize)(value)}) &`, {
|
|
468
|
+
values: {}
|
|
469
|
+
});
|
|
470
|
+
matchVariant("peer-has", (value, { modifier })=>modifier ? `:merge(.peer\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) ~ &` : `:merge(.peer):has(${(0, _dataTypes.normalize)(value)}) ~ &`, {
|
|
471
|
+
values: {}
|
|
472
|
+
});
|
|
473
|
+
},
|
|
418
474
|
ariaVariants: ({ matchVariant , theme })=>{
|
|
419
475
|
var _theme;
|
|
420
476
|
matchVariant("aria", (value)=>`&[aria-${(0, _dataTypes.normalize)(value)}]`, {
|
|
@@ -450,6 +506,9 @@ let variantPlugins = {
|
|
|
450
506
|
prefersContrastVariants: ({ addVariant })=>{
|
|
451
507
|
addVariant("contrast-more", "@media (prefers-contrast: more)");
|
|
452
508
|
addVariant("contrast-less", "@media (prefers-contrast: less)");
|
|
509
|
+
},
|
|
510
|
+
forcedColorsVariants: ({ addVariant })=>{
|
|
511
|
+
addVariant("forced-colors", "@media (forced-colors: active)");
|
|
453
512
|
}
|
|
454
513
|
};
|
|
455
514
|
let cssTransformValue = [
|
|
@@ -770,6 +829,12 @@ let corePlugins = {
|
|
|
770
829
|
]),
|
|
771
830
|
float: ({ addUtilities })=>{
|
|
772
831
|
addUtilities({
|
|
832
|
+
".float-start": {
|
|
833
|
+
float: "inline-start"
|
|
834
|
+
},
|
|
835
|
+
".float-end": {
|
|
836
|
+
float: "inline-end"
|
|
837
|
+
},
|
|
773
838
|
".float-right": {
|
|
774
839
|
float: "right"
|
|
775
840
|
},
|
|
@@ -783,6 +848,12 @@ let corePlugins = {
|
|
|
783
848
|
},
|
|
784
849
|
clear: ({ addUtilities })=>{
|
|
785
850
|
addUtilities({
|
|
851
|
+
".clear-start": {
|
|
852
|
+
clear: "inline-start"
|
|
853
|
+
},
|
|
854
|
+
".clear-end": {
|
|
855
|
+
clear: "inline-end"
|
|
856
|
+
},
|
|
786
857
|
".clear-left": {
|
|
787
858
|
clear: "left"
|
|
788
859
|
},
|
|
@@ -966,6 +1037,15 @@ let corePlugins = {
|
|
|
966
1037
|
]
|
|
967
1038
|
]
|
|
968
1039
|
]),
|
|
1040
|
+
size: (0, _createUtilityPlugin.default)("size", [
|
|
1041
|
+
[
|
|
1042
|
+
"size",
|
|
1043
|
+
[
|
|
1044
|
+
"width",
|
|
1045
|
+
"height"
|
|
1046
|
+
]
|
|
1047
|
+
]
|
|
1048
|
+
]),
|
|
969
1049
|
height: (0, _createUtilityPlugin.default)("height", [
|
|
970
1050
|
[
|
|
971
1051
|
"h",
|
|
@@ -1283,7 +1363,7 @@ let corePlugins = {
|
|
|
1283
1363
|
});
|
|
1284
1364
|
},
|
|
1285
1365
|
animation: ({ matchUtilities , theme , config })=>{
|
|
1286
|
-
let prefixName = (name)
|
|
1366
|
+
let prefixName = (name)=>(0, _escapeClassName.default)(config("prefix") + name);
|
|
1287
1367
|
var _theme;
|
|
1288
1368
|
let keyframes = Object.fromEntries(Object.entries((_theme = theme("keyframes")) !== null && _theme !== void 0 ? _theme : {}).map(([key, value])=>{
|
|
1289
1369
|
return [
|
|
@@ -1609,6 +1689,9 @@ let corePlugins = {
|
|
|
1609
1689
|
addUtilities({
|
|
1610
1690
|
".appearance-none": {
|
|
1611
1691
|
appearance: "none"
|
|
1692
|
+
},
|
|
1693
|
+
".appearance-auto": {
|
|
1694
|
+
appearance: "auto"
|
|
1612
1695
|
}
|
|
1613
1696
|
});
|
|
1614
1697
|
},
|
|
@@ -2293,6 +2376,22 @@ let corePlugins = {
|
|
|
2293
2376
|
}
|
|
2294
2377
|
});
|
|
2295
2378
|
},
|
|
2379
|
+
textWrap: ({ addUtilities })=>{
|
|
2380
|
+
addUtilities({
|
|
2381
|
+
".text-wrap": {
|
|
2382
|
+
"text-wrap": "wrap"
|
|
2383
|
+
},
|
|
2384
|
+
".text-nowrap": {
|
|
2385
|
+
"text-wrap": "nowrap"
|
|
2386
|
+
},
|
|
2387
|
+
".text-balance": {
|
|
2388
|
+
"text-wrap": "balance"
|
|
2389
|
+
},
|
|
2390
|
+
".text-pretty": {
|
|
2391
|
+
"text-wrap": "pretty"
|
|
2392
|
+
}
|
|
2393
|
+
});
|
|
2394
|
+
},
|
|
2296
2395
|
wordBreak: ({ addUtilities })=>{
|
|
2297
2396
|
addUtilities({
|
|
2298
2397
|
".break-normal": {
|
|
@@ -3593,6 +3692,9 @@ let corePlugins = {
|
|
|
3593
3692
|
".mix-blend-luminosity": {
|
|
3594
3693
|
"mix-blend-mode": "luminosity"
|
|
3595
3694
|
},
|
|
3695
|
+
".mix-blend-plus-darker": {
|
|
3696
|
+
"mix-blend-mode": "plus-darker"
|
|
3697
|
+
},
|
|
3596
3698
|
".mix-blend-plus-lighter": {
|
|
3597
3699
|
"mix-blend-mode": "plus-lighter"
|
|
3598
3700
|
}
|
|
@@ -4158,6 +4260,51 @@ let corePlugins = {
|
|
|
4158
4260
|
]
|
|
4159
4261
|
]
|
|
4160
4262
|
]),
|
|
4263
|
+
contain: ({ addDefaults , addUtilities })=>{
|
|
4264
|
+
let cssContainValue = "var(--tw-contain-size) var(--tw-contain-layout) var(--tw-contain-paint) var(--tw-contain-style)";
|
|
4265
|
+
addDefaults("contain", {
|
|
4266
|
+
"--tw-contain-size": " ",
|
|
4267
|
+
"--tw-contain-layout": " ",
|
|
4268
|
+
"--tw-contain-paint": " ",
|
|
4269
|
+
"--tw-contain-style": " "
|
|
4270
|
+
});
|
|
4271
|
+
addUtilities({
|
|
4272
|
+
".contain-none": {
|
|
4273
|
+
contain: "none"
|
|
4274
|
+
},
|
|
4275
|
+
".contain-content": {
|
|
4276
|
+
contain: "content"
|
|
4277
|
+
},
|
|
4278
|
+
".contain-strict": {
|
|
4279
|
+
contain: "strict"
|
|
4280
|
+
},
|
|
4281
|
+
".contain-size": {
|
|
4282
|
+
"@defaults contain": {},
|
|
4283
|
+
"--tw-contain-size": "size",
|
|
4284
|
+
contain: cssContainValue
|
|
4285
|
+
},
|
|
4286
|
+
".contain-inline-size": {
|
|
4287
|
+
"@defaults contain": {},
|
|
4288
|
+
"--tw-contain-size": "inline-size",
|
|
4289
|
+
contain: cssContainValue
|
|
4290
|
+
},
|
|
4291
|
+
".contain-layout": {
|
|
4292
|
+
"@defaults contain": {},
|
|
4293
|
+
"--tw-contain-layout": "layout",
|
|
4294
|
+
contain: cssContainValue
|
|
4295
|
+
},
|
|
4296
|
+
".contain-paint": {
|
|
4297
|
+
"@defaults contain": {},
|
|
4298
|
+
"--tw-contain-paint": "paint",
|
|
4299
|
+
contain: cssContainValue
|
|
4300
|
+
},
|
|
4301
|
+
".contain-style": {
|
|
4302
|
+
"@defaults contain": {},
|
|
4303
|
+
"--tw-contain-style": "style",
|
|
4304
|
+
contain: cssContainValue
|
|
4305
|
+
}
|
|
4306
|
+
});
|
|
4307
|
+
},
|
|
4161
4308
|
content: (0, _createUtilityPlugin.default)("content", [
|
|
4162
4309
|
[
|
|
4163
4310
|
"content",
|
|
@@ -4169,5 +4316,15 @@ let corePlugins = {
|
|
|
4169
4316
|
]
|
|
4170
4317
|
]
|
|
4171
4318
|
]
|
|
4172
|
-
])
|
|
4319
|
+
]),
|
|
4320
|
+
forcedColorAdjust: ({ addUtilities })=>{
|
|
4321
|
+
addUtilities({
|
|
4322
|
+
".forced-color-adjust-auto": {
|
|
4323
|
+
"forced-color-adjust": "auto"
|
|
4324
|
+
},
|
|
4325
|
+
".forced-color-adjust-none": {
|
|
4326
|
+
"forced-color-adjust": "none"
|
|
4327
|
+
}
|
|
4328
|
+
});
|
|
4329
|
+
}
|
|
4173
4330
|
};
|
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
|
/*
|
|
@@ -188,9 +195,9 @@ select {
|
|
|
188
195
|
*/
|
|
189
196
|
|
|
190
197
|
button,
|
|
191
|
-
[type='button'],
|
|
192
|
-
[type='reset'],
|
|
193
|
-
[type='submit'] {
|
|
198
|
+
input:where([type='button']),
|
|
199
|
+
input:where([type='reset']),
|
|
200
|
+
input:where([type='submit']) {
|
|
194
201
|
-webkit-appearance: button; /* 1 */
|
|
195
202
|
background-color: transparent; /* 2 */
|
|
196
203
|
background-image: none; /* 2 */
|
|
@@ -266,7 +273,7 @@ summary {
|
|
|
266
273
|
}
|
|
267
274
|
|
|
268
275
|
/*
|
|
269
|
-
Removes the default spacing for appropriate elements.
|
|
276
|
+
Removes the default spacing and border for appropriate elements.
|
|
270
277
|
*/
|
|
271
278
|
|
|
272
279
|
blockquote,
|
|
@@ -302,6 +309,9 @@ menu {
|
|
|
302
309
|
padding: 0;
|
|
303
310
|
}
|
|
304
311
|
|
|
312
|
+
/*
|
|
313
|
+
Reset default styling for dialogs.
|
|
314
|
+
*/
|
|
305
315
|
dialog {
|
|
306
316
|
padding: 0;
|
|
307
317
|
}
|
package/lib/lib/content.js
CHANGED
|
@@ -21,7 +21,6 @@ const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
|
21
21
|
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
22
22
|
const _isglob = /*#__PURE__*/ _interop_require_default(require("is-glob"));
|
|
23
23
|
const _fastglob = /*#__PURE__*/ _interop_require_default(require("fast-glob"));
|
|
24
|
-
const _normalizepath = /*#__PURE__*/ _interop_require_default(require("normalize-path"));
|
|
25
24
|
const _parseGlob = require("../util/parseGlob");
|
|
26
25
|
const _sharedState = require("./sharedState");
|
|
27
26
|
function _interop_require_default(obj) {
|
|
@@ -29,32 +28,42 @@ function _interop_require_default(obj) {
|
|
|
29
28
|
default: obj
|
|
30
29
|
};
|
|
31
30
|
}
|
|
32
|
-
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
31
|
+
/*!
|
|
32
|
+
* Modified version of normalize-path, original license below
|
|
33
|
+
*
|
|
34
|
+
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
35
|
+
*
|
|
36
|
+
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
37
|
+
* Released under the MIT License.
|
|
38
|
+
*/ function normalizePath(path) {
|
|
39
|
+
if (typeof path !== "string") {
|
|
40
|
+
throw new TypeError("expected path to be a string");
|
|
41
|
+
}
|
|
42
|
+
if (path === "\\" || path === "/") return "/";
|
|
43
|
+
var len = path.length;
|
|
44
|
+
if (len <= 1) return path;
|
|
45
|
+
// ensure that win32 namespaces has two leading slashes, so that the path is
|
|
46
|
+
// handled properly by the win32 version of path.parse() after being normalized
|
|
47
|
+
// https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
|
|
48
|
+
var prefix = "";
|
|
49
|
+
if (len > 4 && path[3] === "\\") {
|
|
50
|
+
var ch = path[2];
|
|
51
|
+
if ((ch === "?" || ch === ".") && path.slice(0, 2) === "\\\\") {
|
|
52
|
+
path = path.slice(2);
|
|
53
|
+
prefix = "//";
|
|
44
54
|
}
|
|
45
|
-
_sharedState.env.DEBUG && console.timeEnd("Calculating resolve content paths");
|
|
46
55
|
}
|
|
47
|
-
|
|
56
|
+
// Modified part: instead of purely splitting on `\\` and `/`, we split on
|
|
57
|
+
// `/` and `\\` that is _not_ followed by any of the following characters: ()[]
|
|
58
|
+
// This is to ensure that we keep the escaping of brackets and parentheses
|
|
59
|
+
let segs = path.split(/[/\\]+(?![\(\)\[\]])/);
|
|
60
|
+
return prefix + segs.join("/");
|
|
48
61
|
}
|
|
49
62
|
function parseCandidateFiles(context, tailwindConfig) {
|
|
50
|
-
let files =
|
|
51
|
-
skip: [
|
|
52
|
-
context.userConfigPath
|
|
53
|
-
]
|
|
54
|
-
});
|
|
63
|
+
let files = tailwindConfig.content.files;
|
|
55
64
|
// Normalize the file globs
|
|
56
65
|
files = files.filter((filePath)=>typeof filePath === "string");
|
|
57
|
-
files = files.map(
|
|
66
|
+
files = files.map(normalizePath);
|
|
58
67
|
// Split into included and excluded globs
|
|
59
68
|
let tasks = _fastglob.default.generateTasks(files);
|
|
60
69
|
/** @type {ContentPath[]} */ let included = [];
|
|
@@ -81,6 +90,9 @@ function parseCandidateFiles(context, tailwindConfig) {
|
|
|
81
90
|
* @param {boolean} ignore
|
|
82
91
|
* @returns {ContentPath}
|
|
83
92
|
*/ function parseFilePath(filePath, ignore) {
|
|
93
|
+
// Escape special characters in the file path such as: ()[]
|
|
94
|
+
// But only if the special character isn't already escaped
|
|
95
|
+
filePath = filePath.replace(/(?<!\\)([\[\]\(\)])/g, "\\$1");
|
|
84
96
|
let contentPath = {
|
|
85
97
|
original: filePath,
|
|
86
98
|
base: filePath,
|
|
@@ -102,7 +114,7 @@ function parseCandidateFiles(context, tailwindConfig) {
|
|
|
102
114
|
// Afaik, this technically shouldn't be needed but there's probably
|
|
103
115
|
// some internal, direct path matching with a normalized path in
|
|
104
116
|
// a package which can't handle mixed directory separators
|
|
105
|
-
let base = (
|
|
117
|
+
let base = normalizePath(contentPath.base);
|
|
106
118
|
// If the user's file path contains any special characters (like parens) for instance fast-glob
|
|
107
119
|
// is like "OOOH SHINY" and treats them as such. So we have to escape the base path to fix this
|
|
108
120
|
base = _fastglob.default.escapePath(base);
|
|
@@ -156,7 +168,7 @@ function parseCandidateFiles(context, tailwindConfig) {
|
|
|
156
168
|
return paths;
|
|
157
169
|
}
|
|
158
170
|
function resolvedChangedContent(context, candidateFiles, fileModifiedMap) {
|
|
159
|
-
let changedContent = context.tailwindConfig.content.files
|
|
171
|
+
let changedContent = context.tailwindConfig.content.files.filter((item)=>typeof item.raw === "string").map(({ raw , extension ="html" })=>({
|
|
160
172
|
content: raw,
|
|
161
173
|
extension
|
|
162
174
|
}));
|