tailwindcss 0.0.0-insiders.1cbb29f → 0.0.0-insiders.1cc1ace

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 (114) hide show
  1. package/CHANGELOG.md +181 -2
  2. package/LICENSE +1 -2
  3. package/colors.d.ts +3 -0
  4. package/defaultConfig.d.ts +3 -0
  5. package/defaultTheme.d.ts +3 -0
  6. package/lib/cli-peer-dependencies.js +3 -3
  7. package/lib/cli.js +230 -175
  8. package/lib/constants.js +8 -8
  9. package/lib/corePluginList.js +1 -0
  10. package/lib/corePlugins.js +1648 -1667
  11. package/lib/css/preflight.css +2 -1
  12. package/lib/featureFlags.js +11 -14
  13. package/lib/index.js +17 -6
  14. package/lib/lib/cacheInvalidation.js +69 -0
  15. package/lib/lib/collapseAdjacentRules.js +30 -14
  16. package/lib/lib/collapseDuplicateDeclarations.js +1 -1
  17. package/lib/lib/defaultExtractor.js +8 -6
  18. package/lib/lib/detectNesting.js +9 -9
  19. package/lib/lib/evaluateTailwindFunctions.js +16 -16
  20. package/lib/lib/expandApplyAtRules.js +348 -222
  21. package/lib/lib/expandTailwindAtRules.js +135 -122
  22. package/lib/lib/generateRules.js +190 -93
  23. package/lib/lib/getModuleDependencies.js +14 -14
  24. package/lib/lib/normalizeTailwindDirectives.js +43 -35
  25. package/lib/lib/partitionApplyAtRules.js +53 -0
  26. package/lib/lib/resolveDefaultsAtRules.js +81 -77
  27. package/lib/lib/setupContextUtils.js +170 -134
  28. package/lib/lib/setupTrackingContext.js +57 -56
  29. package/lib/lib/sharedState.js +11 -7
  30. package/lib/lib/substituteScreenAtRules.js +2 -2
  31. package/{nesting → lib/postcss-plugins/nesting}/README.md +2 -2
  32. package/lib/postcss-plugins/nesting/index.js +17 -0
  33. package/lib/postcss-plugins/nesting/plugin.js +85 -0
  34. package/lib/processTailwindFeatures.js +17 -9
  35. package/lib/public/colors.js +241 -241
  36. package/lib/public/resolve-config.js +5 -5
  37. package/lib/util/buildMediaQuery.js +2 -2
  38. package/lib/util/cloneDeep.js +1 -1
  39. package/lib/util/cloneNodes.js +12 -1
  40. package/lib/util/color.js +21 -20
  41. package/lib/util/createPlugin.js +1 -2
  42. package/lib/util/createUtilityPlugin.js +9 -13
  43. package/lib/util/dataTypes.js +82 -75
  44. package/lib/util/escapeClassName.js +5 -5
  45. package/lib/util/escapeCommas.js +1 -1
  46. package/lib/util/flattenColorPalette.js +2 -4
  47. package/lib/util/formatVariantSelector.js +19 -19
  48. package/lib/util/getAllConfigs.js +5 -5
  49. package/lib/util/hashConfig.js +5 -5
  50. package/lib/util/isKeyframeRule.js +1 -1
  51. package/lib/util/isPlainObject.js +1 -1
  52. package/lib/util/isValidArbitraryValue.js +27 -27
  53. package/lib/util/log.js +8 -8
  54. package/lib/util/nameClass.js +7 -7
  55. package/lib/util/negateValue.js +4 -4
  56. package/lib/util/normalizeConfig.js +49 -46
  57. package/lib/util/normalizeScreens.js +5 -7
  58. package/lib/util/parseAnimationValue.js +56 -56
  59. package/lib/util/parseBoxShadowValue.js +61 -21
  60. package/lib/util/parseDependency.js +32 -32
  61. package/lib/util/parseObjectStyles.js +6 -6
  62. package/lib/util/pluginUtils.js +15 -22
  63. package/lib/util/prefixSelector.js +4 -5
  64. package/lib/util/resolveConfig.js +58 -45
  65. package/lib/util/resolveConfigPath.js +17 -18
  66. package/lib/util/responsive.js +6 -6
  67. package/lib/util/toColorValue.js +1 -2
  68. package/lib/util/toPath.js +2 -2
  69. package/lib/util/transformThemeValue.js +27 -31
  70. package/lib/util/withAlphaVariable.js +19 -19
  71. package/nesting/index.js +2 -12
  72. package/package.json +34 -36
  73. package/peers/index.js +5188 -5424
  74. package/plugin.d.ts +6 -0
  75. package/scripts/generate-types.js +52 -0
  76. package/src/cli.js +96 -26
  77. package/src/corePluginList.js +1 -1
  78. package/src/corePlugins.js +213 -165
  79. package/src/css/preflight.css +2 -1
  80. package/src/featureFlags.js +3 -7
  81. package/src/index.js +15 -1
  82. package/src/lib/cacheInvalidation.js +52 -0
  83. package/src/lib/collapseAdjacentRules.js +21 -2
  84. package/src/lib/defaultExtractor.js +6 -4
  85. package/src/lib/expandApplyAtRules.js +363 -226
  86. package/src/lib/expandTailwindAtRules.js +66 -30
  87. package/src/lib/generateRules.js +159 -69
  88. package/src/lib/normalizeTailwindDirectives.js +7 -1
  89. package/src/lib/partitionApplyAtRules.js +52 -0
  90. package/src/lib/resolveDefaultsAtRules.js +11 -7
  91. package/src/lib/setupContextUtils.js +112 -47
  92. package/src/lib/setupTrackingContext.js +8 -7
  93. package/src/lib/sharedState.js +2 -0
  94. package/src/postcss-plugins/nesting/README.md +42 -0
  95. package/src/postcss-plugins/nesting/index.js +13 -0
  96. package/src/postcss-plugins/nesting/plugin.js +80 -0
  97. package/src/processTailwindFeatures.js +12 -2
  98. package/src/util/cloneNodes.js +14 -1
  99. package/src/util/color.js +7 -5
  100. package/src/util/dataTypes.js +13 -5
  101. package/src/util/log.js +7 -7
  102. package/src/util/normalizeConfig.js +12 -4
  103. package/src/util/parseBoxShadowValue.js +51 -3
  104. package/src/util/pluginUtils.js +1 -1
  105. package/src/util/prefixSelector.js +7 -5
  106. package/src/util/resolveConfig.js +30 -0
  107. package/stubs/defaultConfig.stub.js +3 -0
  108. package/types/config.d.ts +323 -0
  109. package/types/generated/.gitkeep +0 -0
  110. package/types/generated/colors.d.ts +276 -0
  111. package/types/generated/corePluginList.d.ts +1 -0
  112. package/types/index.d.ts +1 -0
  113. package/types.d.ts +1 -0
  114. package/nesting/plugin.js +0 -41
