tailwindcss 0.0.0-insiders.ca1dfd6 → 0.0.0-insiders.cab1fce

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 (148) hide show
  1. package/CHANGELOG.md +380 -1
  2. package/LICENSE +1 -2
  3. package/README.md +8 -4
  4. package/colors.d.ts +3 -0
  5. package/colors.js +2 -1
  6. package/defaultConfig.d.ts +3 -0
  7. package/defaultConfig.js +2 -1
  8. package/defaultTheme.d.ts +3 -0
  9. package/defaultTheme.js +2 -1
  10. package/lib/cli-peer-dependencies.js +10 -5
  11. package/lib/cli.js +311 -213
  12. package/lib/constants.js +9 -9
  13. package/lib/corePluginList.js +11 -1
  14. package/lib/corePlugins.js +1895 -1773
  15. package/lib/css/preflight.css +19 -13
  16. package/lib/featureFlags.js +22 -16
  17. package/lib/index.js +17 -8
  18. package/lib/lib/cacheInvalidation.js +69 -0
  19. package/lib/lib/collapseAdjacentRules.js +30 -14
  20. package/lib/lib/collapseDuplicateDeclarations.js +80 -0
  21. package/lib/lib/defaultExtractor.js +187 -0
  22. package/lib/lib/detectNesting.js +17 -2
  23. package/lib/lib/evaluateTailwindFunctions.js +40 -24
  24. package/lib/lib/expandApplyAtRules.js +414 -157
  25. package/lib/lib/expandTailwindAtRules.js +156 -151
  26. package/lib/lib/generateRules.js +402 -68
  27. package/lib/lib/getModuleDependencies.js +14 -14
  28. package/lib/lib/normalizeTailwindDirectives.js +45 -36
  29. package/lib/lib/partitionApplyAtRules.js +53 -0
  30. package/lib/lib/regex.js +53 -0
  31. package/lib/lib/resolveDefaultsAtRules.js +105 -90
  32. package/lib/lib/setupContextUtils.js +416 -291
  33. package/lib/lib/setupTrackingContext.js +60 -56
  34. package/lib/lib/sharedState.js +38 -15
  35. package/lib/lib/substituteScreenAtRules.js +9 -6
  36. package/{nesting → lib/postcss-plugins/nesting}/README.md +2 -2
  37. package/lib/postcss-plugins/nesting/index.js +17 -0
  38. package/lib/postcss-plugins/nesting/plugin.js +85 -0
  39. package/lib/processTailwindFeatures.js +21 -9
  40. package/lib/public/colors.js +244 -248
  41. package/lib/public/resolve-config.js +5 -5
  42. package/lib/util/buildMediaQuery.js +13 -24
  43. package/lib/util/cloneDeep.js +1 -1
  44. package/lib/util/cloneNodes.js +12 -1
  45. package/lib/util/color.js +43 -32
  46. package/lib/util/createPlugin.js +1 -2
  47. package/lib/util/createUtilityPlugin.js +13 -17
  48. package/lib/util/dataTypes.js +114 -74
  49. package/lib/util/defaults.js +6 -0
  50. package/lib/util/escapeClassName.js +5 -5
  51. package/lib/util/escapeCommas.js +1 -1
  52. package/lib/util/flattenColorPalette.js +2 -4
  53. package/lib/util/formatVariantSelector.js +194 -0
  54. package/lib/util/getAllConfigs.js +13 -5
  55. package/lib/util/hashConfig.js +5 -5
  56. package/lib/util/isKeyframeRule.js +1 -1
  57. package/lib/util/isPlainObject.js +1 -1
  58. package/lib/util/isValidArbitraryValue.js +64 -0
  59. package/lib/util/log.js +35 -19
  60. package/lib/util/nameClass.js +7 -6
  61. package/lib/util/negateValue.js +5 -3
  62. package/lib/util/normalizeConfig.js +233 -0
  63. package/lib/util/normalizeScreens.js +59 -0
  64. package/lib/util/parseAnimationValue.js +56 -56
  65. package/lib/util/parseBoxShadowValue.js +76 -0
  66. package/lib/util/parseDependency.js +32 -32
  67. package/lib/util/parseObjectStyles.js +6 -6
  68. package/lib/util/pluginUtils.js +67 -170
  69. package/lib/util/prefixSelector.js +4 -7
  70. package/lib/util/resolveConfig.js +123 -133
  71. package/lib/util/resolveConfigPath.js +17 -18
  72. package/lib/util/responsive.js +6 -6
  73. package/lib/util/splitAtTopLevelOnly.js +72 -0
  74. package/lib/util/toColorValue.js +1 -2
  75. package/lib/util/toPath.js +6 -1
  76. package/lib/util/transformThemeValue.js +42 -34
  77. package/lib/util/validateConfig.js +21 -0
  78. package/lib/util/withAlphaVariable.js +19 -19
  79. package/nesting/index.js +2 -12
  80. package/package.json +41 -42
  81. package/peers/index.js +11539 -10859
  82. package/plugin.d.ts +11 -0
  83. package/plugin.js +2 -1
  84. package/resolveConfig.js +2 -1
  85. package/scripts/create-plugin-list.js +2 -2
  86. package/scripts/generate-types.js +52 -0
  87. package/src/cli-peer-dependencies.js +7 -1
  88. package/src/cli.js +174 -41
  89. package/src/corePluginList.js +1 -1
  90. package/src/corePlugins.js +641 -596
  91. package/src/css/preflight.css +19 -13
  92. package/src/featureFlags.js +16 -10
  93. package/src/index.js +14 -6
  94. package/src/lib/cacheInvalidation.js +52 -0
  95. package/src/lib/collapseAdjacentRules.js +21 -2
  96. package/src/lib/collapseDuplicateDeclarations.js +93 -0
  97. package/src/lib/defaultExtractor.js +192 -0
  98. package/src/lib/detectNesting.js +22 -3
  99. package/src/lib/evaluateTailwindFunctions.js +24 -7
  100. package/src/lib/expandApplyAtRules.js +442 -154
  101. package/src/lib/expandTailwindAtRules.js +91 -65
  102. package/src/lib/generateRules.js +409 -43
  103. package/src/lib/normalizeTailwindDirectives.js +10 -3
  104. package/src/lib/partitionApplyAtRules.js +52 -0
  105. package/src/lib/regex.js +74 -0
  106. package/src/lib/resolveDefaultsAtRules.js +74 -53
  107. package/src/lib/setupContextUtils.js +388 -208
  108. package/src/lib/setupTrackingContext.js +15 -12
  109. package/src/lib/sharedState.js +42 -7
  110. package/src/lib/substituteScreenAtRules.js +6 -3
  111. package/src/postcss-plugins/nesting/README.md +42 -0
  112. package/src/postcss-plugins/nesting/index.js +13 -0
  113. package/src/postcss-plugins/nesting/plugin.js +80 -0
  114. package/src/processTailwindFeatures.js +17 -2
  115. package/src/public/colors.js +4 -9
  116. package/src/util/buildMediaQuery.js +14 -18
  117. package/src/util/cloneNodes.js +14 -1
  118. package/src/util/color.js +31 -14
  119. package/src/util/createUtilityPlugin.js +2 -2
  120. package/src/util/dataTypes.js +56 -16
  121. package/src/util/defaults.js +6 -0
  122. package/src/util/formatVariantSelector.js +213 -0
  123. package/src/util/getAllConfigs.js +7 -0
  124. package/src/util/isValidArbitraryValue.js +61 -0
  125. package/src/util/log.js +23 -22
  126. package/src/util/nameClass.js +2 -2
  127. package/src/util/negateValue.js +4 -2
  128. package/src/util/normalizeConfig.js +262 -0
  129. package/src/util/normalizeScreens.js +45 -0
  130. package/src/util/parseBoxShadowValue.js +72 -0
  131. package/src/util/pluginUtils.js +51 -147
  132. package/src/util/prefixSelector.js +7 -8
  133. package/src/util/resolveConfig.js +108 -79
  134. package/src/util/splitAtTopLevelOnly.js +71 -0
  135. package/src/util/toPath.js +23 -1
  136. package/src/util/transformThemeValue.js +24 -7
  137. package/src/util/validateConfig.js +13 -0
  138. package/stubs/defaultConfig.stub.js +157 -94
  139. package/stubs/simpleConfig.stub.js +0 -1
  140. package/types/config.d.ts +325 -0
  141. package/types/generated/.gitkeep +0 -0
  142. package/types/generated/colors.d.ts +276 -0
  143. package/types/generated/corePluginList.d.ts +1 -0
  144. package/types/index.d.ts +1 -0
  145. package/types.d.ts +1 -0
  146. package/lib/lib/setupWatchingContext.js +0 -284
  147. package/nesting/plugin.js +0 -41
  148. package/src/lib/setupWatchingContext.js +0 -306
