tailwindcss 0.0.0-insiders.f9fb2ce → 0.0.0-insiders.fa3f45f

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 (185) hide show
  1. package/LICENSE +1 -2
  2. package/README.md +18 -15
  3. package/dist/chunk-4V6TN65S.mjs +35 -0
  4. package/dist/chunk-G32FJCSR.mjs +1 -0
  5. package/dist/chunk-HTB5LLOP.mjs +1 -0
  6. package/dist/colors-b_6i0Oi7.d.ts +295 -0
  7. package/dist/colors.d.mts +295 -0
  8. package/dist/colors.d.ts +5 -0
  9. package/dist/colors.js +1 -0
  10. package/dist/colors.mjs +1 -0
  11. package/dist/default-theme.d.mts +1147 -0
  12. package/dist/default-theme.d.ts +1147 -0
  13. package/dist/default-theme.js +1 -0
  14. package/dist/default-theme.mjs +1 -0
  15. package/dist/flatten-color-palette.d.mts +6 -0
  16. package/dist/flatten-color-palette.d.ts +6 -0
  17. package/dist/flatten-color-palette.js +3 -0
  18. package/dist/flatten-color-palette.mjs +1 -0
  19. package/dist/lib.d.mts +351 -0
  20. package/dist/lib.d.ts +3 -0
  21. package/dist/lib.js +35 -0
  22. package/dist/lib.mjs +1 -0
  23. package/dist/plugin.d.mts +11 -0
  24. package/dist/plugin.d.ts +131 -0
  25. package/dist/plugin.js +1 -0
  26. package/dist/plugin.mjs +1 -0
  27. package/dist/resolve-config-BIFUA2FY.d.ts +29 -0
  28. package/dist/resolve-config-QUZ9b-Gn.d.mts +190 -0
  29. package/dist/types-WlZgYgM8.d.mts +125 -0
  30. package/index.css +896 -0
  31. package/package.json +76 -100
  32. package/preflight.css +393 -0
  33. package/theme.css +462 -0
  34. package/CHANGELOG.md +0 -1816
  35. package/base.css +0 -1
  36. package/colors.js +0 -1
  37. package/components.css +0 -1
  38. package/defaultConfig.js +0 -1
  39. package/defaultTheme.js +0 -1
  40. package/lib/cli-peer-dependencies.js +0 -15
  41. package/lib/cli.js +0 -706
  42. package/lib/constants.js +0 -37
  43. package/lib/corePluginList.js +0 -174
  44. package/lib/corePlugins.js +0 -3562
  45. package/lib/css/LICENSE +0 -25
  46. package/lib/css/preflight.css +0 -366
  47. package/lib/featureFlags.js +0 -60
  48. package/lib/index.js +0 -32
  49. package/lib/lib/collapseAdjacentRules.js +0 -41
  50. package/lib/lib/collapseDuplicateDeclarations.js +0 -29
  51. package/lib/lib/detectNesting.js +0 -19
  52. package/lib/lib/evaluateTailwindFunctions.js +0 -167
  53. package/lib/lib/expandApplyAtRules.js +0 -228
  54. package/lib/lib/expandTailwindAtRules.js +0 -245
  55. package/lib/lib/generateRules.js +0 -493
  56. package/lib/lib/getModuleDependencies.js +0 -48
  57. package/lib/lib/normalizeTailwindDirectives.js +0 -76
  58. package/lib/lib/resolveDefaultsAtRules.js +0 -125
  59. package/lib/lib/setupContextUtils.js +0 -860
  60. package/lib/lib/setupTrackingContext.js +0 -170
  61. package/lib/lib/setupWatchingContext.js +0 -288
  62. package/lib/lib/sharedState.js +0 -19
  63. package/lib/lib/substituteScreenAtRules.js +0 -24
  64. package/lib/processTailwindFeatures.js +0 -51
  65. package/lib/public/colors.js +0 -329
  66. package/lib/public/create-plugin.js +0 -13
  67. package/lib/public/default-config.js +0 -14
  68. package/lib/public/default-theme.js +0 -14
  69. package/lib/public/resolve-config.js +0 -19
  70. package/lib/util/bigSign.js +0 -8
  71. package/lib/util/buildMediaQuery.js +0 -31
  72. package/lib/util/cloneDeep.js +0 -19
  73. package/lib/util/cloneNodes.js +0 -14
  74. package/lib/util/color.js +0 -84
  75. package/lib/util/configurePlugins.js +0 -18
  76. package/lib/util/createPlugin.js +0 -30
  77. package/lib/util/createUtilityPlugin.js +0 -53
  78. package/lib/util/dataTypes.js +0 -211
  79. package/lib/util/defaults.js +0 -16
  80. package/lib/util/escapeClassName.js +0 -19
  81. package/lib/util/escapeCommas.js +0 -8
  82. package/lib/util/flattenColorPalette.js +0 -19
  83. package/lib/util/formatVariantSelector.js +0 -102
  84. package/lib/util/getAllConfigs.js +0 -29
  85. package/lib/util/hashConfig.js +0 -16
  86. package/lib/util/isKeyframeRule.js +0 -8
  87. package/lib/util/isPlainObject.js +0 -12
  88. package/lib/util/log.js +0 -47
  89. package/lib/util/nameClass.js +0 -31
  90. package/lib/util/negateValue.js +0 -19
  91. package/lib/util/normalizeConfig.js +0 -208
  92. package/lib/util/parseAnimationValue.js +0 -89
  93. package/lib/util/parseDependency.js +0 -63
  94. package/lib/util/parseObjectStyles.js +0 -31
  95. package/lib/util/pluginUtils.js +0 -185
  96. package/lib/util/prefixSelector.js +0 -21
  97. package/lib/util/resolveConfig.js +0 -234
  98. package/lib/util/resolveConfigPath.js +0 -52
  99. package/lib/util/responsive.js +0 -19
  100. package/lib/util/tap.js +0 -9
  101. package/lib/util/toColorValue.js +0 -9
  102. package/lib/util/toPath.js +0 -9
  103. package/lib/util/transformThemeValue.js +0 -63
  104. package/lib/util/withAlphaVariable.js +0 -67
  105. package/nesting/README.md +0 -42
  106. package/nesting/index.js +0 -12
  107. package/nesting/plugin.js +0 -41
  108. package/peers/index.js +0 -75407
  109. package/plugin.js +0 -1
  110. package/prettier.config.js +0 -19
  111. package/resolveConfig.js +0 -1
  112. package/screens.css +0 -1
  113. package/scripts/create-plugin-list.js +0 -10
  114. package/scripts/install-integrations.js +0 -27
  115. package/scripts/rebuildFixtures.js +0 -68
  116. package/src/cli-peer-dependencies.js +0 -9
  117. package/src/cli.js +0 -768
  118. package/src/constants.js +0 -17
  119. package/src/corePluginList.js +0 -1
  120. package/src/corePlugins.js +0 -2291
  121. package/src/css/LICENSE +0 -25
  122. package/src/css/preflight.css +0 -366
  123. package/src/featureFlags.js +0 -54
  124. package/src/index.js +0 -34
  125. package/src/lib/collapseAdjacentRules.js +0 -39
  126. package/src/lib/collapseDuplicateDeclarations.js +0 -28
  127. package/src/lib/detectNesting.js +0 -20
  128. package/src/lib/evaluateTailwindFunctions.js +0 -195
  129. package/src/lib/expandApplyAtRules.js +0 -251
  130. package/src/lib/expandTailwindAtRules.js +0 -252
  131. package/src/lib/generateRules.js +0 -495
  132. package/src/lib/getModuleDependencies.js +0 -39
  133. package/src/lib/normalizeTailwindDirectives.js +0 -78
  134. package/src/lib/resolveDefaultsAtRules.js +0 -121
  135. package/src/lib/setupContextUtils.js +0 -853
  136. package/src/lib/setupTrackingContext.js +0 -182
  137. package/src/lib/setupWatchingContext.js +0 -311
  138. package/src/lib/sharedState.js +0 -10
  139. package/src/lib/substituteScreenAtRules.js +0 -16
  140. package/src/processTailwindFeatures.js +0 -48
  141. package/src/public/colors.js +0 -300
  142. package/src/public/create-plugin.js +0 -2
  143. package/src/public/default-config.js +0 -4
  144. package/src/public/default-theme.js +0 -4
  145. package/src/public/resolve-config.js +0 -7
  146. package/src/util/bigSign.js +0 -3
  147. package/src/util/buildMediaQuery.js +0 -24
  148. package/src/util/cloneDeep.js +0 -11
  149. package/src/util/cloneNodes.js +0 -11
  150. package/src/util/color.js +0 -56
  151. package/src/util/configurePlugins.js +0 -23
  152. package/src/util/createPlugin.js +0 -27
  153. package/src/util/createUtilityPlugin.js +0 -37
  154. package/src/util/dataTypes.js +0 -230
  155. package/src/util/defaults.js +0 -11
  156. package/src/util/escapeClassName.js +0 -8
  157. package/src/util/escapeCommas.js +0 -3
  158. package/src/util/flattenColorPalette.js +0 -13
  159. package/src/util/formatVariantSelector.js +0 -105
  160. package/src/util/getAllConfigs.js +0 -19
  161. package/src/util/hashConfig.js +0 -5
  162. package/src/util/isKeyframeRule.js +0 -3
  163. package/src/util/isPlainObject.js +0 -8
  164. package/src/util/log.js +0 -25
  165. package/src/util/nameClass.js +0 -26
  166. package/src/util/negateValue.js +0 -16
  167. package/src/util/normalizeConfig.js +0 -249
  168. package/src/util/parseAnimationValue.js +0 -68
  169. package/src/util/parseDependency.js +0 -49
  170. package/src/util/parseObjectStyles.js +0 -19
  171. package/src/util/pluginUtils.js +0 -190
  172. package/src/util/prefixSelector.js +0 -12
  173. package/src/util/resolveConfig.js +0 -229
  174. package/src/util/resolveConfigPath.js +0 -55
  175. package/src/util/responsive.js +0 -10
  176. package/src/util/tap.js +0 -4
  177. package/src/util/toColorValue.js +0 -3
  178. package/src/util/toPath.js +0 -4
  179. package/src/util/transformThemeValue.js +0 -52
  180. package/src/util/withAlphaVariable.js +0 -49
  181. package/stubs/defaultConfig.stub.js +0 -932
  182. package/stubs/defaultPostCssConfig.stub.js +0 -6
  183. package/stubs/simpleConfig.stub.js +0 -7
  184. package/tailwind.css +0 -5
  185. package/variants.css +0 -1
