tailwindcss 3.0.11 → 3.0.15

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +44 -4
  2. package/lib/cli.js +8 -16
  3. package/lib/corePlugins.js +183 -280
  4. package/lib/css/preflight.css +1 -1
  5. package/lib/featureFlags.js +2 -5
  6. package/lib/lib/expandApplyAtRules.js +0 -40
  7. package/lib/lib/expandTailwindAtRules.js +31 -38
  8. package/lib/lib/generateRules.js +8 -2
  9. package/lib/lib/partitionApplyAtRules.js +53 -0
  10. package/lib/lib/resolveDefaultsAtRules.js +4 -4
  11. package/lib/lib/setupContextUtils.js +41 -51
  12. package/lib/processTailwindFeatures.js +3 -1
  13. package/lib/util/createPlugin.js +1 -2
  14. package/lib/util/createUtilityPlugin.js +4 -8
  15. package/lib/util/flattenColorPalette.js +1 -3
  16. package/lib/util/normalizeConfig.js +11 -12
  17. package/lib/util/normalizeScreens.js +2 -4
  18. package/lib/util/pluginUtils.js +6 -13
  19. package/lib/util/resolveConfig.js +9 -18
  20. package/lib/util/resolveConfigPath.js +1 -2
  21. package/lib/util/toColorValue.js +1 -2
  22. package/lib/util/transformThemeValue.js +4 -8
  23. package/nesting/plugin.js +4 -1
  24. package/package.json +9 -11
  25. package/peers/index.js +652 -651
  26. package/src/corePlugins.js +121 -155
  27. package/src/css/preflight.css +1 -1
  28. package/src/featureFlags.js +1 -5
  29. package/src/lib/expandApplyAtRules.js +0 -42
  30. package/src/lib/expandTailwindAtRules.js +33 -29
  31. package/src/lib/generateRules.js +6 -0
  32. package/src/lib/partitionApplyAtRules.js +52 -0
  33. package/src/lib/resolveDefaultsAtRules.js +5 -5
  34. package/src/lib/setupContextUtils.js +29 -16
  35. package/src/processTailwindFeatures.js +4 -1
  36. package/src/util/normalizeConfig.js +6 -0
  37. package/src/util/pluginUtils.js +1 -1
package/CHANGELOG.md CHANGED
@@ -9,13 +9,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  - Nothing yet!
11
11
 