@@ -1,4 +1,26 @@
1
+ /**
2
+ * Parse a path string into an array of path segments.
3
+ *
4
+ * Square bracket notation `a[b]` may be used to "escape" dots that would otherwise be interpreted as path separators.
5
+ *
6
+ * Example:
7
+ * a -> ['a']
8
+ * a.b.c -> ['a', 'b', 'c']
9
+ * a[b].c -> ['a', 'b', 'c']
10
+ * a[b.c].e.f -> ['a', 'b.c', 'e', 'f']
11
+ * a[b][c][d] -> ['a', 'b', 'c', 'd']
12
+ *
13
+ * @param {string|string[]} path
14
+ **/
1
15
  export function toPath(path) {
2
16
  if (Array.isArray(path)) return path
3
- return path.split(/[\.\]\[]+/g)
17
+
18
+ let openBrackets = path.split('[').length - 1
19
+ let closedBrackets = path.split(']').length - 1
20
+
21
+ if (openBrackets !== closedBrackets) {
22
+ throw new Error(`Path is invalid. Has unbalanced brackets: ${path}`)
23
+ }
24
+
25
+ return path.split(/\.(?![^\[]*\])|[\[\]]/g).filter(Boolean)
4
26
  }
@@ -2,7 +2,12 @@ import postcss from 'postcss'
2
2
 