package/CHANGELOG.md CHANGED
@@ -9,12 +9,175 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
 
10
10
  ### Fixed
11
11
 
12
+ - Types: allow for arbitrary theme values (for 3rd party plugins) ([#7926](https://github.com/tailwindlabs/tailwindcss/pull/7926))
13
+ - Don’t split vars with numbers in them inside arbitrary values ([#8091](https://github.com/tailwindlabs/tailwindcss/pull/8091))
14
+ - Require matching prefix when detecting negatives ([#8121](https://github.com/tailwindlabs/tailwindcss/pull/8121))
15
+ - Handle duplicate At Rules without children ([#8122](https://github.com/tailwindlabs/tailwindcss/pull/8122))
16
+ - Allow arbitrary values with commas in `@apply` ([#8125](https://github.com/tailwindlabs/tailwindcss/pull/8125))
17
+
18
+ ### Added
19
+
20
+ - Allow default ring color to be a function ([#7587](https://github.com/tailwindlabs/tailwindcss/pull/7587))
21
+ - Add `rgb` and `hsl` color helpers for CSS variables ([#7665](https://github.com/tailwindlabs/tailwindcss/pull/7665))
22
+ - Support PostCSS `Document` nodes ([#7291](https://github.com/tailwindlabs/tailwindcss/pull/7291))
23
+ - Add `text-start` and `text-end` utilities ([#6656](https://github.com/tailwindlabs/tailwindcss/pull/6656))
24
+ - Support customizing class name when using `darkMode: 'class'` ([#5800](https://github.com/tailwindlabs/tailwindcss/pull/5800))
25
+ - Add `--poll` option to the CLI ([#7725](https://github.com/tailwindlabs/tailwindcss/pull/7725))
26
+ - Add new `border-spacing` utilities ([#7102](https://github.com/tailwindlabs/tailwindcss/pull/7102))
27
+ - Add `enabled` variant ([#7905](https://github.com/tailwindlabs/tailwindcss/pull/7905))
28
+ - Add TypeScript types for the `tailwind.config.js` file ([#7891](https://github.com/tailwindlabs/tailwindcss/pull/7891))
29
+ - Add `backdrop` variant ([#7924](https://github.com/tailwindlabs/tailwindcss/pull/7924))
30
+
31
+ ## [3.0.24] - 2022-04-12
32
+
33
+ ### Fixed
34
+
35
+ - Prevent nesting plugin from breaking other plugins ([#7563](https://github.com/tailwindlabs/tailwindcss/pull/7563))
36
+ - Recursively collapse adjacent rules ([#7565](https://github.com/tailwindlabs/tailwindcss/pull/7565))
37
+ - Preserve source maps for generated CSS ([#7588](https://github.com/tailwindlabs/tailwindcss/pull/7588))
38
+ - Split box shadows on top-level commas only ([#7479](https://github.com/tailwindlabs/tailwindcss/pull/7479))
39
+ - Use local user CSS cache for `@apply` ([#7524](https://github.com/tailwindlabs/tailwindcss/pull/7524))
40
+ - Invalidate context when main CSS changes ([#7626](https://github.com/tailwindlabs/tailwindcss/pull/7626))
41
+ - Only add `!` to selector class matching template candidate when using important modifier with mutli-class selectors ([#7664](https://github.com/tailwindlabs/tailwindcss/pull/7664))
42
+ - Correctly parse and prefix animation names with dots ([#7163](https://github.com/tailwindlabs/tailwindcss/pull/7163))
43
+ - Fix extraction from template literal/function with array ([#7481](https://github.com/tailwindlabs/tailwindcss/pull/7481))
44
+ - Don't output unparsable arbitrary values ([#7789](https://github.com/tailwindlabs/tailwindcss/pull/7789))
45
+ - Fix generation of `div:not(.foo)` if `.foo` is never defined ([#7815](https://github.com/tailwindlabs/tailwindcss/pull/7815))
46
+ - Allow for custom properties in `rgb`, `rgba`, `hsl` and `hsla` colors ([#7933](https://github.com/tailwindlabs/tailwindcss/pull/7933))
47
+ - Remove autoprefixer as explicit peer-dependency to avoid invalid warnings in situations where it isn't actually needed ([#7949](https://github.com/tailwindlabs/tailwindcss/pull/7949))
48
+ - Ensure the `percentage` data type is validated correctly ([#8015](https://github.com/tailwindlabs/tailwindcss/pull/8015))
49
+ - Make sure `font-weight` is inherited by form controls in all browsers ([#8078](https://github.com/tailwindlabs/tailwindcss/pull/8078))
50
+
51
+ ### Changed
52
+
53
+ - Replace `chalk` with `picocolors` ([#6039](https://github.com/tailwindlabs/tailwindcss/pull/6039))
54
+ - Replace `cosmiconfig` with `lilconfig` ([#6039](https://github.com/tailwindlabs/tailwindcss/pull/6038))
55
+ - Update `cssnano` to avoid removing empty variables when minifying ([#7818](https://github.com/tailwindlabs/tailwindcss/pull/7818))
56
+
57
+ ## [3.0.23] - 2022-02-16
58
+
59
+ ### Fixed
60
+
61
+ - Remove opacity variables from `:visited` pseudo class ([#7458](https://github.com/tailwindlabs/tailwindcss/pull/7458))
62
+ - Support arbitrary values + calc + theme with quotes ([#7462](https://github.com/tailwindlabs/tailwindcss/pull/7462))
63
+ - Don't duplicate layer output when scanning content with variants + wildcards ([#7478](https://github.com/tailwindlabs/tailwindcss/pull/7478))
64
+ - Implement `getClassOrder` instead of `sortClassList` ([#7459](https://github.com/tailwindlabs/tailwindcss/pull/7459))
65
+
66
+ ## [3.0.22] - 2022-02-11
67
+
68
+ ### Fixed
69
+
70
+ - Temporarily move `postcss` to dependencies ([#7424](https://github.com/tailwindlabs/tailwindcss/pull/7424))
71
+
72
+ ## [3.0.21] - 2022-02-10
73
+
74
+ ### Fixed
75
+
76
+ - Move prettier plugin to dev dependencies ([#7418](https://github.com/tailwindlabs/tailwindcss/pull/7418))
77
+
78
+ ## [3.0.20] - 2022-02-10
79
+
80
+ ### Added
81
+
82
+ - Expose `context.sortClassList(classes)` ([#7412](https://github.com/tailwindlabs/tailwindcss/pull/7412))
83
+
84
+ ## [3.0.19] - 2022-02-07
85
+
86
+ ### Fixed
87
+
88
+ - Fix preflight border color fallback ([#7288](https://github.com/tailwindlabs/tailwindcss/pull/7288))
89
+ - Correctly parse shadow lengths without a leading zero ([#7289](https://github.com/tailwindlabs/tailwindcss/pull/7289))
90
+ - Don't crash when scanning extremely long class candidates ([#7331](https://github.com/tailwindlabs/tailwindcss/pull/7331))
91
+ - Use less hacky fix for URLs detected as custom properties ([#7275](https://github.com/tailwindlabs/tailwindcss/pull/7275))
92
+ - Correctly generate negative utilities when dash is before the prefix ([#7295](https://github.com/tailwindlabs/tailwindcss/pull/7295))
93
+ - Detect prefixed negative utilities in the safelist ([#7295](https://github.com/tailwindlabs/tailwindcss/pull/7295))
94
+
95
+ ## [3.0.18] - 2022-01-28
96
+
97
+ ### Fixed
98
+
99
+ - Fix `@apply` order regression (in `addComponents`, `addUtilities`, ...) ([#7232](https://github.com/tailwindlabs/tailwindcss/pull/7232))
100
+ - Quick fix for incorrect arbitrary properties when using URLs ([#7252](https://github.com/tailwindlabs/tailwindcss/pull/7252))
101
+
102
+ ## [3.0.17] - 2022-01-26
103
+
104
+ ### Fixed
105
+
106
+ - Remove false positive warning in CLI when using the `--content` option ([#7220](https://github.com/tailwindlabs/tailwindcss/pull/7220))
107
+
108
+ ## [3.0.16] - 2022-01-24
109
+
110
+ ### Fixed
111
+
112
+ - Ensure to transpile the PostCSS Nesting plugin (tailwindcss/nesting) ([#7080](https://github.com/tailwindlabs/tailwindcss/pull/7080))
113
+ - Improve various warnings ([#7118](https://github.com/tailwindlabs/tailwindcss/pull/7118))
114
+ - Fix grammatical mistake ([cca5a38](https://github.com/tailwindlabs/tailwindcss/commit/cca5a3804e1d3ee0214491921e1aec35bf62a813))
115
+
116
+ ## [3.0.15] - 2022-01-15
117
+
118
+ ### Fixed
119
+
120
+ - Temporarily remove optional chaining in nesting plugin ([#7077](https://github.com/tailwindlabs/tailwindcss/pull/7077))
121
+
122
+ ## [3.0.14] - 2022-01-14
123
+
124
+ ### Added
125
+
126
+ - Show warnings for invalid content config ([#7065](https://github.com/tailwindlabs/tailwindcss/pull/7065))
127
+
128
+ ### Fixed
129
+
130
+ - Only emit utility/component variants when those layers exist ([#7066](https://github.com/tailwindlabs/tailwindcss/pull/7066))
131
+ - Ensure nesting plugins can receive options ([#7016](https://github.com/tailwindlabs/tailwindcss/pull/7016))
132
+
133
+ ## [3.0.13] - 2022-01-11
134
+
135
+ ### Fixed
136
+
137
+ - Fix consecutive builds with at apply producing different CSS ([#6999](https://github.com/tailwindlabs/tailwindcss/pull/6999))
138
+
139
+ ## [3.0.12] - 2022-01-07
140
+
141
+ ### Fixed
142
+
143
+ - Allow use of falsy values in theme config ([#6917](https://github.com/tailwindlabs/tailwindcss/pull/6917))
144
+ - Ensure we can apply classes that are grouped with non-class selectors ([#6922](https://github.com/tailwindlabs/tailwindcss/pull/6922))
145
+ - Improve standalone CLI compatibility on Linux by switching to the `linuxstatic` build target ([#6914](https://github.com/tailwindlabs/tailwindcss/pull/6914))
146
+ - Ensure `@apply` works consistently with or without `@layer` ([#6938](https://github.com/tailwindlabs/tailwindcss/pull/6938))
147
+ - Only emit defaults when using base layer ([#6926](https://github.com/tailwindlabs/tailwindcss/pull/6926))
148
+ - Emit plugin defaults regardless of usage ([#6926](https://github.com/tailwindlabs/tailwindcss/pull/6926))
149
+ - Move default border color back to preflight ([#6926](https://github.com/tailwindlabs/tailwindcss/pull/6926))
150
+ - Change `experimental.optimizeUniversalDefaults` to only work with `@tailwind base` ([#6926](https://github.com/tailwindlabs/tailwindcss/pull/6926))
151
+
152
+ ## [3.0.11] - 2022-01-05
153
+
154
+ ### Fixed
155
+
156
+ - Preserve casing of CSS variables added by plugins ([#6888](https://github.com/tailwindlabs/tailwindcss/pull/6888))
157
+ - Ignore content paths that are passed in but don't actually exist ([#6901](https://github.com/tailwindlabs/tailwindcss/pull/6901))
158
+ - Revert change that applies Tailwind's defaults in isolated environments like CSS modules ([9fdc391](https://github.com/tailwindlabs/tailwindcss/commit/9fdc391d4ff93e7e350f5ce439060176b1f0162f))
159
+
160
+ ## [3.0.10] - 2022-01-04
161
+
162
+ ### Fixed
163
+
164
+ - Fix `@apply` in files without `@tailwind` directives ([#6580](https://github.com/tailwindlabs/tailwindcss/pull/6580), [#6875](https://github.com/tailwindlabs/tailwindcss/pull/6875))
165
+ - CLI: avoid unnecessary writes to output files ([#6550](https://github.com/tailwindlabs/tailwindcss/pull/6550))
166
+
167
+ ### Added
168
+
169
+ - Allow piping data into the CLI ([#6876](https://github.com/tailwindlabs/tailwindcss/pull/6876))
170
+
171
+ ## [3.0.9] - 2022-01-03
172
+
173
+ ### Fixed
174
+
12
175
  - Improve `DEBUG` flag ([#6797](https://github.com/tailwindlabs/tailwindcss/pull/6797), [#6804](https://github.com/tailwindlabs/tailwindcss/pull/6804))
13
176
  - Ensure we can use `<` and `>` characters in modifiers ([#6851](https://github.com/tailwindlabs/tailwindcss/pull/6851))
14
177
  - Validate `theme()` works in arbitrary values ([#6852](https://github.com/tailwindlabs/tailwindcss/pull/6852))
15
178
  - Properly detect `theme()` value usage in arbitrary properties ([#6854](https://github.com/tailwindlabs/tailwindcss/pull/6854))
16
179
  - Improve collapsing of duplicate declarations ([#6856](https://github.com/tailwindlabs/tailwindcss/pull/6856))
17
- - Remove the watching context ([#6858](https://github.com/tailwindlabs/tailwindcss/pull/6858))
180
+ - Remove support for `TAILWIND_MODE=watch` ([#6858](https://github.com/tailwindlabs/tailwindcss/pull/6858))
18
181
 
19
182
  ## [3.0.8] - 2021-12-28
20
183
 
@@ -1756,7 +1919,23 @@ No release notes
1756
1919
 
1757
1920
  - Everything!
1758
1921
 
1759
- [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.8...HEAD
1922
+ [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.24...HEAD
1923
+ [3.0.24]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.23...v3.0.24
1924
+ [3.0.23]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.22...v3.0.23
1925
+ [3.0.22]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.21...v3.0.22
1926
+ [3.0.21]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.20...v3.0.21
1927
+ [3.0.20]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.19...v3.0.20
1928
+ [3.0.19]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.18...v3.0.19
1929
+ [3.0.18]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.17...v3.0.18
1930
+ [3.0.17]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.16...v3.0.17
1931
+ [3.0.16]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.15...v3.0.16
1932
+ [3.0.15]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.14...v3.0.15
1933
+ [3.0.14]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.13...v3.0.14
1934
+ [3.0.13]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.12...v3.0.13
1935
+ [3.0.12]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.11...v3.0.12
1936
+ [3.0.11]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.10...v3.0.11
1937
+ [3.0.10]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.9...v3.0.10
1938
+ [3.0.9]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.8...v3.0.9
1760
1939
  [3.0.8]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.7...v3.0.8
1761
1940
  [3.0.7]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.6...v3.0.7
1762
1941
  [3.0.6]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.5...v3.0.6
package/LICENSE CHANGED
@@ -1,7 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) Adam Wathan <adam.wathan@gmail.com>
4
- Copyright (c) Jonathan Reinink <jonathan@reinink.ca>
3
+ Copyright (c) Tailwind Labs, Inc.
5
4
 
6
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
7
6
  of this software and associated documentation files (the "Software"), to deal
package/colors.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { DefaultColors } from './types/generated/colors'
2
+ declare const colors: DefaultColors
3
+ export = colors
@@ -0,0 +1,3 @@
1
+ import type { Config } from './types/config'
2
+ declare const config: Config
3
+ export = config
@@ -0,0 +1,3 @@
1
+ import type { Config } from './types/config'
2
+ declare const theme: Config['theme']
3
+ export = theme
@@ -5,11 +5,11 @@ Object.defineProperty(exports, "__esModule", {
5
5
  exports.lazyAutoprefixer = lazyAutoprefixer;
6
6
  exports.lazyCssnano = lazyCssnano;
7
7
  exports.postcss = void 0;
8
- let postcss = require('postcss');
8
+ let postcss = require("postcss");
9
9
  exports.postcss = postcss;
10
10
  function lazyAutoprefixer() {
11
- return require('autoprefixer');
11
+ return require("autoprefixer");
12
12
  }
13
13
  function lazyCssnano() {
14
- return require('cssnano');
14
+ return require("cssnano");
15
15
  }