12
+ ## [3.0.15] - 2022-01-15
13
+
14
+ ### Fixed
15
+
16
+ - Temporarily remove optional chaining in nesting plugin ([#7077](https://github.com/tailwindlabs/tailwindcss/pull/7077))
17
+
18
+ ## [3.0.14] - 2022-01-14
19
+
20
+ ### Added
21
+
22
+ - Show warnings for invalid content config ([#7065](https://github.com/tailwindlabs/tailwindcss/pull/7065))
23
+
24
+ ### Fixed
25
+
26
+ - Only emit utility/component variants when those layers exist ([#7066](https://github.com/tailwindlabs/tailwindcss/pull/7066))
27
+ - Ensure nesting plugins can receive options ([#7016](https://github.com/tailwindlabs/tailwindcss/pull/7016))
28
+
29
+ ## [3.0.13] - 2022-01-11
30
+
31
+ ### Fixed
32
+
33
+ - Fix consecutive builds with at apply producing different CSS ([#6999](https://github.com/tailwindlabs/tailwindcss/pull/6999))
34
+
35
+ ## [3.0.12] - 2022-01-07
36
+
37
+ ### Fixed
38
+
39
+ - Allow use of falsy values in theme config ([#6917](https://github.com/tailwindlabs/tailwindcss/pull/6917))
40
+ - Ensure we can apply classes that are grouped with non-class selectors ([#6922](https://github.com/tailwindlabs/tailwindcss/pull/6922))
41
+ - Improve standalone CLI compatibility on Linux by switching to the `linuxstatic` build target ([#6914](https://github.com/tailwindlabs/tailwindcss/pull/6914))
42
+ - Ensure `@apply` works consistently with or without `@layer` ([#6938](https://github.com/tailwindlabs/tailwindcss/pull/6938))
43
+ - Only emit defaults when using base layer ([#6926](https://github.com/tailwindlabs/tailwindcss/pull/6926))
44
+ - Emit plugin defaults regardless of usage ([#6926](https://github.com/tailwindlabs/tailwindcss/pull/6926))
45
+ - Move default border color back to preflight ([#6926](https://github.com/tailwindlabs/tailwindcss/pull/6926))
46
+ - Change `experimental.optimizeUniversalDefaults` to only work with `@tailwind base` ([#6926](https://github.com/tailwindlabs/tailwindcss/pull/6926))
47
+
12
48
  ## [3.0.11] - 2022-01-05
13
49
 
14
50
  ### Fixed
15
51
 
16
- - Preserve case of css variables added by plugins ([#6888](https://github.com/tailwindlabs/tailwindcss/pull/6888))
17
- - Ignore content files that don't exist ([#6901](https://github.com/tailwindlabs/tailwindcss/pull/6901))
18
- - Revert apply defaults in isolation ([9fdc391](https://github.com/tailwindlabs/tailwindcss/commit/9fdc391d4ff93e7e350f5ce439060176b1f0162f))
52
+ - Preserve casing of CSS variables added by plugins ([#6888](https://github.com/tailwindlabs/tailwindcss/pull/6888))
53
+ - Ignore content paths that are passed in but don't actually exist ([#6901](https://github.com/tailwindlabs/tailwindcss/pull/6901))
54
+ - Revert change that applies Tailwind's defaults in isolated environments like CSS modules ([9fdc391](https://github.com/tailwindlabs/tailwindcss/commit/9fdc391d4ff93e7e350f5ce439060176b1f0162f))
19
55
 
20
56
  ## [3.0.10] - 2022-01-04
21
57
 
@@ -1779,7 +1815,11 @@ No release notes
1779
1815
 
1780
1816
  - Everything!
1781
1817
 
1782
- [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.11...HEAD
1818
+ [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.15...HEAD
1819
+ [3.0.15]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.14...v3.0.15
1820
+ [3.0.14]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.13...v3.0.14
1821
+ [3.0.13]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.12...v3.0.13
1822
+ [3.0.12]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.11...v3.0.12
1783
1823
  [3.0.11]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.10...v3.0.11
1784
1824
  [3.0.10]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.9...v3.0.10
1785
1825
  [3.0.9]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.8...v3.0.9
package/lib/cli.js CHANGED
@@ -89,8 +89,7 @@ function help({ message , usage , commands: commands1 , options }) {
89
89
  }
90
90
  // Render options
91
91
  if (options) {
92
- let groupedOptions = {
93
- };
92
+ let groupedOptions = {};
94
93
  for (let [key, value] of Object.entries(options)){
95
94
  if (typeof value === 'object') {
96
95
  groupedOptions[key] = {
@@ -370,13 +369,11 @@ async function build() {
370
369
  let { plugins: configPlugins } = customPostCssPath ? await (async ()=>{
371
370
  let file = _path.default.resolve(customPostCssPath);
372
371
  // Implementation, see: https://unpkg.com/browse/postcss-load-config@3.0.1/src/index.js
373
- let { config ={
374
- } } = await (0, _cosmiconfig).cosmiconfig('postcss').load(file);
372
+ let { config ={} } = await (0, _cosmiconfig).cosmiconfig('postcss').load(file);
375
373
  if (typeof config === 'function') {
376
374
  config = config();
377
375
  } else {
378
- config = Object.assign({
379
- }, config);
376
+ config = Object.assign({}, config);
380
377
  }
381
378
  if (!config.plugins) {
382
379
  config.plugins = [];
@@ -402,8 +399,7 @@ async function build() {
402
399
  ];
403
400
  }
404
401
  function resolveConfig() {
405
- let config = configPath ? require(configPath) : {
406
- };
402
+ let config = configPath ? require(configPath) : {};
407
403
  let resolvedConfig = (0, _resolveConfig).default(config);
408
404
  if (args['--purge']) {
409
405
  _log.default.warn('purge-flag-deprecated', [
@@ -482,8 +478,7 @@ async function build() {
482
478
  // Try to load a local `autoprefixer` version first
483
479
  try {
484
480
  return require('autoprefixer');
485
- } catch {
486
- }
481
+ } catch {}
487
482
  return (0, _indexJs).lazyAutoprefixer();
488
483
  })(),
489
484
  args['--minify'] && (()=>{
@@ -498,8 +493,7 @@ async function build() {
498
493
  // Try to load a local `cssnano` version first
499
494
  try {
500
495
  return require('cssnano');
501
- } catch {
502
- }
496
+ } catch {}
503
497
  return (0, _indexJs).lazyCssnano()(options);
504
498
  })(),
505
499
  ].filter(Boolean);
@@ -575,8 +569,7 @@ async function build() {
575
569
  // Try to load a local `autoprefixer` version first
576
570
  try {
577
571
  return require('autoprefixer');
578
- } catch {
579
- }
572
+ } catch {}
580
573
  return (0, _indexJs).lazyAutoprefixer();
581
574
  })(),
582
575
  args['--minify'] && (()=>{
@@ -591,8 +584,7 @@ async function build() {
591
584
  // Try to load a local `cssnano` version first
592
585
  try {
593
586
  return require('cssnano');
594
- } catch {
595
- }
587
+ } catch {}
596
588
  return (0, _indexJs).lazyCssnano()(options);
597
589
  })(),
598
590
  ].filter(Boolean);