3
3
  export default function transformThemeValue(themeSection) {
4
4
  if (['fontSize', 'outline'].includes(themeSection)) {
5
- return (value) => (Array.isArray(value) ? value[0] : value)
5
+ return (value) => {
6
+ if (typeof value === 'function') value = value({})
7
+ if (Array.isArray(value)) value = value[0]
8
+
9
+ return value
10
+ }
6
11
  }
7
12
 
8
13
  if (
@@ -20,18 +25,30 @@ export default function transformThemeValue(themeSection) {
20
25
  'animation',
21
26
  ].includes(themeSection)
22
27
  ) {
23
- return (value) => (Array.isArray(value) ? value.join(', ') : value)
28
+ return (value) => {
29
+ if (typeof value === 'function') value = value({})
30
+ if (Array.isArray(value)) value = value.join(', ')
31
+
32
+ return value
33
+ }
24
34
  }
25
35
 
26
36
  // For backwards compatibility reasons, before we switched to underscores
27
37
  // instead of commas for arbitrary values.
28
38
  if (['gridTemplateColumns', 'gridTemplateRows', 'objectPosition'].includes(themeSection)) {
29
- return (value) => (typeof value === 'string' ? postcss.list.comma(value).join(' ') : value)
30
- }
39
+ return (value) => {
40
+ if (typeof value === 'function') value = value({})
41
+ if (typeof value === 'string') value = postcss.list.comma(value).join(' ')
31
42
 
32
- if (themeSection === 'colors') {
33
- return (value) => (typeof value === 'function' ? value({}) : value)
43
+ return value
44
+ }
34
45
  }
35
46
 
36
- return (value) => value
47
+ return (value, opts = {}) => {
48
+ if (typeof value === 'function') {
49
+ value = value(opts)
50
+ }
51
+
52
+ return value
53
+ }
37
54
  }
