tailwindcss 0.0.0-insiders.fe08e91 → 0.0.0-oxide.6d7c311

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 (186) hide show
  1. package/CHANGELOG.md +384 -3
  2. package/LICENSE +1 -2
  3. package/README.md +12 -8
  4. package/colors.d.ts +3 -0
  5. package/defaultConfig.d.ts +3 -0
  6. package/defaultTheme.d.ts +4 -0
  7. package/lib/cli/build/deps.js +54 -0
  8. package/lib/cli/build/index.js +48 -0
  9. package/lib/cli/build/plugin.js +367 -0
  10. package/lib/cli/build/utils.js +78 -0
  11. package/lib/cli/build/watching.js +178 -0
  12. package/lib/cli/help/index.js +71 -0
  13. package/lib/cli/index.js +239 -0
  14. package/lib/cli/init/index.js +46 -0
  15. package/lib/cli/shared.js +13 -0
  16. package/lib/cli-peer-dependencies.js +20 -7
  17. package/lib/cli.js +4 -740
  18. package/lib/constants.js +27 -20
  19. package/lib/corePluginList.js +6 -3
  20. package/lib/corePlugins.js +2064 -1811
  21. package/lib/css/preflight.css +5 -5
  22. package/lib/featureFlags.js +31 -22
  23. package/lib/index.js +4 -28
  24. package/lib/lib/cacheInvalidation.js +90 -0
  25. package/lib/lib/collapseAdjacentRules.js +27 -9
  26. package/lib/lib/collapseDuplicateDeclarations.js +12 -9
  27. package/lib/lib/content.js +176 -0
  28. package/lib/lib/defaultExtractor.js +225 -31
  29. package/lib/lib/detectNesting.js +13 -10
  30. package/lib/lib/evaluateTailwindFunctions.js +118 -55
  31. package/lib/lib/expandApplyAtRules.js +439 -190
  32. package/lib/lib/expandTailwindAtRules.js +151 -134
  33. package/lib/lib/findAtConfigPath.js +44 -0
  34. package/lib/lib/generateRules.js +454 -187
  35. package/lib/lib/getModuleDependencies.js +11 -8
  36. package/lib/lib/normalizeTailwindDirectives.js +36 -32
  37. package/lib/lib/offsets.js +217 -0
  38. package/lib/lib/partitionApplyAtRules.js +56 -0
  39. package/lib/lib/regex.js +60 -0
  40. package/lib/lib/resolveDefaultsAtRules.js +89 -67
  41. package/lib/lib/setupContextUtils.js +667 -376
  42. package/lib/lib/setupTrackingContext.js +38 -67
  43. package/lib/lib/sharedState.js +27 -14
  44. package/lib/lib/substituteScreenAtRules.js +11 -9
  45. package/lib/oxide/cli.d.js +1 -0
  46. package/lib/oxide/cli.js +2 -0
  47. package/lib/oxide/postcss-plugin.d.js +1 -0
  48. package/lib/oxide/postcss-plugin.js +2 -0
  49. package/lib/plugin.js +48 -0
  50. package/{nesting → lib/postcss-plugins/nesting}/README.md +2 -2
  51. package/lib/postcss-plugins/nesting/index.js +19 -0
  52. package/lib/postcss-plugins/nesting/plugin.js +87 -0
  53. package/lib/processTailwindFeatures.js +35 -25
  54. package/lib/public/colors.js +247 -245
  55. package/lib/public/create-plugin.js +6 -4
  56. package/lib/public/default-config.js +7 -5
  57. package/lib/public/default-theme.js +7 -5
  58. package/lib/public/resolve-config.js +8 -5
  59. package/lib/util/bigSign.js +4 -1
  60. package/lib/util/buildMediaQuery.js +11 -6
  61. package/lib/util/cloneDeep.js +7 -6
  62. package/lib/util/cloneNodes.js +21 -3
  63. package/lib/util/color.js +53 -54
  64. package/lib/util/configurePlugins.js +5 -2
  65. package/lib/util/createPlugin.js +6 -6
  66. package/lib/util/createUtilityPlugin.js +12 -14
  67. package/lib/util/dataTypes.js +119 -110
  68. package/lib/util/defaults.js +4 -1
  69. package/lib/util/escapeClassName.js +7 -4
  70. package/lib/util/escapeCommas.js +5 -2
  71. package/lib/util/flattenColorPalette.js +9 -12
  72. package/lib/util/formatVariantSelector.js +184 -85
  73. package/lib/util/getAllConfigs.js +27 -8
  74. package/lib/util/hashConfig.js +6 -3
  75. package/lib/util/isKeyframeRule.js +5 -2
  76. package/lib/util/isPlainObject.js +5 -2
  77. package/lib/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +23 -15
  78. package/lib/util/log.js +20 -14
  79. package/lib/util/nameClass.js +20 -9
  80. package/lib/util/negateValue.js +23 -8
  81. package/lib/util/normalizeConfig.js +116 -72
  82. package/lib/util/normalizeScreens.js +120 -11
  83. package/lib/util/parseAnimationValue.js +42 -40
  84. package/lib/util/parseBoxShadowValue.js +30 -23
  85. package/lib/util/parseDependency.js +38 -56
  86. package/lib/util/parseGlob.js +34 -0
  87. package/lib/util/parseObjectStyles.js +11 -8
  88. package/lib/util/pluginUtils.js +147 -50
  89. package/lib/util/prefixSelector.js +10 -8
  90. package/lib/util/removeAlphaVariables.js +29 -0
  91. package/lib/util/resolveConfig.js +97 -85
  92. package/lib/util/resolveConfigPath.js +11 -9
  93. package/lib/util/responsive.js +8 -5
  94. package/lib/util/splitAtTopLevelOnly.js +43 -0
  95. package/lib/util/tap.js +4 -1
  96. package/lib/util/toColorValue.js +5 -3
  97. package/lib/util/toPath.js +20 -4
  98. package/lib/util/transformThemeValue.js +37 -29
  99. package/lib/util/validateConfig.js +24 -0
  100. package/lib/util/validateFormalSyntax.js +24 -0
  101. package/lib/util/withAlphaVariable.js +23 -15
  102. package/nesting/index.js +2 -12
  103. package/package.json +52 -46
  104. package/peers/index.js +11381 -7950
  105. package/plugin.d.ts +11 -0
  106. package/resolveConfig.d.ts +12 -0
  107. package/scripts/generate-types.js +105 -0
  108. package/scripts/release-channel.js +18 -0
  109. package/scripts/release-notes.js +21 -0
  110. package/scripts/type-utils.js +27 -0
  111. package/src/cli/build/deps.js +56 -0
  112. package/src/cli/build/index.js +49 -0
  113. package/src/cli/build/plugin.js +439 -0
  114. package/src/cli/build/utils.js +76 -0
  115. package/src/cli/build/watching.js +227 -0
  116. package/src/cli/help/index.js +70 -0
  117. package/src/cli/index.js +234 -0
  118. package/src/cli/init/index.js +50 -0
  119. package/src/cli/shared.js +6 -0
  120. package/src/cli-peer-dependencies.js +7 -1
  121. package/src/cli.js +4 -810
  122. package/src/corePluginList.js +1 -1
  123. package/src/corePlugins.js +532 -217
  124. package/src/css/preflight.css +5 -5
  125. package/src/featureFlags.js +15 -9
  126. package/src/index.js +4 -27
  127. package/src/lib/cacheInvalidation.js +52 -0
  128. package/src/lib/collapseAdjacentRules.js +21 -2
  129. package/src/lib/content.js +212 -0
  130. package/src/lib/defaultExtractor.js +196 -33
  131. package/src/lib/evaluateTailwindFunctions.js +78 -7
  132. package/src/lib/expandApplyAtRules.js +482 -183
  133. package/src/lib/expandTailwindAtRules.js +106 -85
  134. package/src/lib/findAtConfigPath.js +48 -0
  135. package/src/lib/generateRules.js +418 -129
  136. package/src/lib/normalizeTailwindDirectives.js +1 -0
  137. package/src/lib/offsets.js +270 -0
  138. package/src/lib/partitionApplyAtRules.js +52 -0
  139. package/src/lib/regex.js +74 -0
  140. package/src/lib/resolveDefaultsAtRules.js +51 -30
  141. package/src/lib/setupContextUtils.js +556 -208
  142. package/src/lib/setupTrackingContext.js +11 -48
  143. package/src/lib/sharedState.js +5 -0
  144. package/src/oxide/cli.d.ts +0 -0
  145. package/src/oxide/cli.ts +1 -0
  146. package/src/oxide/postcss-plugin.d.ts +0 -0
  147. package/src/oxide/postcss-plugin.ts +1 -0
  148. package/src/plugin.js +47 -0
  149. package/src/postcss-plugins/nesting/README.md +42 -0
  150. package/src/postcss-plugins/nesting/index.js +13 -0
  151. package/src/postcss-plugins/nesting/plugin.js +80 -0
  152. package/src/processTailwindFeatures.js +8 -0
  153. package/src/util/buildMediaQuery.js +5 -3
  154. package/src/util/cloneNodes.js +19 -2
  155. package/src/util/color.js +25 -21
  156. package/src/util/dataTypes.js +29 -21
  157. package/src/util/formatVariantSelector.js +184 -61
  158. package/src/util/getAllConfigs.js +19 -0
  159. package/src/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +1 -1
  160. package/src/util/log.js +8 -8
  161. package/src/util/nameClass.js +4 -0
  162. package/src/util/negateValue.js +11 -3
  163. package/src/util/normalizeConfig.js +44 -6
  164. package/src/util/normalizeScreens.js +99 -4
  165. package/src/util/parseBoxShadowValue.js +4 -3
  166. package/src/util/parseDependency.js +37 -42
  167. package/src/util/parseGlob.js +24 -0
  168. package/src/util/pluginUtils.js +132 -10
  169. package/src/util/prefixSelector.js +7 -5
  170. package/src/util/removeAlphaVariables.js +24 -0
  171. package/src/util/resolveConfig.js +70 -32
  172. package/src/util/splitAtTopLevelOnly.js +45 -0
  173. package/src/util/toPath.js +1 -1
  174. package/src/util/transformThemeValue.js +13 -3
  175. package/src/util/validateConfig.js +13 -0
  176. package/src/util/validateFormalSyntax.js +34 -0
  177. package/src/util/withAlphaVariable.js +1 -1
  178. package/stubs/defaultConfig.stub.js +167 -164
  179. package/stubs/simpleConfig.stub.js +1 -0
  180. package/types/config.d.ts +362 -0
  181. package/types/generated/.gitkeep +0 -0
  182. package/types/generated/colors.d.ts +276 -0
  183. package/types/generated/corePluginList.d.ts +1 -0
  184. package/types/generated/default-theme.d.ts +342 -0
  185. package/types/index.d.ts +7 -0
  186. package/nesting/plugin.js +0 -41
