tailwindcss 0.0.0-insiders.0c4af0f → 0.0.0-insiders.0ddbb36
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/CHANGELOG.md +43 -3
- package/colors.js +2 -1
- package/defaultConfig.js +2 -1
- package/defaultTheme.js +2 -1
- package/lib/cli.js +58 -58
- package/lib/corePluginList.js +3 -0
- package/lib/corePlugins.js +80 -25
- package/lib/css/preflight.css +2 -1
- package/lib/featureFlags.js +3 -1
- package/lib/lib/expandApplyAtRules.js +23 -6
- package/lib/lib/generateRules.js +19 -1
- package/lib/lib/resolveDefaultsAtRules.js +23 -9
- package/lib/util/dataTypes.js +14 -3
- package/lib/util/formatVariantSelector.js +10 -1
- package/lib/util/log.js +4 -0
- package/lib/util/normalizeConfig.js +34 -5
- package/lib/util/normalizeScreens.js +5 -2
- package/lib/util/resolveConfig.js +8 -8
- package/package.json +12 -12
- package/peers/index.js +734 -642
- package/plugin.js +2 -1
- package/resolveConfig.js +2 -1
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +50 -21
- package/src/css/preflight.css +2 -1
- package/src/featureFlags.js +5 -1
- package/src/lib/expandApplyAtRules.js +29 -2
- package/src/lib/generateRules.js +24 -1
- package/src/lib/resolveDefaultsAtRules.js +28 -7
- package/src/util/dataTypes.js +11 -6
- package/src/util/formatVariantSelector.js +11 -1
- package/src/util/log.js +4 -0
- package/src/util/normalizeConfig.js +14 -1
- package/src/util/normalizeScreens.js +6 -3
- package/stubs/defaultConfig.stub.js +17 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Warn about invalid globs in `content` ([#6449](https://github.com/tailwindlabs/tailwindcss/pull/6449))
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Don't output unparsable values ([#6469](https://github.com/tailwindlabs/tailwindcss/pull/6469))
|
|
17
|
+
- Fix text decoration utilities from overriding the new text decoration color/style/thickness utilities when used with a modifier ([#6378](https://github.com/tailwindlabs/tailwindcss/pull/6378))
|
|
18
|
+
|
|
19
|
+
## [3.0.2] - 2021-12-13
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Temporarily disable optimize universal defaults, fixes issue with transforms/filters/rings not being `@apply`-able in CSS modules/Svelte components/Vue components ([#6461](https://github.com/tailwindlabs/tailwindcss/pull/6461))
|
|
24
|
+
|
|
25
|
+
## [3.0.1] - 2021-12-10
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- Ensure complex variants with multiple classes work ([#6311](https://github.com/tailwindlabs/tailwindcss/pull/6311))
|
|
30
|
+
- Re-add `default` interop to public available functions ([#6348](https://github.com/tailwindlabs/tailwindcss/pull/6348))
|
|
31
|
+
- Detect circular dependencies when using `@apply` ([#6365](https://github.com/tailwindlabs/tailwindcss/pull/6365))
|
|
32
|
+
- Fix defaults optimization when vendor prefixes are involved ([#6369](https://github.com/tailwindlabs/tailwindcss/pull/6369))
|
|
33
|
+
|
|
34
|
+
## [3.0.0] - 2021-12-09
|
|
35
|
+
|
|
10
36
|
### Fixed
|
|
11
37
|
|
|
12
38
|
- Enforce the order of some variants (like `before` and `after`) ([#6018](https://github.com/tailwindlabs/tailwindcss/pull/6018))
|
|
@@ -14,9 +40,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
40
|
### Added
|
|
15
41
|
|
|
16
42
|
- Add `placeholder` variant ([#6106](https://github.com/tailwindlabs/tailwindcss/pull/6106))
|
|
17
|
-
- Add
|
|
18
|
-
- Add combinable `touch-action` support ([#6115](https://github.com/tailwindlabs/tailwindcss/pull/6115))
|
|
43
|
+
- Add composable `touch-action` utilities ([#6115](https://github.com/tailwindlabs/tailwindcss/pull/6115))
|
|
19
44
|
- Add support for "arbitrary properties" ([#6161](https://github.com/tailwindlabs/tailwindcss/pull/6161))
|
|
45
|
+
- Add `portrait` and `landscape` variants ([#6046](https://github.com/tailwindlabs/tailwindcss/pull/6046))
|
|
46
|
+
- Add `text-decoration-style`, `text-decoration-thickness`, and `text-underline-offset` utilities ([#6004](https://github.com/tailwindlabs/tailwindcss/pull/6004))
|
|
47
|
+
- Add `menu` reset to preflight ([#6213](https://github.com/tailwindlabs/tailwindcss/pull/6213))
|
|
48
|
+
- Allow `0` as a valid `length` value ([#6233](https://github.com/tailwindlabs/tailwindcss/pull/6233), [#6259](https://github.com/tailwindlabs/tailwindcss/pull/6259))
|
|
49
|
+
- Add CSS functions to data types ([#6258](https://github.com/tailwindlabs/tailwindcss/pull/6258))
|
|
50
|
+
- Support negative values for `scale-*` utilities ([c48e629](https://github.com/tailwindlabs/tailwindcss/commit/c48e629955585ad18dadba9f470fda59cc448ab7))
|
|
51
|
+
- Improve `length` data type, by validating each value individually ([#6283](https://github.com/tailwindlabs/tailwindcss/pull/6283))
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
- Deprecate `decoration-slice` and `decoration-break` in favor `box-decoration-slice` and `box-decoration-break` _(non-breaking)_ ([#6004](https://github.com/tailwindlabs/tailwindcss/pull/6004))
|
|
20
56
|
|
|
21
57
|
## [3.0.0-alpha.2] - 2021-11-08
|
|
22
58
|
|
|
@@ -37,6 +73,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
37
73
|
- Add `text-decoration-color` utilities ([#5760](https://github.com/tailwindlabs/tailwindcss/pull/5760))
|
|
38
74
|
- Add new declarative `addVariant` API ([#5809](https://github.com/tailwindlabs/tailwindcss/pull/5809))
|
|
39
75
|
- Add first-class `print` variant for targeting printed media ([#5885](https://github.com/tailwindlabs/tailwindcss/pull/5885))
|
|
76
|
+
- Add `outline-style`, `outline-color`, `outline-width` and `outline-offset` utilities ([#5887](https://github.com/tailwindlabs/tailwindcss/pull/5887))
|
|
40
77
|
- Add full color palette for `fill-*` and `stroke-*` utilities (#5933[](https://github.com/tailwindlabs/tailwindcss/pull/5933))
|
|
41
78
|
- Add composable API for colored box shadows ([#5979](https://github.com/tailwindlabs/tailwindcss/pull/5979))
|
|
42
79
|
|
|
@@ -1666,7 +1703,10 @@ No release notes
|
|
|
1666
1703
|
|
|
1667
1704
|
- Everything!
|
|
1668
1705
|
|
|
1669
|
-
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.
|
|
1706
|
+
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.2...HEAD
|
|
1707
|
+
[3.0.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.1...v3.0.2
|
|
1708
|
+
[3.0.1]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0...v3.0.1
|
|
1709
|
+
[3.0.0]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.2...v3.0.0
|
|
1670
1710
|
[3.0.0-alpha.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.1...v3.0.0-alpha.2
|
|
1671
1711
|
[3.0.0-alpha.1]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.19...v3.0.0-alpha.1
|
|
1672
1712
|
[2.2.19]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.18...v2.2.19
|
package/colors.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
let colors = require('./lib/public/colors')
|
|
2
|
+
module.exports = (colors.__esModule ? colors : { default: colors }).default
|
package/defaultConfig.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
let defaultConfig = require('./lib/public/default-config')
|
|
2
|
+
module.exports = (defaultConfig.__esModule ? defaultConfig : { default: defaultConfig }).default
|
package/defaultTheme.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
let defaultTheme = require('./lib/public/default-theme')
|
|
2
|
+
module.exports = (defaultTheme.__esModule ? defaultTheme : { default: defaultTheme }).default
|
package/lib/cli.js
CHANGED
|
@@ -40,7 +40,7 @@ function formatNodes(root) {
|
|
|
40
40
|
root.first.raws.before = '';
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
function help({ message , usage , commands , options }) {
|
|
43
|
+
function help({ message , usage , commands: commands1 , options }) {
|
|
44
44
|
let indent = 2;
|
|
45
45
|
// Render header
|
|
46
46
|
console.log();
|
|
@@ -61,11 +61,11 @@ function help({ message , usage , commands , options }) {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
// Render commands
|
|
64
|
-
if (
|
|
64
|
+
if (commands1 && commands1.length > 0) {
|
|
65
65
|
console.log();
|
|
66
66
|
console.log('Commands:');
|
|
67
|
-
for (let
|
|
68
|
-
console.log(' '.repeat(indent),
|
|
67
|
+
for (let command1 of commands1){
|
|
68
|
+
console.log(' '.repeat(indent), command1);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
// Render options
|
|
@@ -86,12 +86,12 @@ function help({ message , usage , commands , options }) {
|
|
|
86
86
|
}
|
|
87
87
|
console.log();
|
|
88
88
|
console.log('Options:');
|
|
89
|
-
for (let { flags , description , deprecated } of Object.values(groupedOptions)){
|
|
89
|
+
for (let { flags: flags1 , description , deprecated } of Object.values(groupedOptions)){
|
|
90
90
|
if (deprecated) continue;
|
|
91
|
-
if (
|
|
92
|
-
console.log(' '.repeat(indent + 4 /* 4 = "-i, ".length */ ),
|
|
91
|
+
if (flags1.length === 1) {
|
|
92
|
+
console.log(' '.repeat(indent + 4 /* 4 = "-i, ".length */ ), flags1.slice().reverse().join(', ').padEnd(20, ' '), description);
|
|
93
93
|
} else {
|
|
94
|
-
console.log(' '.repeat(indent),
|
|
94
|
+
console.log(' '.repeat(indent), flags1.slice().reverse().join(', ').padEnd(24, ' '), description);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -110,7 +110,7 @@ function oneOf(...options) {
|
|
|
110
110
|
manualParsing: true
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
let
|
|
113
|
+
let commands = {
|
|
114
114
|
init: {
|
|
115
115
|
run: init,
|
|
116
116
|
args: {
|
|
@@ -187,31 +187,31 @@ if (process.stdout.isTTY /* Detect redirecting output to a file */ && (process.
|
|
|
187
187
|
'tailwindcss [--input input.css] [--output output.css] [--watch] [options...]',
|
|
188
188
|
'tailwindcss init [--full] [--postcss] [options...]',
|
|
189
189
|
],
|
|
190
|
-
commands: Object.keys(
|
|
191
|
-
).map((
|
|
190
|
+
commands: Object.keys(commands).filter((command2)=>command2 !== 'build'
|
|
191
|
+
).map((command3)=>`${command3} [options]`
|
|
192
192
|
),
|
|
193
193
|
options: {
|
|
194
|
-
...
|
|
194
|
+
...commands.build.args,
|
|
195
195
|
...sharedFlags
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
198
|
process.exit(0);
|
|
199
199
|
}
|
|
200
|
-
let
|
|
200
|
+
let command = ((arg = '')=>arg.startsWith('-') ? undefined : arg
|
|
201
201
|
)(process.argv[2]) || 'build';
|
|
202
|
-
if (
|
|
203
|
-
if (_fs.default.existsSync(_path.default.resolve(
|
|
202
|
+
if (commands[command] === undefined) {
|
|
203
|
+
if (_fs.default.existsSync(_path.default.resolve(command))) {
|
|
204
204
|
// TODO: Deprecate this in future versions
|
|
205
205
|
// Check if non-existing command, might be a file.
|
|
206
|
-
|
|
206
|
+
command = 'build';
|
|
207
207
|
} else {
|
|
208
208
|
help({
|
|
209
|
-
message: `Invalid command: ${
|
|
209
|
+
message: `Invalid command: ${command}`,
|
|
210
210
|
usage: [
|
|
211
211
|
'tailwindcss <command> [options]'
|
|
212
212
|
],
|
|
213
|
-
commands: Object.keys(
|
|
214
|
-
).map((
|
|
213
|
+
commands: Object.keys(commands).filter((command4)=>command4 !== 'build'
|
|
214
|
+
).map((command5)=>`${command5} [options]`
|
|
215
215
|
),
|
|
216
216
|
options: sharedFlags
|
|
217
217
|
});
|
|
@@ -219,11 +219,11 @@ if (commands1[command1] === undefined) {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
// Execute command
|
|
222
|
-
let { args:
|
|
223
|
-
let
|
|
222
|
+
let { args: flags , run } = commands[command];
|
|
223
|
+
let args = (()=>{
|
|
224
224
|
try {
|
|
225
225
|
let result = (0, _arg).default(Object.fromEntries(Object.entries({
|
|
226
|
-
...
|
|
226
|
+
...flags,
|
|
227
227
|
...sharedFlags
|
|
228
228
|
}).filter(([_key, value])=>{
|
|
229
229
|
var ref;
|
|
@@ -240,23 +240,23 @@ let args1 = (()=>{
|
|
|
240
240
|
let flag = result['_'][i];
|
|
241
241
|
if (!flag.startsWith('-')) continue;
|
|
242
242
|
let flagName = flag;
|
|
243
|
-
let handler =
|
|
243
|
+
let handler = flags[flag];
|
|
244
244
|
// Resolve flagName & handler
|
|
245
245
|
while(typeof handler === 'string'){
|
|
246
246
|
flagName = handler;
|
|
247
|
-
handler =
|
|
247
|
+
handler = flags[handler];
|
|
248
248
|
}
|
|
249
249
|
if (!handler) continue;
|
|
250
|
-
let
|
|
250
|
+
let args1 = [];
|
|
251
251
|
let offset = i + 1;
|
|
252
252
|
// Parse args for current flag
|
|
253
253
|
while(result['_'][offset] && !result['_'][offset].startsWith('-')){
|
|
254
|
-
|
|
254
|
+
args1.push(result['_'][offset++]);
|
|
255
255
|
}
|
|
256
256
|
// Cleanup manually parsed flags + args
|
|
257
|
-
result['_'].splice(i, 1 +
|
|
257
|
+
result['_'].splice(i, 1 + args1.length);
|
|
258
258
|
// Set the resolved value in the `result` object
|
|
259
|
-
result[flagName] = handler.type(
|
|
259
|
+
result[flagName] = handler.type(args1.length === 0 ? undefined : args1.length === 1 ? args1[0] : args1, flagName);
|
|
260
260
|
}
|
|
261
261
|
// Ensure that the `command` is always the first argument in the `args`.
|
|
262
262
|
// This is important so that we don't have to check if a default command
|
|
@@ -264,8 +264,8 @@ let args1 = (()=>{
|
|
|
264
264
|
//
|
|
265
265
|
// E.g.: tailwindcss input.css -> _: ['build', 'input.css']
|
|
266
266
|
// E.g.: tailwindcss build input.css -> _: ['build', 'input.css']
|
|
267
|
-
if (result['_'][0] !==
|
|
268
|
-
result['_'].unshift(
|
|
267
|
+
if (result['_'][0] !== command) {
|
|
268
|
+
result['_'].unshift(command);
|
|
269
269
|
}
|
|
270
270
|
return result;
|
|
271
271
|
} catch (err) {
|
|
@@ -282,14 +282,14 @@ let args1 = (()=>{
|
|
|
282
282
|
throw err;
|
|
283
283
|
}
|
|
284
284
|
})();
|
|
285
|
-
if (
|
|
285
|
+
if (args['--help']) {
|
|
286
286
|
help({
|
|
287
287
|
options: {
|
|
288
|
-
...
|
|
288
|
+
...flags,
|
|
289
289
|
...sharedFlags
|
|
290
290
|
},
|
|
291
291
|
usage: [
|
|
292
|
-
`tailwindcss ${
|
|
292
|
+
`tailwindcss ${command} [options]`
|
|
293
293
|
]
|
|
294
294
|
});
|
|
295
295
|
process.exit(0);
|
|
@@ -299,17 +299,17 @@ run();
|
|
|
299
299
|
function init() {
|
|
300
300
|
let messages = [];
|
|
301
301
|
var ref;
|
|
302
|
-
let tailwindConfigLocation = _path.default.resolve((ref =
|
|
302
|
+
let tailwindConfigLocation = _path.default.resolve((ref = args['_'][1]) !== null && ref !== void 0 ? ref : './tailwind.config.js');
|
|
303
303
|
if (_fs.default.existsSync(tailwindConfigLocation)) {
|
|
304
304
|
messages.push(`${_path.default.basename(tailwindConfigLocation)} already exists.`);
|
|
305
305
|
} else {
|
|
306
|
-
let stubFile = _fs.default.readFileSync(
|
|
306
|
+
let stubFile = _fs.default.readFileSync(args['--full'] ? _path.default.resolve(__dirname, '../stubs/defaultConfig.stub.js') : _path.default.resolve(__dirname, '../stubs/simpleConfig.stub.js'), 'utf8');
|
|
307
307
|
// Change colors import
|
|
308
308
|
stubFile = stubFile.replace('../colors', 'tailwindcss/colors');
|
|
309
309
|
_fs.default.writeFileSync(tailwindConfigLocation, stubFile, 'utf8');
|
|
310
310
|
messages.push(`Created Tailwind CSS config file: ${_path.default.basename(tailwindConfigLocation)}`);
|
|
311
311
|
}
|
|
312
|
-
if (
|
|
312
|
+
if (args['--postcss']) {
|
|
313
313
|
let postcssConfigLocation = _path.default.resolve('./postcss.config.js');
|
|
314
314
|
if (_fs.default.existsSync(postcssConfigLocation)) {
|
|
315
315
|
messages.push(`${_path.default.basename(postcssConfigLocation)} already exists.`);
|
|
@@ -327,27 +327,27 @@ function init() {
|
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
async function build() {
|
|
330
|
-
let input =
|
|
331
|
-
let output =
|
|
332
|
-
let shouldWatch =
|
|
333
|
-
let includePostCss =
|
|
330
|
+
let input = args['--input'];
|
|
331
|
+
let output = args['--output'];
|
|
332
|
+
let shouldWatch = args['--watch'];
|
|
333
|
+
let includePostCss = args['--postcss'];
|
|
334
334
|
// TODO: Deprecate this in future versions
|
|
335
|
-
if (!input &&
|
|
335
|
+
if (!input && args['_'][1]) {
|
|
336
336
|
console.error('[deprecation] Running tailwindcss without -i, please provide an input file.');
|
|
337
|
-
input =
|
|
337
|
+
input = args['--input'] = args['_'][1];
|
|
338
338
|
}
|
|
339
339
|
if (input && !_fs.default.existsSync(input = _path.default.resolve(input))) {
|
|
340
|
-
console.error(`Specified input file ${
|
|
340
|
+
console.error(`Specified input file ${args['--input']} does not exist.`);
|
|
341
341
|
process.exit(9);
|
|
342
342
|
}
|
|
343
|
-
if (
|
|
344
|
-
console.error(`Specified config file ${
|
|
343
|
+
if (args['--config'] && !_fs.default.existsSync(args['--config'] = _path.default.resolve(args['--config']))) {
|
|
344
|
+
console.error(`Specified config file ${args['--config']} does not exist.`);
|
|
345
345
|
process.exit(9);
|
|
346
346
|
}
|
|
347
|
-
let configPath =
|
|
347
|
+
let configPath = args['--config'] ? args['--config'] : ((defaultPath)=>_fs.default.existsSync(defaultPath) ? defaultPath : null
|
|
348
348
|
)(_path.default.resolve('./tailwind.config.js'));
|
|
349
349
|
async function loadPostCssPlugins() {
|
|
350
|
-
let customPostCssPath = typeof
|
|
350
|
+
let customPostCssPath = typeof args['--postcss'] === 'string' ? args['--postcss'] : undefined;
|
|
351
351
|
let { plugins: configPlugins } = customPostCssPath ? await (async ()=>{
|
|
352
352
|
let file = _path.default.resolve(customPostCssPath);
|
|
353
353
|
// Implementation, see: https://unpkg.com/browse/postcss-load-config@3.0.1/src/index.js
|
|
@@ -386,17 +386,17 @@ async function build() {
|
|
|
386
386
|
let config = configPath ? require(configPath) : {
|
|
387
387
|
};
|
|
388
388
|
let resolvedConfig = (0, _resolveConfig).default(config);
|
|
389
|
-
if (
|
|
389
|
+
if (args['--purge']) {
|
|
390
390
|
_log.default.warn('purge-flag-deprecated', [
|
|
391
391
|
'The `--purge` flag has been deprecated.',
|
|
392
392
|
'Please use `--content` instead.',
|
|
393
393
|
]);
|
|
394
|
-
if (!
|
|
395
|
-
|
|
394
|
+
if (!args['--content']) {
|
|
395
|
+
args['--content'] = args['--purge'];
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
if (
|
|
399
|
-
resolvedConfig.content.files =
|
|
398
|
+
if (args['--content']) {
|
|
399
|
+
resolvedConfig.content.files = args['--content'].split(/(?<!{[^}]+),/);
|
|
400
400
|
}
|
|
401
401
|
return resolvedConfig;
|
|
402
402
|
}
|
|
@@ -457,9 +457,9 @@ async function build() {
|
|
|
457
457
|
let plugins = [
|
|
458
458
|
...beforePlugins,
|
|
459
459
|
tailwindPlugin,
|
|
460
|
-
!
|
|
460
|
+
!args['--minify'] && formatNodes,
|
|
461
461
|
...afterPlugins,
|
|
462
|
-
!
|
|
462
|
+
!args['--no-autoprefixer'] && (()=>{
|
|
463
463
|
// Try to load a local `autoprefixer` version first
|
|
464
464
|
try {
|
|
465
465
|
return require('autoprefixer');
|
|
@@ -467,7 +467,7 @@ async function build() {
|
|
|
467
467
|
}
|
|
468
468
|
return (0, _indexJs).lazyAutoprefixer();
|
|
469
469
|
})(),
|
|
470
|
-
|
|
470
|
+
args['--minify'] && (()=>{
|
|
471
471
|
let options = {
|
|
472
472
|
preset: [
|
|
473
473
|
'default',
|
|
@@ -541,9 +541,9 @@ async function build() {
|
|
|
541
541
|
let plugins = [
|
|
542
542
|
...beforePlugins,
|
|
543
543
|
'__TAILWIND_PLUGIN_POSITION__',
|
|
544
|
-
!
|
|
544
|
+
!args['--minify'] && formatNodes,
|
|
545
545
|
...afterPlugins,
|
|
546
|
-
!
|
|
546
|
+
!args['--no-autoprefixer'] && (()=>{
|
|
547
547
|
// Try to load a local `autoprefixer` version first
|
|
548
548
|
try {
|
|
549
549
|
return require('autoprefixer');
|
|
@@ -551,7 +551,7 @@ async function build() {
|
|
|
551
551
|
}
|
|
552
552
|
return (0, _indexJs).lazyAutoprefixer();
|
|
553
553
|
})(),
|
|
554
|
-
|
|
554
|
+
args['--minify'] && (()=>{
|
|
555
555
|
let options = {
|
|
556
556
|
preset: [
|
|
557
557
|
'default',
|
package/lib/corePluginList.js
CHANGED
package/lib/corePlugins.js
CHANGED
|
@@ -210,7 +210,7 @@ let variantPlugins = {
|
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
212
|
exports.variantPlugins = variantPlugins;
|
|
213
|
-
let
|
|
213
|
+
let corePlugins = {
|
|
214
214
|
preflight: ({ addBase })=>{
|
|
215
215
|
let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(path.join(__dirname, './css/preflight.css'), 'utf8'));
|
|
216
216
|
addBase([
|
|
@@ -911,7 +911,9 @@ let corePlugins1 = {
|
|
|
911
911
|
],
|
|
912
912
|
],
|
|
913
913
|
],
|
|
914
|
-
]
|
|
914
|
+
], {
|
|
915
|
+
supportsNegativeValues: true
|
|
916
|
+
}),
|
|
915
917
|
transform: ({ addBase , addUtilities })=>{
|
|
916
918
|
addBase({
|
|
917
919
|
'@defaults transform': {
|
|
@@ -1679,10 +1681,10 @@ let corePlugins1 = {
|
|
|
1679
1681
|
}
|
|
1680
1682
|
});
|
|
1681
1683
|
},
|
|
1682
|
-
divideColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
1684
|
+
divideColor: ({ matchUtilities , theme , corePlugins: corePlugins1 })=>{
|
|
1683
1685
|
matchUtilities({
|
|
1684
1686
|
divide: (value)=>{
|
|
1685
|
-
if (!
|
|
1687
|
+
if (!corePlugins1('divideOpacity')) {
|
|
1686
1688
|
return {
|
|
1687
1689
|
['& > :not([hidden]) ~ :not([hidden])']: {
|
|
1688
1690
|
'border-color': (0, _toColorValue).default(value)
|
|
@@ -2093,8 +2095,8 @@ let corePlugins1 = {
|
|
|
2093
2095
|
}
|
|
2094
2096
|
});
|
|
2095
2097
|
},
|
|
2096
|
-
borderColor: ({ addBase , matchUtilities , theme , corePlugins })=>{
|
|
2097
|
-
if (!
|
|
2098
|
+
borderColor: ({ addBase , matchUtilities , theme , corePlugins: corePlugins2 })=>{
|
|
2099
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2098
2100
|
let value = theme('borderColor.DEFAULT', 'currentColor');
|
|
2099
2101
|
addBase({
|
|
2100
2102
|
'@defaults border-width': {
|
|
@@ -2112,7 +2114,7 @@ let corePlugins1 = {
|
|
|
2112
2114
|
}
|
|
2113
2115
|
matchUtilities({
|
|
2114
2116
|
border: (value)=>{
|
|
2115
|
-
if (!
|
|
2117
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2116
2118
|
return {
|
|
2117
2119
|
'border-color': (0, _toColorValue).default(value)
|
|
2118
2120
|
};
|
|
@@ -2132,7 +2134,7 @@ let corePlugins1 = {
|
|
|
2132
2134
|
});
|
|
2133
2135
|
matchUtilities({
|
|
2134
2136
|
'border-x': (value)=>{
|
|
2135
|
-
if (!
|
|
2137
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2136
2138
|
return {
|
|
2137
2139
|
'border-left-color': (0, _toColorValue).default(value),
|
|
2138
2140
|
'border-right-color': (0, _toColorValue).default(value)
|
|
@@ -2148,7 +2150,7 @@ let corePlugins1 = {
|
|
|
2148
2150
|
});
|
|
2149
2151
|
},
|
|
2150
2152
|
'border-y': (value)=>{
|
|
2151
|
-
if (!
|
|
2153
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2152
2154
|
return {
|
|
2153
2155
|
'border-top-color': (0, _toColorValue).default(value),
|
|
2154
2156
|
'border-bottom-color': (0, _toColorValue).default(value)
|
|
@@ -2170,7 +2172,7 @@ let corePlugins1 = {
|
|
|
2170
2172
|
});
|
|
2171
2173
|
matchUtilities({
|
|
2172
2174
|
'border-t': (value)=>{
|
|
2173
|
-
if (!
|
|
2175
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2174
2176
|
return {
|
|
2175
2177
|
'border-top-color': (0, _toColorValue).default(value)
|
|
2176
2178
|
};
|
|
@@ -2182,7 +2184,7 @@ let corePlugins1 = {
|
|
|
2182
2184
|
});
|
|
2183
2185
|
},
|
|
2184
2186
|
'border-r': (value)=>{
|
|
2185
|
-
if (!
|
|
2187
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2186
2188
|
return {
|
|
2187
2189
|
'border-right-color': (0, _toColorValue).default(value)
|
|
2188
2190
|
};
|
|
@@ -2194,7 +2196,7 @@ let corePlugins1 = {
|
|
|
2194
2196
|
});
|
|
2195
2197
|
},
|
|
2196
2198
|
'border-b': (value)=>{
|
|
2197
|
-
if (!
|
|
2199
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2198
2200
|
return {
|
|
2199
2201
|
'border-bottom-color': (0, _toColorValue).default(value)
|
|
2200
2202
|
};
|
|
@@ -2206,7 +2208,7 @@ let corePlugins1 = {
|
|
|
2206
2208
|
});
|
|
2207
2209
|
},
|
|
2208
2210
|
'border-l': (value)=>{
|
|
2209
|
-
if (!
|
|
2211
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2210
2212
|
return {
|
|
2211
2213
|
'border-left-color': (0, _toColorValue).default(value)
|
|
2212
2214
|
};
|
|
@@ -2231,10 +2233,10 @@ let corePlugins1 = {
|
|
|
2231
2233
|
]
|
|
2232
2234
|
],
|
|
2233
2235
|
]),
|
|
2234
|
-
backgroundColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
2236
|
+
backgroundColor: ({ matchUtilities , theme , corePlugins: corePlugins3 })=>{
|
|
2235
2237
|
matchUtilities({
|
|
2236
2238
|
bg: (value)=>{
|
|
2237
|
-
if (!
|
|
2239
|
+
if (!corePlugins3('backgroundOpacity')) {
|
|
2238
2240
|
return {
|
|
2239
2241
|
'background-color': (0, _toColorValue).default(value)
|
|
2240
2242
|
};
|
|
@@ -2315,6 +2317,12 @@ let corePlugins1 = {
|
|
|
2315
2317
|
},
|
|
2316
2318
|
'.decoration-clone': {
|
|
2317
2319
|
'box-decoration-break': 'clone'
|
|
2320
|
+
},
|
|
2321
|
+
'.box-decoration-slice': {
|
|
2322
|
+
'box-decoration-break': 'slice'
|
|
2323
|
+
},
|
|
2324
|
+
'.box-decoration-clone': {
|
|
2325
|
+
'box-decoration-break': 'clone'
|
|
2318
2326
|
}
|
|
2319
2327
|
});
|
|
2320
2328
|
},
|
|
@@ -2754,10 +2762,10 @@ let corePlugins1 = {
|
|
|
2754
2762
|
], {
|
|
2755
2763
|
supportsNegativeValues: true
|
|
2756
2764
|
}),
|
|
2757
|
-
textColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
2765
|
+
textColor: ({ matchUtilities , theme , corePlugins: corePlugins4 })=>{
|
|
2758
2766
|
matchUtilities({
|
|
2759
2767
|
text: (value)=>{
|
|
2760
|
-
if (!
|
|
2768
|
+
if (!corePlugins4('textOpacity')) {
|
|
2761
2769
|
return {
|
|
2762
2770
|
color: (0, _toColorValue).default(value)
|
|
2763
2771
|
};
|
|
@@ -2784,13 +2792,16 @@ let corePlugins1 = {
|
|
|
2784
2792
|
textDecoration: ({ addUtilities })=>{
|
|
2785
2793
|
addUtilities({
|
|
2786
2794
|
'.underline': {
|
|
2787
|
-
'text-decoration': 'underline'
|
|
2795
|
+
'text-decoration-line': 'underline'
|
|
2796
|
+
},
|
|
2797
|
+
'.overline': {
|
|
2798
|
+
'text-decoration-line': 'overline'
|
|
2788
2799
|
},
|
|
2789
2800
|
'.line-through': {
|
|
2790
|
-
'text-decoration': 'line-through'
|
|
2801
|
+
'text-decoration-line': 'line-through'
|
|
2791
2802
|
},
|
|
2792
2803
|
'.no-underline': {
|
|
2793
|
-
'text-decoration': 'none'
|
|
2804
|
+
'text-decoration-line': 'none'
|
|
2794
2805
|
}
|
|
2795
2806
|
});
|
|
2796
2807
|
},
|
|
@@ -2804,11 +2815,55 @@ let corePlugins1 = {
|
|
|
2804
2815
|
}, {
|
|
2805
2816
|
values: (0, _flattenColorPalette).default(theme('textDecorationColor')),
|
|
2806
2817
|
type: [
|
|
2807
|
-
'color'
|
|
2808
|
-
'any'
|
|
2818
|
+
'color'
|
|
2809
2819
|
]
|
|
2810
2820
|
});
|
|
2811
2821
|
},
|
|
2822
|
+
textDecorationStyle: ({ addUtilities })=>{
|
|
2823
|
+
addUtilities({
|
|
2824
|
+
'.decoration-solid': {
|
|
2825
|
+
'text-decoration-style': 'solid'
|
|
2826
|
+
},
|
|
2827
|
+
'.decoration-double': {
|
|
2828
|
+
'text-decoration-style': 'double'
|
|
2829
|
+
},
|
|
2830
|
+
'.decoration-dotted': {
|
|
2831
|
+
'text-decoration-style': 'dotted'
|
|
2832
|
+
},
|
|
2833
|
+
'.decoration-dashed': {
|
|
2834
|
+
'text-decoration-style': 'dashed'
|
|
2835
|
+
},
|
|
2836
|
+
'.decoration-wavy': {
|
|
2837
|
+
'text-decoration-style': 'wavy'
|
|
2838
|
+
}
|
|
2839
|
+
});
|
|
2840
|
+
},
|
|
2841
|
+
textDecorationThickness: (0, _createUtilityPlugin).default('textDecorationThickness', [
|
|
2842
|
+
[
|
|
2843
|
+
'decoration',
|
|
2844
|
+
[
|
|
2845
|
+
'text-decoration-thickness'
|
|
2846
|
+
]
|
|
2847
|
+
]
|
|
2848
|
+
], {
|
|
2849
|
+
type: [
|
|
2850
|
+
'length',
|
|
2851
|
+
'percentage'
|
|
2852
|
+
]
|
|
2853
|
+
}),
|
|
2854
|
+
textUnderlineOffset: (0, _createUtilityPlugin).default('textUnderlineOffset', [
|
|
2855
|
+
[
|
|
2856
|
+
'underline-offset',
|
|
2857
|
+
[
|
|
2858
|
+
'text-underline-offset'
|
|
2859
|
+
]
|
|
2860
|
+
]
|
|
2861
|
+
], {
|
|
2862
|
+
type: [
|
|
2863
|
+
'length',
|
|
2864
|
+
'percentage'
|
|
2865
|
+
]
|
|
2866
|
+
}),
|
|
2812
2867
|
fontSmoothing: ({ addUtilities })=>{
|
|
2813
2868
|
addUtilities({
|
|
2814
2869
|
'.antialiased': {
|
|
@@ -2821,10 +2876,10 @@ let corePlugins1 = {
|
|
|
2821
2876
|
}
|
|
2822
2877
|
});
|
|
2823
2878
|
},
|
|
2824
|
-
placeholderColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
2879
|
+
placeholderColor: ({ matchUtilities , theme , corePlugins: corePlugins5 })=>{
|
|
2825
2880
|
matchUtilities({
|
|
2826
2881
|
placeholder: (value)=>{
|
|
2827
|
-
if (!
|
|
2882
|
+
if (!corePlugins5('placeholderOpacity')) {
|
|
2828
2883
|
return {
|
|
2829
2884
|
'&::placeholder': {
|
|
2830
2885
|
color: (0, _toColorValue).default(value)
|
|
@@ -3607,4 +3662,4 @@ let corePlugins1 = {
|
|
|
3607
3662
|
],
|
|
3608
3663
|
])
|
|
3609
3664
|
};
|
|
3610
|
-
exports.corePlugins =
|
|
3665
|
+
exports.corePlugins = corePlugins;
|
package/lib/css/preflight.css
CHANGED
package/lib/featureFlags.js
CHANGED
|
@@ -13,7 +13,9 @@ function _interopRequireDefault(obj) {
|
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
let defaults = {
|
|
16
|
-
|
|
16
|
+
// TODO: Drop this once we can safely rely on optimizeUniversalDefaults being
|
|
17
|
+
// the default.
|
|
18
|
+
optimizeUniversalDefaults: process.env.NODE_ENV === 'test' ? true : false
|
|
17
19
|
};
|
|
18
20
|
let featureFlags = {
|
|
19
21
|
future: [],
|