@@ -0,0 +1,13 @@
1
+ import log from './log'
2
+
3
+ export function validateConfig(config) {
4
+ if (config.content.files.length === 0) {
5
+ log.warn('content-problems', [
6
+ 'The `content` option in your Tailwind CSS configuration is missing or empty.',
7
+ 'Configure your content sources or your generated CSS will be missing styles.',
8
+ 'https://tailwindcss.com/docs/content-configuration',
9
+ ])
10
+ }
11
+
12
+ return config
13
+ }
@@ -116,16 +116,16 @@ module.exports = {
116
116
  square: '1 / 1',
117
117
  video: '16 / 9',
118
118
  },
119
- backdropBlur: (theme) => theme('blur'),
120
- backdropBrightness: (theme) => theme('brightness'),
121
- backdropContrast: (theme) => theme('contrast'),
122
- backdropGrayscale: (theme) => theme('grayscale'),
123
- backdropHueRotate: (theme) => theme('hueRotate'),
124
- backdropInvert: (theme) => theme('invert'),
125
- backdropOpacity: (theme) => theme('opacity'),
126
- backdropSaturate: (theme) => theme('saturate'),
127
- backdropSepia: (theme) => theme('sepia'),
128
- backgroundColor: (theme) => theme('colors'),
119
+ backdropBlur: ({ theme }) => theme('blur'),
120
+ backdropBrightness: ({ theme }) => theme('brightness'),
121
+ backdropContrast: ({ theme }) => theme('contrast'),
122
+ backdropGrayscale: ({ theme }) => theme('grayscale'),
123
+ backdropHueRotate: ({ theme }) => theme('hueRotate'),
124
+ backdropInvert: ({ theme }) => theme('invert'),
125
+ backdropOpacity: ({ theme }) => theme('opacity'),
126
+ backdropSaturate: ({ theme }) => theme('saturate'),
127
+ backdropSepia: ({ theme }) => theme('sepia'),
128
+ backgroundColor: ({ theme }) => theme('colors'),
129
129
  backgroundImage: {
130
130
  none: 'none',
131
131
  'gradient-to-t': 'linear-gradient(to top, var(--tw-gradient-stops))',
@@ -137,7 +137,7 @@ module.exports = {
137
137
  'gradient-to-l': 'linear-gradient(to left, var(--tw-gradient-stops))',
138
138
  'gradient-to-tl': 'linear-gradient(to top left, var(--tw-gradient-stops))',
139
139
  },
140
- backgroundOpacity: (theme) => theme('opacity'),
140
+ backgroundOpacity: ({ theme }) => theme('opacity'),
141
141
  backgroundPosition: {
142
142
  bottom: 'bottom',
143
143
  center: 'center',
@@ -178,11 +178,11 @@ module.exports = {
178
178
  150: '1.5',
179
179
  200: '2',
180
180
  },
181
- borderColor: (theme) => ({
181
+ borderColor: ({ theme }) => ({
182
182
  ...theme('colors'),
183
183
  DEFAULT: theme('colors.gray.200', 'currentColor'),
184
184
  }),
185
- borderOpacity: (theme) => theme('opacity'),
185
+ borderOpacity: ({ theme }) => theme('opacity'),
186
186
  borderRadius: {
187
187
  none: '0px',
188
188
  sm: '0.125rem',
@@ -194,6 +194,9 @@ module.exports = {
194
194
  '3xl': '1.5rem',
195
195
  full: '9999px',
196
196
  },
197
+ borderSpacing: ({ theme }) => ({
198
+ ...theme('spacing'),
199
+ }),
197
200
  borderWidth: {
198
201
  DEFAULT: '1px',
199
202
  0: '0px',
@@ -203,16 +206,17 @@ module.exports = {
203
206
  },
204
207
  boxShadow: {
205
208
  sm: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
206
- DEFAULT: '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px 0 rgb(0 0 0 / 0.06)',
207
- md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06)',
208
- lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05)',
209
- xl: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04)',
209
+ DEFAULT: '0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)',
210
+ md: '0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)',
211
+ lg: '0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)',
212
+ xl: '0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)',
210
213
  '2xl': '0 25px 50px -12px rgb(0 0 0 / 0.25)',
211
- inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.06)',
214
+ inner: 'inset 0 2px 4px 0 rgb(0 0 0 / 0.05)',
212
215
  none: 'none',
213
216
  },
214
- caretColor: (theme) => theme('colors'),
215
- accentColor: (theme) => ({
217
+ boxShadowColor: ({ theme }) => theme('colors'),
218
+ caretColor: ({ theme }) => theme('colors'),
219
+ accentColor: ({ theme }) => ({
216
220
  ...theme('colors'),
217
221
  auto: 'auto',
218
222
  }),
@@ -238,10 +242,38 @@ module.exports = {
238
242
  move: 'move',
239
243
  help: 'help',
240
244
  'not-allowed': 'not-allowed',
241
- },
242
- divideColor: (theme) => theme('borderColor'),
243
- divideOpacity: (theme) => theme('borderOpacity'),
244
- divideWidth: (theme) => theme('borderWidth'),
245
+ none: 'none',
246
+ 'context-menu': 'context-menu',
247
+ progress: 'progress',
248
+ cell: 'cell',
249
+ crosshair: 'crosshair',
250
+ 'vertical-text': 'vertical-text',
251
+ alias: 'alias',
252
+ copy: 'copy',
253
+ 'no-drop': 'no-drop',
254
+ grab: 'grab',
255
+ grabbing: 'grabbing',
256
+ 'all-scroll': 'all-scroll',
257
+ 'col-resize': 'col-resize',
258
+ 'row-resize': 'row-resize',
259
+ 'n-resize': 'n-resize',
260
+ 'e-resize': 'e-resize',
261
+ 's-resize': 's-resize',
262
+ 'w-resize': 'w-resize',
263
+ 'ne-resize': 'ne-resize',
264
+ 'nw-resize': 'nw-resize',
265
+ 'se-resize': 'se-resize',
266
+ 'sw-resize': 'sw-resize',
267
+ 'ew-resize': 'ew-resize',
268
+ 'ns-resize': 'ns-resize',
269
+ 'nesw-resize': 'nesw-resize',
270
+ 'nwse-resize': 'nwse-resize',
271
+ 'zoom-in': 'zoom-in',
272
+ 'zoom-out': 'zoom-out',
273
+ },
274
+ divideColor: ({ theme }) => theme('borderColor'),
275
+ divideOpacity: ({ theme }) => theme('borderOpacity'),
276
+ divideWidth: ({ theme }) => theme('borderWidth'),
245
277
  dropShadow: {
246
278
  sm: '0 1px 1px rgb(0 0 0 / 0.05)',
247
279
  DEFAULT: ['0 1px 2px rgb(0 0 0 / 0.1)', '0 1px 1px rgb(0 0 0 / 0.06)'],
@@ -251,17 +283,12 @@ module.exports = {
251
283
  '2xl': '0 25px 25px rgb(0 0 0 / 0.15)',
252
284
  none: '0 0 #0000',
253
285
  },
254
- fill: { current: 'currentColor' },
286
+ fill: ({ theme }) => theme('colors'),
255
287
  grayscale: {
256
288
  0: '0',
257
289
  DEFAULT: '100%',
258
290
  },
259
291
  hueRotate: {
260
- '-180': '-180deg',
261
- '-90': '-90deg',
262
- '-60': '-60deg',
263
- '-30': '-30deg',
264
- '-15': '-15deg',
265
292
  0: '0deg',
266
293
  15: '15deg',
267
294
  30: '30deg',
@@ -279,6 +306,37 @@ module.exports = {
279
306
  initial: '0 1 auto',
280
307
  none: 'none',
281
308
  },
309
+ flexBasis: ({ theme }) => ({
310
+ auto: 'auto',
311
+ ...theme('spacing'),
312
+ '1/2': '50%',
313
+ '1/3': '33.333333%',
314
+ '2/3': '66.666667%',
315
+ '1/4': '25%',
316
+ '2/4': '50%',
317
+ '3/4': '75%',
318
+ '1/5': '20%',
319
+ '2/5': '40%',
320
+ '3/5': '60%',
321
+ '4/5': '80%',
322
+ '1/6': '16.666667%',
323
+ '2/6': '33.333333%',
324
+ '3/6': '50%',
325
+ '4/6': '66.666667%',
326
+ '5/6': '83.333333%',
327
+ '1/12': '8.333333%',
328
+ '2/12': '16.666667%',
329
+ '3/12': '25%',
330
+ '4/12': '33.333333%',
331
+ '5/12': '41.666667%',
332
+ '6/12': '50%',
333
+ '7/12': '58.333333%',
334
+ '8/12': '66.666667%',
335
+ '9/12': '75%',
336
+ '10/12': '83.333333%',
337
+ '11/12': '91.666667%',
338
+ full: '100%',
339
+ }),
282
340
  flexGrow: {
283
341
  0: '0',
284
342
  DEFAULT: '1',
@@ -342,8 +400,8 @@ module.exports = {
342
400
  extrabold: '800',
343
401
  black: '900',
344
402
  },
345
- gap: (theme) => theme('spacing'),
346
- gradientColorStops: (theme) => theme('colors'),
403
+ gap: ({ theme }) => theme('spacing'),
404
+ gradientColorStops: ({ theme }) => theme('colors'),
347
405
  gridAutoColumns: {
348
406
  auto: 'auto',
349
407
  min: 'min-content',
@@ -458,7 +516,7 @@ module.exports = {
458
516
  5: 'repeat(5, minmax(0, 1fr))',
459
517
  6: 'repeat(6, minmax(0, 1fr))',
460
518
  },
461
- height: (theme) => ({
519
+ height: ({ theme }) => ({
462
520
  auto: 'auto',
463
521
  ...theme('spacing'),
464
522
  '1/2': '50%',
@@ -478,11 +536,13 @@ module.exports = {
478
536
  '5/6': '83.333333%',
479
537
  full: '100%',
480
538
  screen: '100vh',
539
+ min: 'min-content',
540
+ max: 'max-content',
541
+ fit: 'fit-content',
481
542
  }),
482
- inset: (theme, { negative }) => ({
543
+ inset: ({ theme }) => ({
483
544
  auto: 'auto',
484
545
  ...theme('spacing'),
485
- ...negative(theme('spacing')),
486
546
  '1/2': '50%',
487
547
  '1/3': '33.333333%',
488
548
  '2/3': '66.666667%',
@@ -490,13 +550,6 @@ module.exports = {
490
550
  '2/4': '50%',
491
551
  '3/4': '75%',
492
552
  full: '100%',
493
- '-1/2': '-50%',
494
- '-1/3': '-33.333333%',
495
- '-2/3': '-66.666667%',
496
- '-1/4': '-25%',
497
- '-2/4': '-50%',
498
- '-3/4': '-75%',
499
- '-full': '-100%',
500
553
  }),
501
554
  keyframes: {
502
555
  spin: {
@@ -555,17 +608,19 @@ module.exports = {
555
608
  disc: 'disc',
556
609
  decimal: 'decimal',
557
610
  },
558
- margin: (theme, { negative }) => ({
611
+ margin: ({ theme }) => ({
559
612
  auto: 'auto',
560
613
  ...theme('spacing'),
561
- ...negative(theme('spacing')),
562
614
  }),
563
- maxHeight: (theme) => ({
615
+ maxHeight: ({ theme }) => ({
564
616
  ...theme('spacing'),
565
617
  full: '100%',
566
618
  screen: '100vh',
619
+ min: 'min-content',
620
+ max: 'max-content',
621
+ fit: 'fit-content',
567
622
  }),
568
- maxWidth: (theme, { breakpoints }) => ({
623
+ maxWidth: ({ theme, breakpoints }) => ({
569
624
  none: 'none',
570
625
  0: '0rem',
571
626
  xs: '20rem',
@@ -582,6 +637,7 @@ module.exports = {
582
637
  full: '100%',
583
638
  min: 'min-content',
584
639
  max: 'max-content',
640
+ fit: 'fit-content',
585
641
  prose: '65ch',
586
642
  ...breakpoints(theme('screens')),
587
643
  }),
@@ -589,12 +645,16 @@ module.exports = {
589
645
  0: '0px',
590
646
  full: '100%',
591
647
  screen: '100vh',
648
+ min: 'min-content',
649
+ max: 'max-content',
650
+ fit: 'fit-content',
592
651
  },
593
652
  minWidth: {
594
653
  0: '0px',
595
654
  full: '100%',
596
655
  min: 'min-content',
597
656
  max: 'max-content',
657
+ fit: 'fit-content',
598
658
  },
599
659
  objectPosition: {
600
660
  bottom: 'bottom',
@@ -641,19 +701,29 @@ module.exports = {
641
701
  11: '11',
642
702
  12: '12',
643
703
  },
644
- outline: {
645
- none: ['2px solid transparent', '2px'],
646
- white: ['2px dotted white', '2px'],
647
- black: ['2px dotted black', '2px'],
704
+ padding: ({ theme }) => theme('spacing'),
705
+ placeholderColor: ({ theme }) => theme('colors'),
706
+ placeholderOpacity: ({ theme }) => theme('opacity'),
707
+ outlineColor: ({ theme }) => theme('colors'),
708
+ outlineOffset: {
709
+ 0: '0px',
710
+ 1: '1px',
711
+ 2: '2px',
712
+ 4: '4px',
713
+ 8: '8px',
648
714
  },
649
- padding: (theme) => theme('spacing'),
650
- placeholderColor: (theme) => theme('colors'),
651
- placeholderOpacity: (theme) => theme('opacity'),
652
- ringColor: (theme) => ({
653
- DEFAULT: theme('colors.blue.500', '#3b82f6'),
715
+ outlineWidth: {
716
+ 0: '0px',
717
+ 1: '1px',
718
+ 2: '2px',
719
+ 4: '4px',
720
+ 8: '8px',
721
+ },
722
+ ringColor: ({ theme }) => ({
723
+ DEFAULT: theme(`colors.blue.500`, '#3b82f6'),
654
724
  ...theme('colors'),
655
725
  }),
656
- ringOffsetColor: (theme) => theme('colors'),
726
+ ringOffsetColor: ({ theme }) => theme('colors'),
657
727
  ringOffsetWidth: {
658
728
  0: '0px',
659
729
  1: '1px',
@@ -661,7 +731,7 @@ module.exports = {
661
731
  4: '4px',
662
732
  8: '8px',
663
733
  },
664
- ringOpacity: (theme) => ({
734
+ ringOpacity: ({ theme }) => ({
665
735
  DEFAULT: '0.5',
666
736
  ...theme('opacity'),
667
737
  }),
@@ -674,14 +744,6 @@ module.exports = {
674
744
  8: '8px',
675
745
  },
676
746
  rotate: {
677
- '-180': '-180deg',
678
- '-90': '-90deg',
679
- '-45': '-45deg',
680
- '-12': '-12deg',
681
- '-6': '-6deg',
682
- '-3': '-3deg',
683
- '-2': '-2deg',
684
- '-1': '-1deg',
685
747
  0: '0deg',
686
748
  1: '1deg',
687
749
  2: '2deg',
@@ -711,21 +773,15 @@ module.exports = {
711
773
  125: '1.25',
712
774
  150: '1.5',
713
775
  },
714
- scrollMargin: (theme, { negative }) => ({
776
+ scrollMargin: ({ theme }) => ({
715
777
  ...theme('spacing'),
716
- ...negative(theme('spacing')),
717
778
  }),
718
- scrollPadding: (theme) => theme('spacing'),
779
+ scrollPadding: ({ theme }) => theme('spacing'),
719
780
  sepia: {
720
781
  0: '0',
721
782
  DEFAULT: '100%',
722
783
  },
723
784
  skew: {
724
- '-12': '-12deg',
725
- '-6': '-6deg',
726
- '-3': '-3deg',
727
- '-2': '-2deg',
728
- '-1': '-1deg',
729
785
  0: '0deg',
730
786
  1: '1deg',
731
787
  2: '2deg',
@@ -733,24 +789,38 @@ module.exports = {
733
789
  6: '6deg',
734
790
  12: '12deg',
735
791
  },
736
- space: (theme, { negative }) => ({
792
+ space: ({ theme }) => ({
737
793
  ...theme('spacing'),
738
- ...negative(theme('spacing')),
739
794
  }),
740
- stroke: {
741
- current: 'currentColor',
742
- },
795
+ stroke: ({ theme }) => theme('colors'),
743
796
  strokeWidth: {
744
797
  0: '0',
745
798
  1: '1',
746
799
  2: '2',
747
800
  },
748
- textColor: (theme) => theme('colors'),
749
- textIndent: (theme, { negative }) => ({
801
+ textColor: ({ theme }) => theme('colors'),
802
+ textDecorationColor: ({ theme }) => theme('colors'),
803
+ textDecorationThickness: {
804
+ auto: 'auto',
805
+ 'from-font': 'from-font',
806
+ 0: '0px',
807
+ 1: '1px',
808
+ 2: '2px',
809
+ 4: '4px',
810
+ 8: '8px',
811
+ },
812
+ textUnderlineOffset: {
813
+ auto: 'auto',
814
+ 0: '0px',
815
+ 1: '1px',
816
+ 2: '2px',
817
+ 4: '4px',
818
+ 8: '8px',
819
+ },
820
+ textIndent: ({ theme }) => ({
750
821
  ...theme('spacing'),
751
- ...negative(theme('spacing')),
752
822
  }),
753
- textOpacity: (theme) => theme('opacity'),
823
+ textOpacity: ({ theme }) => theme('opacity'),
754
824
  transformOrigin: {
755
825
  center: 'center',
756
826
  top: 'top',
@@ -787,8 +857,8 @@ module.exports = {
787
857
  none: 'none',
788
858
  all: 'all',
789
859
  DEFAULT:
790
- 'background-color, border-color, color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter',
791
- colors: 'background-color, border-color, color, fill, stroke',
860
+ 'color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter',
861
+ colors: 'color, background-color, border-color, text-decoration-color, fill, stroke',
792
862
  opacity: 'opacity',
793
863
  shadow: 'box-shadow',
794
864
  transform: 'transform',
@@ -800,9 +870,8 @@ module.exports = {
800
870
  out: 'cubic-bezier(0, 0, 0.2, 1)',
801
871
  'in-out': 'cubic-bezier(0.4, 0, 0.2, 1)',
802
872
  },
803
- translate: (theme, { negative }) => ({
873
+ translate: ({ theme }) => ({
804
874
  ...theme('spacing'),
805
- ...negative(theme('spacing')),
806
875
  '1/2': '50%',
807
876
  '1/3': '33.333333%',
808
877
  '2/3': '66.666667%',
@@ -810,15 +879,8 @@ module.exports = {
810
879
  '2/4': '50%',
811
880
  '3/4': '75%',
812
881
  full: '100%',
813
- '-1/2': '-50%',
814
- '-1/3': '-33.333333%',
815
- '-2/3': '-66.666667%',
816
- '-1/4': '-25%',
817
- '-2/4': '-50%',
818
- '-3/4': '-75%',
819
- '-full': '-100%',
820
882
  }),
821
- width: (theme) => ({
883
+ width: ({ theme }) => ({
822
884
  auto: 'auto',
823
885
  ...theme('spacing'),
824
886
  '1/2': '50%',
@@ -851,6 +913,7 @@ module.exports = {
851
913
  screen: '100vw',
852
914
  min: 'min-content',
853
915
  max: 'max-content',
916
+ fit: 'fit-content',
854
917
  }),
855
918
  willChange: {
856
919
  auto: 'auto',
@@ -1,6 +1,5 @@
1
1
  module.exports = {
2
2
  content: [],
3
- darkMode: 'media', // or 'class'
4
3
  theme: {
5
4
  extend: {},
6
5
  },