@@ -0,0 +1,342 @@
1
+ import { Config } from '../../types'
2
+ type CSSDeclarationList = Record<string, string>
3
+ export type DefaultTheme = Config['theme'] & {
4
+ animation: Record<'none' | 'spin' | 'ping' | 'pulse' | 'bounce', string>
5
+ aria: Record<
6
+ | 'checked'
7
+ | 'disabled'
8
+ | 'expanded'
9
+ | 'hidden'
10
+ | 'pressed'
11
+ | 'readonly'
12
+ | 'required'
13
+ | 'selected',
14
+ string
15
+ >
16
+ aspectRatio: Record<'auto' | 'square' | 'video', string>
17
+ backgroundImage: Record<
18
+ | 'none'
19
+ | 'gradient-to-t'
20
+ | 'gradient-to-tr'
21
+ | 'gradient-to-r'
22
+ | 'gradient-to-br'
23
+ | 'gradient-to-b'
24
+ | 'gradient-to-bl'
25
+ | 'gradient-to-l'
26
+ | 'gradient-to-tl',
27
+ string
28
+ >
29
+ backgroundPosition: Record<
30
+ | 'bottom'
31
+ | 'center'
32
+ | 'left'
33
+ | 'left-bottom'
34
+ | 'left-top'
35
+ | 'right'
36
+ | 'right-bottom'
37
+ | 'right-top'
38
+ | 'top',
39
+ string
40
+ >
41
+ backgroundSize: Record<'auto' | 'cover' | 'contain', string>
42
+ blur: Record<'0' | 'none' | 'sm' | 'DEFAULT' | 'md' | 'lg' | 'xl' | '2xl' | '3xl', string>
43
+ borderRadius: Record<
44
+ 'none' | 'sm' | 'DEFAULT' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full',
45
+ string
46
+ >
47
+ borderWidth: Record<'0' | '2' | '4' | '8' | 'DEFAULT', string>
48
+ boxShadow: Record<'sm' | 'DEFAULT' | 'md' | 'lg' | 'xl' | '2xl' | 'inner' | 'none', string>
49
+ brightness: Record<
50
+ '0' | '50' | '75' | '90' | '95' | '100' | '105' | '110' | '125' | '150' | '200',
51
+ string
52
+ >
53
+ columns: Record<
54
+ | '1'
55
+ | '2'
56
+ | '3'
57
+ | '4'
58
+ | '5'
59
+ | '6'
60
+ | '7'
61
+ | '8'
62
+ | '9'
63
+ | '10'
64
+ | '11'
65
+ | '12'
66
+ | 'auto'
67
+ | '3xs'
68
+ | '2xs'
69
+ | 'xs'
70
+ | 'sm'
71
+ | 'md'
72
+ | 'lg'
73
+ | 'xl'
74
+ | '2xl'
75
+ | '3xl'
76
+ | '4xl'
77
+ | '5xl'
78
+ | '6xl'
79
+ | '7xl',
80
+ string
81
+ >
82
+ content: Record<'none', string>
83
+ contrast: Record<'0' | '50' | '75' | '100' | '125' | '150' | '200', string>
84
+ cursor: Record<
85
+ | 'auto'
86
+ | 'default'
87
+ | 'pointer'
88
+ | 'wait'
89
+ | 'text'
90
+ | 'move'
91
+ | 'help'
92
+ | 'not-allowed'
93
+ | 'none'
94
+ | 'context-menu'
95
+ | 'progress'
96
+ | 'cell'
97
+ | 'crosshair'
98
+ | 'vertical-text'
99
+ | 'alias'
100
+ | 'copy'
101
+ | 'no-drop'
102
+ | 'grab'
103
+ | 'grabbing'
104
+ | 'all-scroll'
105
+ | 'col-resize'
106
+ | 'row-resize'
107
+ | 'n-resize'
108
+ | 'e-resize'
109
+ | 's-resize'
110
+ | 'w-resize'
111
+ | 'ne-resize'
112
+ | 'nw-resize'
113
+ | 'se-resize'
114
+ | 'sw-resize'
115
+ | 'ew-resize'
116
+ | 'ns-resize'
117
+ | 'nesw-resize'
118
+ | 'nwse-resize'
119
+ | 'zoom-in'
120
+ | 'zoom-out',
121
+ string
122
+ >
123
+ dropShadow: Record<'sm' | 'DEFAULT' | 'md' | 'lg' | 'xl' | '2xl' | 'none', string | string[]>
124
+ flex: Record<'1' | 'auto' | 'initial' | 'none', string>
125
+ flexGrow: Record<'0' | 'DEFAULT', string>
126
+ flexShrink: Record<'0' | 'DEFAULT', string>
127
+ fontFamily: Record<'sans' | 'serif' | 'mono', string[]>
128
+ fontSize: Record<
129
+ | 'xs'
130
+ | 'sm'
131
+ | 'base'
132
+ | 'lg'
133
+ | 'xl'
134
+ | '2xl'
135
+ | '3xl'
136
+ | '4xl'
137
+ | '5xl'
138
+ | '6xl'
139
+ | '7xl'
140
+ | '8xl'
141
+ | '9xl',
142
+ [string, { lineHeight: string }]
143
+ >
144
+ fontWeight: Record<
145
+ | 'thin'
146
+ | 'extralight'
147
+ | 'light'
148
+ | 'normal'
149
+ | 'medium'
150
+ | 'semibold'
151
+ | 'bold'
152
+ | 'extrabold'
153
+ | 'black',
154
+ string
155
+ >
156
+ grayscale: Record<'0' | 'DEFAULT', string>
157
+ gridAutoColumns: Record<'auto' | 'min' | 'max' | 'fr', string>
158
+ gridAutoRows: Record<'auto' | 'min' | 'max' | 'fr', string>
159
+ gridColumn: Record<
160
+ | 'auto'
161
+ | 'span-1'
162
+ | 'span-2'
163
+ | 'span-3'
164
+ | 'span-4'
165
+ | 'span-5'
166
+ | 'span-6'
167
+ | 'span-7'
168
+ | 'span-8'
169
+ | 'span-9'
170
+ | 'span-10'
171
+ | 'span-11'
172
+ | 'span-12'
173
+ | 'span-full',
174
+ string
175
+ >
176
+ gridColumnEnd: Record<
177
+ '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | 'auto',
178
+ string
179
+ >
180
+ gridColumnStart: Record<
181
+ '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | 'auto',
182
+ string
183
+ >
184
+ gridRow: Record<
185
+ 'auto' | 'span-1' | 'span-2' | 'span-3' | 'span-4' | 'span-5' | 'span-6' | 'span-full',
186
+ string
187
+ >
188
+ gridRowEnd: Record<'1' | '2' | '3' | '4' | '5' | '6' | '7' | 'auto', string>
189
+ gridRowStart: Record<'1' | '2' | '3' | '4' | '5' | '6' | '7' | 'auto', string>
190
+ gridTemplateColumns: Record<
191
+ '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | 'none',
192
+ string
193
+ >
194
+ gridTemplateRows: Record<'1' | '2' | '3' | '4' | '5' | '6' | 'none', string>
195
+ hueRotate: Record<'0' | '15' | '30' | '60' | '90' | '180', string>
196
+ invert: Record<'0' | 'DEFAULT', string>
197
+ keyframes: Record<'spin' | 'ping' | 'pulse' | 'bounce', Record<string, CSSDeclarationList>>
198
+ letterSpacing: Record<'tighter' | 'tight' | 'normal' | 'wide' | 'wider' | 'widest', string>
199
+ lineHeight: Record<
200
+ | '3'
201
+ | '4'
202
+ | '5'
203
+ | '6'
204
+ | '7'
205
+ | '8'
206
+ | '9'
207
+ | '10'
208
+ | 'none'
209
+ | 'tight'
210
+ | 'snug'
211
+ | 'normal'
212
+ | 'relaxed'
213
+ | 'loose',
214
+ string
215
+ >
216
+ listStyleType: Record<'none' | 'disc' | 'decimal', string>
217
+ minHeight: Record<'0' | 'full' | 'screen' | 'min' | 'max' | 'fit', string>
218
+ minWidth: Record<'0' | 'full' | 'min' | 'max' | 'fit', string>
219
+ objectPosition: Record<
220
+ | 'bottom'
221
+ | 'center'
222
+ | 'left'
223
+ | 'left-bottom'
224
+ | 'left-top'
225
+ | 'right'
226
+ | 'right-bottom'
227
+ | 'right-top'
228
+ | 'top',
229
+ string
230
+ >
231
+ opacity: Record<
232
+ | '0'
233
+ | '5'
234
+ | '10'
235
+ | '20'
236
+ | '25'
237
+ | '30'
238
+ | '40'
239
+ | '50'
240
+ | '60'
241
+ | '70'
242
+ | '75'
243
+ | '80'
244
+ | '90'
245
+ | '95'
246
+ | '100',
247
+ string
248
+ >
249
+ order: Record<
250
+ | '1'
251
+ | '2'
252
+ | '3'
253
+ | '4'
254
+ | '5'
255
+ | '6'
256
+ | '7'
257
+ | '8'
258
+ | '9'
259
+ | '10'
260
+ | '11'
261
+ | '12'
262
+ | 'first'
263
+ | 'last'
264
+ | 'none',
265
+ string
266
+ >
267
+ outlineOffset: Record<'0' | '1' | '2' | '4' | '8', string>
268
+ outlineWidth: Record<'0' | '1' | '2' | '4' | '8', string>
269
+ ringOffsetWidth: Record<'0' | '1' | '2' | '4' | '8', string>
270
+ ringWidth: Record<'0' | '1' | '2' | '4' | '8' | 'DEFAULT', string>
271
+ rotate: Record<'0' | '1' | '2' | '3' | '6' | '12' | '45' | '90' | '180', string>
272
+ saturate: Record<'0' | '50' | '100' | '150' | '200', string>
273
+ scale: Record<'0' | '50' | '75' | '90' | '95' | '100' | '105' | '110' | '125' | '150', string>
274
+ screens: Record<'sm' | 'md' | 'lg' | 'xl' | '2xl', string>
275
+ sepia: Record<'0' | 'DEFAULT', string>
276
+ skew: Record<'0' | '1' | '2' | '3' | '6' | '12', string>
277
+ spacing: Record<
278
+ | '0'
279
+ | '1'
280
+ | '2'
281
+ | '3'
282
+ | '4'
283
+ | '5'
284
+ | '6'
285
+ | '7'
286
+ | '8'
287
+ | '9'
288
+ | '10'
289
+ | '11'
290
+ | '12'
291
+ | '14'
292
+ | '16'
293
+ | '20'
294
+ | '24'
295
+ | '28'
296
+ | '32'
297
+ | '36'
298
+ | '40'
299
+ | '44'
300
+ | '48'
301
+ | '52'
302
+ | '56'
303
+ | '60'
304
+ | '64'
305
+ | '72'
306
+ | '80'
307
+ | '96'
308
+ | 'px'
309
+ | '0.5'
310
+ | '1.5'
311
+ | '2.5'
312
+ | '3.5',
313
+ string
314
+ >
315
+ strokeWidth: Record<'0' | '1' | '2', string>
316
+ textDecorationThickness: Record<'0' | '1' | '2' | '4' | '8' | 'auto' | 'from-font', string>
317
+ textUnderlineOffset: Record<'0' | '1' | '2' | '4' | '8' | 'auto', string>
318
+ transformOrigin: Record<
319
+ | 'center'
320
+ | 'top'
321
+ | 'top-right'
322
+ | 'right'
323
+ | 'bottom-right'
324
+ | 'bottom'
325
+ | 'bottom-left'
326
+ | 'left'
327
+ | 'top-left',
328
+ string
329
+ >
330
+ transitionDelay: Record<'75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000', string>
331
+ transitionDuration: Record<
332
+ '75' | '100' | '150' | '200' | '300' | '500' | '700' | '1000' | 'DEFAULT',
333
+ string
334
+ >
335
+ transitionProperty: Record<
336
+ 'none' | 'all' | 'DEFAULT' | 'colors' | 'opacity' | 'shadow' | 'transform',
337
+ string
338
+ >
339
+ transitionTimingFunction: Record<'DEFAULT' | 'linear' | 'in' | 'out' | 'in-out', string>
340
+ willChange: Record<'auto' | 'scroll' | 'contents' | 'transform', string>
341
+ zIndex: Record<'0' | '10' | '20' | '30' | '40' | '50' | 'auto', string>
342
+ }
@@ -0,0 +1,7 @@
1
+ import { PluginCreator } from 'postcss'
2
+ import type { Config } from './config.d'
3
+
4
+ declare const plugin: PluginCreator<string | Config | { config: string | Config }>
5
+
6
+ export { Config }
7
+ export default plugin
package/nesting/plugin.js DELETED
@@ -1,41 +0,0 @@
1
- let postcss = require('postcss')
2
- let postcssNested = require('postcss-nested')
3
-
4
- module.exports = function nesting(opts = postcssNested) {
5
- return (root, result) => {
6
- root.walkAtRules('screen', (rule) => {
7
- rule.name = 'media'
8
- rule.params = `screen(${rule.params})`
9
- })
10
-
11
- root.walkAtRules('apply', (rule) => {
12
- rule.before(postcss.decl({ prop: '__apply', value: rule.params, source: rule.source }))
13
- rule.remove()
14
- })
15
-
16
- let plugin = (() => {
17
- if (typeof opts === 'function') {
18
- return opts
19
- }
20
-
21
- if (typeof opts === 'string') {
22
- return require(opts)
23
- }
24
-
25
- if (Object.keys(opts).length <= 0) {
26
- return postcssNested
27
- }
28
-
29
- throw new Error('tailwindcss/nesting should be loaded with a nesting plugin.')
30
- })()
31
-
32
- postcss([plugin]).process(root, result.opts).sync()
33
-
34
- root.walkDecls('__apply', (decl) => {
35
- decl.before(postcss.atRule({ name: 'apply', params: decl.value, source: decl.source }))
36
- decl.remove()
37
- })
38
-
39
- return root
40
- }
41
- }