package/src/css/LICENSE DELETED
@@ -1,25 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Nicolas Gallagher
4
- Copyright (c) Jonathan Neal
5
- Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
6
- Copyright (c) Adam Wathan
7
- Copyright (c) Jonathan Reinink
8
-
9
- Permission is hereby granted, free of charge, to any person obtaining a copy
10
- of this software and associated documentation files (the "Software"), to deal
11
- in the Software without restriction, including without limitation the rights
12
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- copies of the Software, and to permit persons to whom the Software is
14
- furnished to do so, subject to the following conditions:
15
-
16
- The above copyright notice and this permission notice shall be included in all
17
- copies or substantial portions of the Software.
18
-
19
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- SOFTWARE.
@@ -1,366 +0,0 @@
1
- /*
2
- 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
3
- 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
4
- */
5
-
6
- *,
7
- ::before,
8
- ::after {
9
- box-sizing: border-box; /* 1 */
10
- border-width: 0; /* 2 */
11
- border-style: solid; /* 2 */
12
- border-color: currentColor; /* 2 */
13
- }
14
-
15
- ::before,
16
- ::after {
17
- --tw-content: '';
18
- }
19
-
20
- /*
21
- 1. Use a consistent sensible line-height in all browsers.
22
- 2. Prevent adjustments of font size after orientation changes in iOS.
23
- 3. Use a more readable tab size.
24
- 4. Use the user's configured `sans` font-family by default.
25
- */
26
-
27
- html {
28
- line-height: 1.5; /* 1 */
29
- -webkit-text-size-adjust: 100%; /* 2 */
30
- -moz-tab-size: 4; /* 3 */
31
- tab-size: 4; /* 3 */
32
- font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
33
- }
34
-
35
- /*
36
- 1. Remove the margin in all browsers.
37
- 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
38
- */
39
-
40
- body {
41
- margin: 0; /* 1 */
42
- line-height: inherit; /* 2 */
43
- }
44
-
45
- /*
46
- 1. Add the correct height in Firefox.
47
- 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
48
- 3. Ensure horizontal rules are visible by default.
49
- */
50
-
51
- hr {
52
- height: 0; /* 1 */
53
- color: inherit; /* 2 */
54
- border-top-width: 1px; /* 3 */
55
- }
56
-
57
- /*
58
- Add the correct text decoration in Chrome, Edge, and Safari.
59
- */
60
-
61
- abbr[title] {
62
- text-decoration: underline dotted;
63
- }
64
-
65
- /*
66
- Remove the default font size and weight for headings.
67
- */
68
-
69
- h1,
70
- h2,
71
- h3,
72
- h4,
73
- h5,
74
- h6 {
75
- font-size: inherit;
76
- font-weight: inherit;
77
- }
78
-
79
- /*
80
- Reset links to optimize for opt-in styling instead of opt-out.
81
- */
82
-
83
- a {
84
- color: inherit;
85
- text-decoration: inherit;
86
- }
87
-
88
- /*
89
- Add the correct font weight in Edge and Safari.
90
- */
91
-
92
- b,
93
- strong {
94
- font-weight: bolder;
95
- }
96
-
97
- /*
98
- 1. Use the user's configured `mono` font family by default.
99
- 2. Correct the odd `em` font sizing in all browsers.
100
- */
101
-
102
- code,
103
- kbd,
104
- samp,
105
- pre {
106
- font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */
107
- font-size: 1em; /* 2 */
108
- }
109
-
110
- /*
111
- Add the correct font size in all browsers.
112
- */
113
-
114
- small {
115
- font-size: 80%;
116
- }
117
-
118
- /*
119
- Prevent `sub` and `sup` elements from affecting the line height in all browsers.
120
- */
121
-
122
- sub,
123
- sup {
124
- font-size: 75%;
125
- line-height: 0;
126
- position: relative;
127
- vertical-align: baseline;
128
- }
129
-
130
- sub {
131
- bottom: -0.25em;
132
- }
133
-
134
- sup {
135
- top: -0.5em;
136
- }
137
-
138
- /*
139
- 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
140
- 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
141
- 3. Remove gaps between table borders by default.
142
- */
143
-
144
- table {
145
- text-indent: 0; /* 1 */
146
- border-color: inherit; /* 2 */
147
- border-collapse: collapse; /* 3 */
148
- }
149
-
150
- /*
151
- 1. Change the font styles in all browsers.
152
- 2. Remove the margin in Firefox and Safari.
153
- 3. Remove default padding in all browsers.
154
- */
155
-
156
- button,
157
- input,
158
- optgroup,
159
- select,
160
- textarea {
161
- font-family: inherit; /* 1 */
162
- font-size: 100%; /* 1 */
163
- line-height: inherit; /* 1 */
164
- color: inherit; /* 1 */
165
- margin: 0; /* 2 */
166
- padding: 0; /* 3 */
167
- }
168
-
169
- /*
170
- Remove the inheritance of text transform in Edge and Firefox.
171
- */
172
-
173
- button,
174
- select {
175
- text-transform: none;
176
- }
177
-
178
- /*
179
- 1. Correct the inability to style clickable types in iOS and Safari.
180
- 2. Remove default button styles.
181
- */
182
-
183
- button,
184
- [type='button'],
185
- [type='reset'],
186
- [type='submit'] {
187
- -webkit-appearance: button; /* 1 */
188
- background-color: transparent; /* 2 */
189
- background-image: none; /* 2 */
190
- }
191
-
192
- /*
193
- Use the modern Firefox focus style for all focusable elements.
194
- */
195
-
196
- :-moz-focusring {
197
- outline: auto;
198
- }
199
-
200
- /*
201
- Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
202
- */
203
-
204
- :-moz-ui-invalid {
205
- box-shadow: none;
206
- }
207
-
208
- /*
209
- Add the correct vertical alignment in Chrome and Firefox.
210
- */
211
-
212
- progress {
213
- vertical-align: baseline;
214
- }
215
-
216
- /*
217
- Correct the cursor style of increment and decrement buttons in Safari.
218
- */
219
-
220
- ::-webkit-inner-spin-button,
221
- ::-webkit-outer-spin-button {
222
- height: auto;
223
- }
224
-
225
- /*
226
- 1. Correct the odd appearance in Chrome and Safari.
227
- 2. Correct the outline style in Safari.
228
- */
229
-
230
- [type='search'] {
231
- -webkit-appearance: textfield; /* 1 */
232
- outline-offset: -2px; /* 2 */
233
- }
234
-
235
- /*
236
- Remove the inner padding in Chrome and Safari on macOS.
237
- */
238
-
239
- ::-webkit-search-decoration {
240
- -webkit-appearance: none;
241
- }
242
-
243
- /*
244
- 1. Correct the inability to style clickable types in iOS and Safari.
245
- 2. Change font properties to `inherit` in Safari.
246
- */
247
-
248
- ::-webkit-file-upload-button {
249
- -webkit-appearance: button; /* 1 */
250
- font: inherit; /* 2 */
251
- }
252
-
253
- /*
254
- Add the correct display in Chrome and Safari.
255
- */
256
-
257
- summary {
258
- display: list-item;
259
- }
260
-
261
- /*
262
- Removes the default spacing and border for appropriate elements.
263
- */
264
-
265
- blockquote,
266
- dl,
267
- dd,
268
- h1,
269
- h2,
270
- h3,
271
- h4,
272
- h5,
273
- h6,
274
- hr,
275
- figure,
276
- p,
277
- pre {
278
- margin: 0;
279
- }
280
-
281
- fieldset {
282
- margin: 0;
283
- padding: 0;
284
- }
285
-
286
- legend {
287
- padding: 0;
288
- }
289
-
290
- ol,
291
- ul {
292
- list-style: none;
293
- margin: 0;
294
- padding: 0;
295
- }
296
-
297
- /*
298
- Prevent resizing textareas horizontally by default.
299
- */
300
-
301
- textarea {
302
- resize: vertical;
303
- }
304
-
305
- /*
306
- 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
307
- 2. Set the default placeholder color to the user's configured gray 400 color.
308
- */
309
-
310
- input::placeholder,
311
- textarea::placeholder {
312
- opacity: 1; /* 1 */
313
- color: theme('colors.gray.400', #9ca3af); /* 2 */
314
- }
315
-
316
- /*
317
- Set the default cursor for buttons.
318
- */
319
-
320
- button,
321
- [role="button"] {
322
- cursor: pointer;
323
- }
324
-
325
- /*
326
- Make sure disabled buttons don't get the pointer cursor.
327
- */
328
- :disabled {
329
- cursor: default;
330
- }
331
-
332
- /*
333
- 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
334
- 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
335
- This can trigger a poorly considered lint error in some tools but is included by design.
336
- */
337
-
338
- img,
339
- svg,
340
- video,
341
- canvas,
342
- audio,
343
- iframe,
344
- embed,
345
- object {
346
- display: block; /* 1 */
347
- vertical-align: middle; /* 2 */
348
- }
349
-
350
- /*
351
- Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
352
- */
353
-
354
- img,
355
- video {
356
- max-width: 100%;
357
- height: auto;
358
- }
359
-
360
- /*
361
- Ensure the default browser behavior of the `hidden` attribute.
362
- */
363
-
364
- [hidden] {
365
- display: none;
366
- }
@@ -1,54 +0,0 @@
1
- import chalk from 'chalk'
2
- import log from './util/log'
3
-
4
- let defaults = {
5
- optimizeUniversalDefaults: true,
6
- }
7
-
8
- let featureFlags = {
9
- future: [],
10
- experimental: ['optimizeUniversalDefaults'],
11
- }
12
-
13
- export function flagEnabled(config, flag) {
14
- if (featureFlags.future.includes(flag)) {
15
- return config.future === 'all' || (config?.future?.[flag] ?? defaults[flag] ?? false)
16
- }
17
-
18
- if (featureFlags.experimental.includes(flag)) {
19
- return (
20
- config.experimental === 'all' || (config?.experimental?.[flag] ?? defaults[flag] ?? false)
21
- )
22
- }
23
-
24
- return false
25
- }
26
-
27
- function experimentalFlagsEnabled(config) {
28
- if (config.experimental === 'all') {
29
- return featureFlags.experimental
30
- }
31
-
32
- return Object.keys(config?.experimental ?? {}).filter(
33
- (flag) => featureFlags.experimental.includes(flag) && config.experimental[flag]
34
- )
35
- }
36
-
37
- export function issueFlagNotices(config) {
38
- if (process.env.JEST_WORKER_ID !== undefined) {
39
- return
40
- }
41
-
42
- if (experimentalFlagsEnabled(config).length > 0) {
43
- let changes = experimentalFlagsEnabled(config)
44
- .map((s) => chalk.yellow(s))
45
- .join(', ')
46
-
47
- log.warn('experimental-flags-enabled', [
48
- `You have enabled experimental features: ${changes}`,
49
- 'Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time.',
50
- ])
51
- }
52
- }
53
-
54
- export default featureFlags
package/src/index.js DELETED
@@ -1,34 +0,0 @@
1
- import setupTrackingContext from './lib/setupTrackingContext'
2
- import setupWatchingContext from './lib/setupWatchingContext'
3
- import processTailwindFeatures from './processTailwindFeatures'
4
- import { env } from './lib/sharedState'
5
-
6
- module.exports = function tailwindcss(configOrPath) {
7
- return {
8
- postcssPlugin: 'tailwindcss',
9
- plugins: [
10
- env.DEBUG &&
11
- function (root) {
12
- console.log('\n')
13
- console.time('JIT TOTAL')
14
- return root
15
- },
16
- function (root, result) {
17
- let setupContext =
18
- env.TAILWIND_MODE === 'watch'
19
- ? setupWatchingContext(configOrPath)
20
- : setupTrackingContext(configOrPath)
21
-
22
- processTailwindFeatures(setupContext)(root, result)
23
- },
24
- env.DEBUG &&
25
- function (root) {
26
- console.timeEnd('JIT TOTAL')
27
- console.log('\n')
28
- return root
29
- },
30
- ].filter(Boolean),
31
- }
32
- }
33
-
34
- module.exports.postcss = true
@@ -1,39 +0,0 @@
1
- let comparisonMap = {
2
- atrule: ['name', 'params'],
3
- rule: ['selector'],
4
- }
5
- let types = new Set(Object.keys(comparisonMap))
6
-
7
- export default function collapseAdjacentRules() {
8
- return (root) => {
9
- let currentRule = null
10
- root.each((node) => {
11
- if (!types.has(node.type)) {
12
- currentRule = null
13
- return
14
- }
15
-
16
- if (currentRule === null) {
17
- currentRule = node
18
- return
19
- }
20
-
21
- let properties = comparisonMap[node.type]
22
-
23
- if (node.type === 'atrule' && node.name === 'font-face') {
24
- currentRule = node
25
- } else if (
26
- properties.every(
27
- (property) =>
28
- (node[property] ?? '').replace(/\s+/g, ' ') ===
29
- (currentRule[property] ?? '').replace(/\s+/g, ' ')
30
- )
31
- ) {
32
- currentRule.append(node.nodes)
33
- node.remove()
34
- } else {
35
- currentRule = node
36
- }
37
- })
38
- }
39
- }
@@ -1,28 +0,0 @@
1
- export default function collapseDuplicateDeclarations() {
2
- return (root) => {
3
- root.walkRules((node) => {
4
- let seen = new Map()
5
- let droppable = new Set([])
6
-
7
- node.walkDecls((decl) => {
8
- // This could happen if we have nested selectors. In that case the
9
- // parent will loop over all its declarations but also the declarations
10
- // of nested rules. With this we ensure that we are shallowly checking
11
- // declarations.
12
- if (decl.parent !== node) {
13
- return
14
- }
15
-
16
- if (seen.has(decl.prop)) {
17
- droppable.add(seen.get(decl.prop))
18
- }
19
-
20
- seen.set(decl.prop, decl)
21
- })
22
-
23
- for (let decl of droppable) {
24
- decl.remove()
25
- }
26
- })
27
- }
28
- }
@@ -1,20 +0,0 @@
1
- export default function (_context) {
2
- return (root, result) => {
3
- let found = false
4
-
5
- root.walkRules((rule) => {
6
- if (found) return false
7
-
8
- rule.walkRules((nestedRule) => {
9
- found = true
10
- nestedRule.warn(
11
- result,
12
- // TODO: Improve this warning message
13
- 'Nested CSS detected, checkout the docs on how to support nesting: https://tailwindcss.com/docs/using-with-preprocessors#nesting'
14
- )
15
-
16
- return false
17
- })
18
- })
19
- }
20
- }