tailwindcss 0.0.0-insiders.ca1dfd6 → 0.0.0-insiders.ca7b10e

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 (179) hide show
  1. package/LICENSE +1 -2
  2. package/README.md +18 -11
  3. package/dist/chunk-7MHEDNEU.mjs +1 -0
  4. package/dist/chunk-AZANAYY2.mjs +1 -0
  5. package/dist/chunk-YTVGJJD3.mjs +12 -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 +1 -0
  18. package/dist/flatten-color-palette.mjs +1 -0
  19. package/dist/lib.d.mts +264 -0
  20. package/dist/lib.d.ts +3 -0
  21. package/dist/lib.js +33 -0
  22. package/dist/lib.mjs +22 -0
  23. package/dist/plugin.d.mts +11 -0
  24. package/dist/plugin.d.ts +104 -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-B254mqw1.d.mts +98 -0
  30. package/index.css +866 -0
  31. package/package.json +73 -100
  32. package/preflight.css +375 -0
  33. package/theme.css +453 -0
  34. package/CHANGELOG.md +0 -1758
  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 -707
  42. package/lib/constants.js +0 -37
  43. package/lib/corePluginList.js +0 -169
  44. package/lib/corePlugins.js +0 -3525
  45. package/lib/css/LICENSE +0 -25
  46. package/lib/css/preflight.css +0 -354
  47. package/lib/featureFlags.js +0 -57
  48. package/lib/index.js +0 -32
  49. package/lib/lib/collapseAdjacentRules.js +0 -41
  50. package/lib/lib/detectNesting.js +0 -19
  51. package/lib/lib/evaluateTailwindFunctions.js +0 -167
  52. package/lib/lib/expandApplyAtRules.js +0 -228
  53. package/lib/lib/expandTailwindAtRules.js +0 -257
  54. package/lib/lib/generateRules.js +0 -350
  55. package/lib/lib/getModuleDependencies.js +0 -48
  56. package/lib/lib/normalizeTailwindDirectives.js +0 -75
  57. package/lib/lib/resolveDefaultsAtRules.js +0 -128
  58. package/lib/lib/setupContextUtils.js +0 -791
  59. package/lib/lib/setupTrackingContext.js +0 -170
  60. package/lib/lib/setupWatchingContext.js +0 -284
  61. package/lib/lib/sharedState.js +0 -29
  62. package/lib/lib/substituteScreenAtRules.js +0 -24
  63. package/lib/processTailwindFeatures.js +0 -47
  64. package/lib/public/colors.js +0 -333
  65. package/lib/public/create-plugin.js +0 -13
  66. package/lib/public/default-config.js +0 -14
  67. package/lib/public/default-theme.js +0 -14
  68. package/lib/public/resolve-config.js +0 -19
  69. package/lib/util/bigSign.js +0 -8
  70. package/lib/util/buildMediaQuery.js +0 -31
  71. package/lib/util/cloneDeep.js +0 -19
  72. package/lib/util/cloneNodes.js +0 -14
  73. package/lib/util/color.js +0 -84
  74. package/lib/util/configurePlugins.js +0 -18
  75. package/lib/util/createPlugin.js +0 -30
  76. package/lib/util/createUtilityPlugin.js +0 -53
  77. package/lib/util/dataTypes.js +0 -202
  78. package/lib/util/defaults.js +0 -16
  79. package/lib/util/escapeClassName.js +0 -19
  80. package/lib/util/escapeCommas.js +0 -8
  81. package/lib/util/flattenColorPalette.js +0 -19
  82. package/lib/util/getAllConfigs.js +0 -29
  83. package/lib/util/hashConfig.js +0 -16
  84. package/lib/util/isKeyframeRule.js +0 -8
  85. package/lib/util/isPlainObject.js +0 -12
  86. package/lib/util/log.js +0 -35
  87. package/lib/util/nameClass.js +0 -31
  88. package/lib/util/negateValue.js +0 -17
  89. package/lib/util/parseAnimationValue.js +0 -89
  90. package/lib/util/parseDependency.js +0 -63
  91. package/lib/util/parseObjectStyles.js +0 -31
  92. package/lib/util/pluginUtils.js +0 -282
  93. package/lib/util/prefixSelector.js +0 -23
  94. package/lib/util/resolveConfig.js +0 -293
  95. package/lib/util/resolveConfigPath.js +0 -52
  96. package/lib/util/responsive.js +0 -19
  97. package/lib/util/tap.js +0 -9
  98. package/lib/util/toColorValue.js +0 -9
  99. package/lib/util/toPath.js +0 -9
  100. package/lib/util/transformThemeValue.js +0 -53
  101. package/lib/util/withAlphaVariable.js +0 -67
  102. package/nesting/README.md +0 -42
  103. package/nesting/index.js +0 -12
  104. package/nesting/plugin.js +0 -41
  105. package/peers/index.js +0 -77111
  106. package/plugin.js +0 -1
  107. package/prettier.config.js +0 -19
  108. package/resolveConfig.js +0 -1
  109. package/screens.css +0 -1
  110. package/scripts/create-plugin-list.js +0 -10
  111. package/scripts/install-integrations.js +0 -27
  112. package/scripts/rebuildFixtures.js +0 -68
  113. package/src/cli-peer-dependencies.js +0 -9
  114. package/src/cli.js +0 -762
  115. package/src/constants.js +0 -17
  116. package/src/corePluginList.js +0 -1
  117. package/src/corePlugins.js +0 -2382
  118. package/src/css/LICENSE +0 -25
  119. package/src/css/preflight.css +0 -354
  120. package/src/featureFlags.js +0 -48
  121. package/src/index.js +0 -34
  122. package/src/lib/collapseAdjacentRules.js +0 -39
  123. package/src/lib/detectNesting.js +0 -20
  124. package/src/lib/evaluateTailwindFunctions.js +0 -195
  125. package/src/lib/expandApplyAtRules.js +0 -251
  126. package/src/lib/expandTailwindAtRules.js +0 -266
  127. package/src/lib/generateRules.js +0 -320
  128. package/src/lib/getModuleDependencies.js +0 -39
  129. package/src/lib/normalizeTailwindDirectives.js +0 -77
  130. package/src/lib/resolveDefaultsAtRules.js +0 -125
  131. package/src/lib/setupContextUtils.js +0 -775
  132. package/src/lib/setupTrackingContext.js +0 -184
  133. package/src/lib/setupWatchingContext.js +0 -306
  134. package/src/lib/sharedState.js +0 -13
  135. package/src/lib/substituteScreenAtRules.js +0 -16
  136. package/src/processTailwindFeatures.js +0 -43
  137. package/src/public/colors.js +0 -305
  138. package/src/public/create-plugin.js +0 -2
  139. package/src/public/default-config.js +0 -4
  140. package/src/public/default-theme.js +0 -4
  141. package/src/public/resolve-config.js +0 -7
  142. package/src/util/bigSign.js +0 -3
  143. package/src/util/buildMediaQuery.js +0 -24
  144. package/src/util/cloneDeep.js +0 -11
  145. package/src/util/cloneNodes.js +0 -11
  146. package/src/util/color.js +0 -56
  147. package/src/util/configurePlugins.js +0 -23
  148. package/src/util/createPlugin.js +0 -27
  149. package/src/util/createUtilityPlugin.js +0 -37
  150. package/src/util/dataTypes.js +0 -216
  151. package/src/util/defaults.js +0 -11
  152. package/src/util/escapeClassName.js +0 -8
  153. package/src/util/escapeCommas.js +0 -3
  154. package/src/util/flattenColorPalette.js +0 -13
  155. package/src/util/getAllConfigs.js +0 -19
  156. package/src/util/hashConfig.js +0 -5
  157. package/src/util/isKeyframeRule.js +0 -3
  158. package/src/util/isPlainObject.js +0 -8
  159. package/src/util/log.js +0 -28
  160. package/src/util/nameClass.js +0 -26
  161. package/src/util/negateValue.js +0 -14
  162. package/src/util/parseAnimationValue.js +0 -68
  163. package/src/util/parseDependency.js +0 -49
  164. package/src/util/parseObjectStyles.js +0 -19
  165. package/src/util/pluginUtils.js +0 -288
  166. package/src/util/prefixSelector.js +0 -15
  167. package/src/util/resolveConfig.js +0 -282
  168. package/src/util/resolveConfigPath.js +0 -55
  169. package/src/util/responsive.js +0 -10
  170. package/src/util/tap.js +0 -4
  171. package/src/util/toColorValue.js +0 -3
  172. package/src/util/toPath.js +0 -4
  173. package/src/util/transformThemeValue.js +0 -37
  174. package/src/util/withAlphaVariable.js +0 -49
  175. package/stubs/defaultConfig.stub.js +0 -890
  176. package/stubs/defaultPostCssConfig.stub.js +0 -6
  177. package/stubs/simpleConfig.stub.js +0 -8
  178. package/tailwind.css +0 -5
  179. package/variants.css +0 -1
@@ -1,2382 +0,0 @@
1
- import fs from 'fs'
2
- import postcss from 'postcss'
3
- import createUtilityPlugin from './util/createUtilityPlugin'
4
- import buildMediaQuery from './util/buildMediaQuery'
5
- import prefixSelector from './util/prefixSelector'
6
- import parseAnimationValue from './util/parseAnimationValue'
7
- import flattenColorPalette from './util/flattenColorPalette'
8
- import withAlphaVariable, { withAlphaValue } from './util/withAlphaVariable'
9
- import toColorValue from './util/toColorValue'
10
- import isPlainObject from './util/isPlainObject'
11
- import transformThemeValue from './util/transformThemeValue'
12
- import {
13
- applyStateToMarker,
14
- updateLastClasses,
15
- updateAllClasses,
16
- transformAllSelectors,
17
- transformAllClasses,
18
- transformLastClasses,
19
- } from './util/pluginUtils'
20
- import { version as tailwindVersion } from '../package.json'
21
- import log from './util/log'
22
-
23
- export default {
24
- // Variant plugins
25
- pseudoElementVariants: ({ config, addVariant }) => {
26
- addVariant(
27
- 'first-letter',
28
- transformAllSelectors((selector) => {
29
- return updateAllClasses(selector, (className, { withPseudo }) => {
30
- return withPseudo(`first-letter${config('separator')}${className}`, '::first-letter')
31
- })
32
- })
33
- )
34
-
35
- addVariant(
36
- 'first-line',
37
- transformAllSelectors((selector) => {
38
- return updateAllClasses(selector, (className, { withPseudo }) => {
39
- return withPseudo(`first-line${config('separator')}${className}`, '::first-line')
40
- })
41
- })
42
- )
43
-
44
- addVariant('marker', [
45
- transformAllSelectors((selector) => {
46
- let variantSelector = updateAllClasses(selector, (className) => {
47
- return `marker${config('separator')}${className}`
48
- })
49
-
50
- return `${variantSelector} *::marker`
51
- }),
52
- transformAllSelectors((selector) => {
53
- return updateAllClasses(selector, (className, { withPseudo }) => {
54
- return withPseudo(`marker${config('separator')}${className}`, '::marker')
55
- })
56
- }),
57
- ])
58
-
59
- addVariant('selection', [
60
- transformAllSelectors((selector) => {
61
- let variantSelector = updateAllClasses(selector, (className) => {
62
- return `selection${config('separator')}${className}`
63
- })
64
-
65
- return `${variantSelector} *::selection`
66
- }),
67
- transformAllSelectors((selector) => {
68
- return updateAllClasses(selector, (className, { withPseudo }) => {
69
- return withPseudo(`selection${config('separator')}${className}`, '::selection')
70
- })
71
- }),
72
- ])
73
-
74
- addVariant(
75
- 'file',
76
- transformAllSelectors((selector) => {
77
- return updateAllClasses(selector, (className, { withPseudo }) => {
78
- return withPseudo(`file${config('separator')}${className}`, '::file-selector-button')
79
- })
80
- })
81
- )
82
-
83
- addVariant(
84
- 'before',
85
- transformAllSelectors(
86
- (selector) => {
87
- return updateAllClasses(selector, (className, { withPseudo }) => {
88
- return withPseudo(`before${config('separator')}${className}`, '::before')
89
- })
90
- },
91
- {
92
- withRule: (rule) => {
93
- let foundContent = false
94
- rule.walkDecls('content', () => {
95
- foundContent = true
96
- })
97
- if (!foundContent) {
98
- rule.prepend(postcss.decl({ prop: 'content', value: '""' }))
99
- }
100
- },
101
- }
102
- )
103
- )
104
-
105
- addVariant(
106
- 'after',
107
- transformAllSelectors(
108
- (selector) => {
109
- return updateAllClasses(selector, (className, { withPseudo }) => {
110
- return withPseudo(`after${config('separator')}${className}`, '::after')
111
- })
112
- },
113
- {
114
- withRule: (rule) => {
115
- let foundContent = false
116
- rule.walkDecls('content', () => {
117
- foundContent = true
118
- })
119
- if (!foundContent) {
120
- rule.prepend(postcss.decl({ prop: 'content', value: '""' }))
121
- }
122
- },
123
- }
124
- )
125
- )
126
- },
127
-
128
- pseudoClassVariants: ({ config, addVariant }) => {
129
- let pseudoVariants = [
130
- // Positional
131
- ['first', ':first-child'],
132
- ['last', ':last-child'],
133
- ['only', ':only-child'],
134
- ['odd', ':nth-child(odd)'],
135
- ['even', ':nth-child(even)'],
136
- 'first-of-type',
137
- 'last-of-type',
138
- 'only-of-type',
139
-
140
- // State
141
- 'visited',
142
- 'target',
143
- ['open', '[open]'],
144
-
145
- // Forms
146
- 'default',
147
- 'checked',
148
- 'indeterminate',
149
- 'placeholder-shown',
150
- 'autofill',
151
- 'required',
152
- 'valid',
153
- 'invalid',
154
- 'in-range',
155
- 'out-of-range',
156
- 'read-only',
157
-
158
- // Content
159
- 'empty',
160
-
161
- // Interactive
162
- 'focus-within',
163
- 'hover',
164
- 'focus',
165
- 'focus-visible',
166
- 'active',
167
- 'disabled',
168
- ]
169
-
170
- for (let variant of pseudoVariants) {
171
- let [variantName, state] = Array.isArray(variant) ? variant : [variant, `:${variant}`]
172
-
173
- addVariant(
174
- variantName,
175
- transformAllClasses((className, { withAttr, withPseudo }) => {
176
- if (state.startsWith(':')) {
177
- return withPseudo(`${variantName}${config('separator')}${className}`, state)
178
- } else if (state.startsWith('[')) {
179
- return withAttr(`${variantName}${config('separator')}${className}`, state)
180
- }
181
- })
182
- )
183
- }
184
-
185
- let groupMarker = prefixSelector(config('prefix'), '.group')
186
- for (let variant of pseudoVariants) {
187
- let [variantName, state] = Array.isArray(variant) ? variant : [variant, `:${variant}`]
188
- let groupVariantName = `group-${variantName}`
189
-
190
- addVariant(
191
- groupVariantName,
192
- transformAllSelectors((selector) => {
193
- let variantSelector = updateAllClasses(selector, (className) => {
194
- if (`.${className}` === groupMarker) return className
195
- return `${groupVariantName}${config('separator')}${className}`
196
- })
197
-
198
- if (variantSelector === selector) {
199
- return null
200
- }
201
-
202
- return applyStateToMarker(
203
- variantSelector,
204
- groupMarker,
205
- state,
206
- (marker, selector) => `${marker} ${selector}`
207
- )
208
- })
209
- )
210
- }
211
-
212
- let peerMarker = prefixSelector(config('prefix'), '.peer')
213
- for (let variant of pseudoVariants) {
214
- let [variantName, state] = Array.isArray(variant) ? variant : [variant, `:${variant}`]
215
- let peerVariantName = `peer-${variantName}`
216
-
217
- addVariant(
218
- peerVariantName,
219
- transformAllSelectors((selector) => {
220
- let variantSelector = updateAllClasses(selector, (className) => {
221
- if (`.${className}` === peerMarker) return className
222
- return `${peerVariantName}${config('separator')}${className}`
223
- })
224
-
225
- if (variantSelector === selector) {
226
- return null
227
- }
228
-
229
- return applyStateToMarker(variantSelector, peerMarker, state, (marker, selector) =>
230
- selector.trim().startsWith('~') ? `${marker}${selector}` : `${marker} ~ ${selector}`
231
- )
232
- })
233
- )
234
- }
235
- },
236
-
237
- directionVariants: ({ config, addVariant }) => {
238
- addVariant(
239
- 'ltr',
240
- transformAllSelectors(
241
- (selector) =>
242
- `[dir="ltr"] ${updateAllClasses(
243
- selector,
244
- (className) => `ltr${config('separator')}${className}`
245
- )}`
246
- )
247
- )
248
-
249
- addVariant(
250
- 'rtl',
251
- transformAllSelectors(
252
- (selector) =>
253
- `[dir="rtl"] ${updateAllClasses(
254
- selector,
255
- (className) => `rtl${config('separator')}${className}`
256
- )}`
257
- )
258
- )
259
- },
260
-
261
- reducedMotionVariants: ({ config, addVariant }) => {
262
- addVariant(
263
- 'motion-safe',
264
- transformLastClasses(
265
- (className) => {
266
- return `motion-safe${config('separator')}${className}`
267
- },
268
- {
269
- wrap: () =>
270
- postcss.atRule({
271
- name: 'media',
272
- params: '(prefers-reduced-motion: no-preference)',
273
- }),
274
- }
275
- )
276
- )
277
-
278
- addVariant(
279
- 'motion-reduce',
280
- transformLastClasses(
281
- (className) => {
282
- return `motion-reduce${config('separator')}${className}`
283
- },
284
- {
285
- wrap: () =>
286
- postcss.atRule({
287
- name: 'media',
288
- params: '(prefers-reduced-motion: reduce)',
289
- }),
290
- }
291
- )
292
- )
293
- },
294
-
295
- darkVariants: ({ config, addVariant }) => {
296
- let mode = config('darkMode', 'media')
297
- if (mode === false) {
298
- mode = 'media'
299
- log.warn([
300
- '`darkMode` is set to `false` in your config.',
301
- 'This will behave just like the `media` value.',
302
- ])
303
- }
304
-
305
- if (mode === 'class') {
306
- addVariant(
307
- 'dark',
308
- transformAllSelectors((selector) => {
309
- let variantSelector = updateLastClasses(selector, (className) => {
310
- return `dark${config('separator')}${className}`
311
- })
312
-
313
- if (variantSelector === selector) {
314
- return null
315
- }
316
-
317
- let darkSelector = prefixSelector(config('prefix'), `.dark`)
318
-
319
- return `${darkSelector} ${variantSelector}`
320
- })
321
- )
322
- } else if (mode === 'media') {
323
- addVariant(
324
- 'dark',
325
- transformLastClasses(
326
- (className) => {
327
- return `dark${config('separator')}${className}`
328
- },
329
- {
330
- wrap: () =>
331
- postcss.atRule({
332
- name: 'media',
333
- params: '(prefers-color-scheme: dark)',
334
- }),
335
- }
336
- )
337
- )
338
- }
339
- },
340
-
341
- screenVariants: ({ config, theme, addVariant }) => {
342
- for (let screen in theme('screens')) {
343
- let size = theme('screens')[screen]
344
- let query = buildMediaQuery(size)
345
-
346
- addVariant(
347
- screen,
348
- transformLastClasses(
349
- (className) => {
350
- return `${screen}${config('separator')}${className}`
351
- },
352
- { wrap: () => postcss.atRule({ name: 'media', params: query }) }
353
- )
354
- )
355
- }
356
- },
357
-
358
- // Actual plugins
359
- preflight: ({ addBase }) => {
360
- let preflightStyles = postcss.parse(fs.readFileSync(`${__dirname}/css/preflight.css`, 'utf8'))
361
-
362
- addBase([
363
- postcss.comment({
364
- text: `! tailwindcss v${tailwindVersion} | MIT License | https://tailwindcss.com`,
365
- }),
366
- ...preflightStyles.nodes,
367
- ])
368
- },
369
-
370
- container: (() => {
371
- function extractMinWidths(breakpoints) {
372
- return Object.values(breakpoints ?? {}).flatMap((breakpoints) => {
373
- if (typeof breakpoints === 'string') {
374
- breakpoints = { min: breakpoints }
375
- }
376
-
377
- if (!Array.isArray(breakpoints)) {
378
- breakpoints = [breakpoints]
379
- }
380
-
381
- return breakpoints
382
- .filter((breakpoint) => {
383
- return breakpoint?.hasOwnProperty?.('min') || breakpoint?.hasOwnProperty('min-width')
384
- })
385
- .map((breakpoint) => {
386
- return breakpoint['min-width'] ?? breakpoint.min
387
- })
388
- })
389
- }
390
-
391
- function mapMinWidthsToPadding(minWidths, screens, paddings) {
392
- if (typeof paddings === 'undefined') {
393
- return []
394
- }
395
-
396
- if (!(typeof paddings === 'object' && paddings !== null)) {
397
- return [
398
- {
399
- screen: 'DEFAULT',
400
- minWidth: 0,
401
- padding: paddings,
402
- },
403
- ]
404
- }
405
-
406
- let mapping = []
407
-
408
- if (paddings.DEFAULT) {
409
- mapping.push({
410
- screen: 'DEFAULT',
411
- minWidth: 0,
412
- padding: paddings.DEFAULT,
413
- })
414
- }
415
-
416
- for (let minWidth of minWidths) {
417
- for (let [screen, value] of Object.entries(screens)) {
418
- let screenMinWidth =
419
- typeof value === 'object' && value !== null ? value.min || value['min-width'] : value
420
-
421
- if (`${screenMinWidth}` === `${minWidth}`) {
422
- mapping.push({
423
- screen,
424
- minWidth,
425
- padding: paddings[screen],
426
- })
427
- }
428
- }
429
- }
430
-
431
- return mapping
432
- }
433
-
434
- return function ({ addComponents, theme }) {
435
- let screens = theme('container.screens', theme('screens'))
436
- let minWidths = extractMinWidths(screens)
437
- let paddings = mapMinWidthsToPadding(minWidths, screens, theme('container.padding'))
438
-
439
- let generatePaddingFor = (minWidth) => {
440
- let paddingConfig = paddings.find((padding) => `${padding.minWidth}` === `${minWidth}`)
441
-
442
- if (!paddingConfig) {
443
- return {}
444
- }
445
-
446
- return {
447
- paddingRight: paddingConfig.padding,
448
- paddingLeft: paddingConfig.padding,
449
- }
450
- }
451
-
452
- let atRules = Array.from(
453
- new Set(minWidths.slice().sort((a, z) => parseInt(a) - parseInt(z)))
454
- ).map((minWidth) => ({
455
- [`@media (min-width: ${minWidth})`]: {
456
- '.container': {
457
- 'max-width': minWidth,
458
- ...generatePaddingFor(minWidth),
459
- },
460
- },
461
- }))
462
-
463
- addComponents([
464
- {
465
- '.container': Object.assign(
466
- { width: '100%' },
467
- theme('container.center', false) ? { marginRight: 'auto', marginLeft: 'auto' } : {},
468
- generatePaddingFor(0)
469
- ),
470
- },
471
- ...atRules,
472
- ])
473
- }
474
- })(),
475
-
476
- accessibility: ({ addUtilities }) => {
477
- addUtilities({
478
- '.sr-only': {
479
- position: 'absolute',
480
- width: '1px',
481
- height: '1px',
482
- padding: '0',
483
- margin: '-1px',
484
- overflow: 'hidden',
485
- clip: 'rect(0, 0, 0, 0)',
486
- whiteSpace: 'nowrap',
487
- borderWidth: '0',
488
- },
489
- '.not-sr-only': {
490
- position: 'static',
491
- width: 'auto',
492
- height: 'auto',
493
- padding: '0',
494
- margin: '0',
495
- overflow: 'visible',
496
- clip: 'auto',
497
- whiteSpace: 'normal',
498
- },
499
- })
500
- },
501
-
502
- pointerEvents: ({ addUtilities }) => {
503
- addUtilities({
504
- '.pointer-events-none': { 'pointer-events': 'none' },
505
- '.pointer-events-auto': { 'pointer-events': 'auto' },
506
- })
507
- },
508
-
509
- visibility: ({ addUtilities }) => {
510
- addUtilities({
511
- '.visible': { visibility: 'visible' },
512
- '.invisible': { visibility: 'hidden' },
513
- })
514
- },
515
-
516
- position: ({ addUtilities }) => {
517
- addUtilities({
518
- '.static': { position: 'static' },
519
- '.fixed': { position: 'fixed' },
520
- '.absolute': { position: 'absolute' },
521
- '.relative': { position: 'relative' },
522
- '.sticky': { position: 'sticky' },
523
- })
524
- },
525
-
526
- inset: createUtilityPlugin('inset', [
527
- ['inset', ['top', 'right', 'bottom', 'left']],
528
- [
529
- ['inset-x', ['left', 'right']],
530
- ['inset-y', ['top', 'bottom']],
531
- ],
532
- [
533
- ['top', ['top']],
534
- ['right', ['right']],
535
- ['bottom', ['bottom']],
536
- ['left', ['left']],
537
- ],
538
- ]),
539
-
540
- isolation: ({ addUtilities }) => {
541
- addUtilities({
542
- '.isolate': { isolation: 'isolate' },
543
- '.isolation-auto': { isolation: 'auto' },
544
- })
545
- },
546
-
547
- zIndex: createUtilityPlugin('zIndex', [['z', ['zIndex']]]),
548
- order: createUtilityPlugin('order'),
549
- gridColumn: createUtilityPlugin('gridColumn', [['col', ['gridColumn']]]),
550
- gridColumnStart: createUtilityPlugin('gridColumnStart', [['col-start', ['gridColumnStart']]]),
551
- gridColumnEnd: createUtilityPlugin('gridColumnEnd', [['col-end', ['gridColumnEnd']]]),
552
- gridRow: createUtilityPlugin('gridRow', [['row', ['gridRow']]]),
553
- gridRowStart: createUtilityPlugin('gridRowStart', [['row-start', ['gridRowStart']]]),
554
- gridRowEnd: createUtilityPlugin('gridRowEnd', [['row-end', ['gridRowEnd']]]),
555
-
556
- float: ({ addUtilities }) => {
557
- addUtilities({
558
- '.float-right': { float: 'right' },
559
- '.float-left': { float: 'left' },
560
- '.float-none': { float: 'none' },
561
- })
562
- },
563
-
564
- clear: ({ addUtilities }) => {
565
- addUtilities({
566
- '.clear-left': { clear: 'left' },
567
- '.clear-right': { clear: 'right' },
568
- '.clear-both': { clear: 'both' },
569
- '.clear-none': { clear: 'none' },
570
- })
571
- },
572
-
573
- margin: createUtilityPlugin('margin', [
574
- ['m', ['margin']],
575
- [
576
- ['mx', ['margin-left', 'margin-right']],
577
- ['my', ['margin-top', 'margin-bottom']],
578
- ],
579
- [
580
- ['mt', ['margin-top']],
581
- ['mr', ['margin-right']],
582
- ['mb', ['margin-bottom']],
583
- ['ml', ['margin-left']],
584
- ],
585
- ]),
586
-
587
- boxSizing: ({ addUtilities }) => {
588
- addUtilities({
589
- '.box-border': { 'box-sizing': 'border-box' },
590
- '.box-content': { 'box-sizing': 'content-box' },
591
- })
592
- },
593
-
594
- display: ({ addUtilities }) => {
595
- addUtilities({
596
- '.block': { display: 'block' },
597
- '.inline-block': { display: 'inline-block' },
598
- '.inline': { display: 'inline' },
599
- '.flex': { display: 'flex' },
600
- '.inline-flex': { display: 'inline-flex' },
601
- '.table': { display: 'table' },
602
- '.inline-table': { display: 'inline-table' },
603
- '.table-caption': { display: 'table-caption' },
604
- '.table-cell': { display: 'table-cell' },
605
- '.table-column': { display: 'table-column' },
606
- '.table-column-group': { display: 'table-column-group' },
607
- '.table-footer-group': { display: 'table-footer-group' },
608
- '.table-header-group': { display: 'table-header-group' },
609
- '.table-row-group': { display: 'table-row-group' },
610
- '.table-row': { display: 'table-row' },
611
- '.flow-root': { display: 'flow-root' },
612
- '.grid': { display: 'grid' },
613
- '.inline-grid': { display: 'inline-grid' },
614
- '.contents': { display: 'contents' },
615
- '.list-item': { display: 'list-item' },
616
- '.hidden': { display: 'none' },
617
- })
618
- },
619
-
620
- aspectRatio: createUtilityPlugin('aspectRatio', [['aspect', ['aspect-ratio']]]),
621
-
622
- height: createUtilityPlugin('height', [['h', ['height']]]),
623
- maxHeight: createUtilityPlugin('maxHeight', [['max-h', ['maxHeight']]]),
624
- minHeight: createUtilityPlugin('minHeight', [['min-h', ['minHeight']]]),
625
-
626
- width: createUtilityPlugin('width', [['w', ['width']]]),
627
- minWidth: createUtilityPlugin('minWidth', [['min-w', ['minWidth']]]),
628
- maxWidth: createUtilityPlugin('maxWidth', [['max-w', ['maxWidth']]]),
629
-
630
- flex: createUtilityPlugin('flex'),
631
- flexShrink: createUtilityPlugin('flexShrink', [['flex-shrink', ['flex-shrink']]]),
632
- flexGrow: createUtilityPlugin('flexGrow', [['flex-grow', ['flex-grow']]]),
633
-
634
- tableLayout: ({ addUtilities }) => {
635
- addUtilities({
636
- '.table-auto': { 'table-layout': 'auto' },
637
- '.table-fixed': { 'table-layout': 'fixed' },
638
- })
639
- },
640
-
641
- borderCollapse: ({ addUtilities }) => {
642
- addUtilities({
643
- '.border-collapse': { 'border-collapse': 'collapse' },
644
- '.border-separate': { 'border-collapse': 'separate' },
645
- })
646
- },
647
-
648
- transformOrigin: createUtilityPlugin('transformOrigin', [['origin', ['transformOrigin']]]),
649
- translate: createUtilityPlugin('translate', [
650
- [
651
- [
652
- 'translate-x',
653
- [['@defaults transform', {}], '--tw-translate-x', ['transform', 'var(--tw-transform)']],
654
- ],
655
- [
656
- 'translate-y',
657
- [['@defaults transform', {}], '--tw-translate-y', ['transform', 'var(--tw-transform)']],
658
- ],
659
- ],
660
- ]),
661
- rotate: createUtilityPlugin('rotate', [
662
- ['rotate', [['@defaults transform', {}], '--tw-rotate', ['transform', 'var(--tw-transform)']]],
663
- ]),
664
- skew: createUtilityPlugin('skew', [
665
- [
666
- [
667
- 'skew-x',
668
- [['@defaults transform', {}], '--tw-skew-x', ['transform', 'var(--tw-transform)']],
669
- ],
670
- [
671
- 'skew-y',
672
- [['@defaults transform', {}], '--tw-skew-y', ['transform', 'var(--tw-transform)']],
673
- ],
674
- ],
675
- ]),
676
- scale: createUtilityPlugin('scale', [
677
- [
678
- 'scale',
679
- [
680
- ['@defaults transform', {}],
681
- '--tw-scale-x',
682
- '--tw-scale-y',
683
- ['transform', 'var(--tw-transform)'],
684
- ],
685
- ],
686
- [
687
- [
688
- 'scale-x',
689
- [['@defaults transform', {}], '--tw-scale-x', ['transform', 'var(--tw-transform)']],
690
- ],
691
- [
692
- 'scale-y',
693
- [['@defaults transform', {}], '--tw-scale-y', ['transform', 'var(--tw-transform)']],
694
- ],
695
- ],
696
- ]),
697
-
698
- transform: ({ addBase, addUtilities }) => {
699
- addBase({
700
- '@defaults transform': {
701
- '--tw-translate-x': '0',
702
- '--tw-translate-y': '0',
703
- '--tw-rotate': '0',
704
- '--tw-skew-x': '0',
705
- '--tw-skew-y': '0',
706
- '--tw-scale-x': '1',
707
- '--tw-scale-y': '1',
708
- '--tw-transform': [
709
- 'translateX(var(--tw-translate-x))',
710
- 'translateY(var(--tw-translate-y))',
711
- 'rotate(var(--tw-rotate))',
712
- 'skewX(var(--tw-skew-x))',
713
- 'skewY(var(--tw-skew-y))',
714
- 'scaleX(var(--tw-scale-x))',
715
- 'scaleY(var(--tw-scale-y))',
716
- ].join(' '),
717
- },
718
- })
719
- addUtilities({
720
- '.transform': { '@defaults transform': {}, transform: 'var(--tw-transform)' },
721
- '.transform-cpu': {
722
- '--tw-transform': [
723
- 'translateX(var(--tw-translate-x))',
724
- 'translateY(var(--tw-translate-y))',
725
- 'rotate(var(--tw-rotate))',
726
- 'skewX(var(--tw-skew-x))',
727
- 'skewY(var(--tw-skew-y))',
728
- 'scaleX(var(--tw-scale-x))',
729
- 'scaleY(var(--tw-scale-y))',
730
- ].join(' '),
731
- },
732
- '.transform-gpu': {
733
- '--tw-transform': [
734
- 'translate3d(var(--tw-translate-x), var(--tw-translate-y), 0)',
735
- 'rotate(var(--tw-rotate))',
736
- 'skewX(var(--tw-skew-x))',
737
- 'skewY(var(--tw-skew-y))',
738
- 'scaleX(var(--tw-scale-x))',
739
- 'scaleY(var(--tw-scale-y))',
740
- ].join(' '),
741
- },
742
- '.transform-none': { transform: 'none' },
743
- })
744
- },
745
-
746
- animation: ({ matchUtilities, theme, prefix }) => {
747
- let prefixName = (name) => prefix(`.${name}`).slice(1)
748
- let keyframes = Object.fromEntries(
749
- Object.entries(theme('keyframes') ?? {}).map(([key, value]) => {
750
- return [key, [{ [`@keyframes ${prefixName(key)}`]: value }]]
751
- })
752
- )
753
-
754
- matchUtilities(
755
- {
756
- animate: (value, { includeRules }) => {
757
- let animations = parseAnimationValue(value)
758
-
759
- for (let { name } of animations) {
760
- if (keyframes[name] !== undefined) {
761
- includeRules(keyframes[name], { respectImportant: false })
762
- }
763
- }
764
-
765
- return {
766
- animation: animations
767
- .map(({ name, value }) => {
768
- if (name === undefined || keyframes[name] === undefined) {
769
- return value
770
- }
771
- return value.replace(name, prefixName(name))
772
- })
773
- .join(', '),
774
- }
775
- },
776
- },
777
- { values: theme('animation') }
778
- )
779
- },
780
-
781
- cursor: createUtilityPlugin('cursor'),
782
-
783
- touchAction: ({ addUtilities }) => {
784
- addUtilities({
785
- '.touch-auto': { 'touch-action': 'auto' },
786
- '.touch-none': { 'touch-action': 'none' },
787
- '.touch-pan-x': { 'touch-action': 'pan-x' },
788
- '.touch-pan-left': { 'touch-action': 'pan-left' },
789
- '.touch-pan-right': { 'touch-action': 'pan-right' },
790
- '.touch-pan-y': { 'touch-action': 'pan-y' },
791
- '.touch-pan-up': { 'touch-action': 'pan-up' },
792
- '.touch-pan-down': { 'touch-action': 'pan-down' },
793
- '.touch-pinch-zoom': { 'touch-action': 'pinch-zoom' },
794
- '.touch-manipulation': { 'touch-action': 'manipulation' },
795
- })
796
- },
797
-
798
- userSelect: ({ addUtilities }) => {
799
- addUtilities({
800
- '.select-none': { 'user-select': 'none' },
801
- '.select-text': { 'user-select': 'text' },
802
- '.select-all': { 'user-select': 'all' },
803
- '.select-auto': { 'user-select': 'auto' },
804
- })
805
- },
806
-
807
- resize: ({ addUtilities }) => {
808
- addUtilities({
809
- '.resize-none': { resize: 'none' },
810
- '.resize-y': { resize: 'vertical' },
811
- '.resize-x': { resize: 'horizontal' },
812
- '.resize': { resize: 'both' },
813
- })
814
- },
815
-
816
- scrollSnapType: ({ addUtilities, addBase }) => {
817
- addBase({
818
- '@defaults scroll-snap-type': {
819
- '--tw-scroll-snap-strictness': 'proximity',
820
- },
821
- })
822
-
823
- addUtilities({
824
- '.snap-none': { 'scroll-snap-type': 'none' },
825
- '.snap-x': {
826
- '@defaults scroll-snap-type': {},
827
- 'scroll-snap-type': 'x var(--tw-scroll-snap-strictness)',
828
- },
829
- '.snap-y': {
830
- '@defaults scroll-snap-type': {},
831
- 'scroll-snap-type': 'y var(--tw-scroll-snap-strictness)',
832
- },
833
- '.snap-both': {
834
- '@defaults scroll-snap-type': {},
835
- 'scroll-snap-type': 'both var(--tw-scroll-snap-strictness)',
836
- },
837
- '.snap-mandatory': { '--tw-scroll-snap-strictness': 'mandatory' },
838
- '.snap-proximity': { '--tw-scroll-snap-strictness': 'proximity' },
839
- })
840
- },
841
-
842
- scrollSnapAlign: ({ addUtilities }) => {
843
- addUtilities({
844
- '.snap-start': { 'scroll-snap-align': 'start' },
845
- '.snap-end': { 'scroll-snap-align': 'end' },
846
- '.snap-center': { 'scroll-snap-align': 'center' },
847
- '.snap-align-none': { 'scroll-snap-align': 'none' },
848
- })
849
- },
850
-
851
- scrollSnapStop: ({ addUtilities }) => {
852
- addUtilities({
853
- '.snap-normal': { 'scroll-snap-stop': 'normal' },
854
- '.snap-always': { 'scroll-snap-stop': 'always' },
855
- })
856
- },
857
-
858
- scrollMargin: createUtilityPlugin('scrollMargin', [
859
- ['scroll-m', ['scroll-margin']],
860
- [
861
- ['scroll-mx', ['scroll-margin-left', 'scroll-margin-right']],
862
- ['scroll-my', ['scroll-margin-top', 'scroll-margin-bottom']],
863
- ],
864
- [
865
- ['scroll-mt', ['scroll-margin-top']],
866
- ['scroll-mr', ['scroll-margin-right']],
867
- ['scroll-mb', ['scroll-margin-bottom']],
868
- ['scroll-ml', ['scroll-margin-left']],
869
- ],
870
- ]),
871
-
872
- scrollPadding: createUtilityPlugin('scrollPadding', [
873
- ['scroll-p', ['scroll-padding']],
874
- [
875
- ['scroll-px', ['scroll-padding-left', 'scroll-padding-right']],
876
- ['scroll-py', ['scroll-padding-top', 'scroll-padding-bottom']],
877
- ],
878
- [
879
- ['scroll-pt', ['scroll-padding-top']],
880
- ['scroll-pr', ['scroll-padding-right']],
881
- ['scroll-pb', ['scroll-padding-bottom']],
882
- ['scroll-pl', ['scroll-padding-left']],
883
- ],
884
- ]),
885
-
886
- listStylePosition: ({ addUtilities }) => {
887
- addUtilities({
888
- '.list-inside': { 'list-style-position': 'inside' },
889
- '.list-outside': { 'list-style-position': 'outside' },
890
- })
891
- },
892
-
893
- listStyleType: createUtilityPlugin('listStyleType', [['list', ['listStyleType']]]),
894
-
895
- appearance: ({ addUtilities }) => {
896
- addUtilities({
897
- '.appearance-none': { appearance: 'none' },
898
- })
899
- },
900
-
901
- columns: createUtilityPlugin('columns', [['columns', ['columns']]]),
902
-
903
- breakBefore: ({ addUtilities }) => {
904
- addUtilities({
905
- '.break-before-auto': { 'break-before': 'auto' },
906
- '.break-before-avoid': { 'break-before': 'avoid' },
907
- '.break-before-all': { 'break-before': 'all' },
908
- '.break-before-avoid-page': { 'break-before': 'avoid-page' },
909
- '.break-before-page': { 'break-before': 'page' },
910
- '.break-before-left': { 'break-before': 'left' },
911
- '.break-before-right': { 'break-before': 'right' },
912
- '.break-before-column': { 'break-before': 'column' },
913
- })
914
- },
915
-
916
- breakInside: ({ addUtilities }) => {
917
- addUtilities({
918
- '.break-inside-auto': { 'break-inside': 'auto' },
919
- '.break-inside-avoid': { 'break-inside': 'avoid' },
920
- '.break-inside-avoid-page': { 'break-inside': 'avoid-page' },
921
- '.break-inside-avoid-column': { 'break-inside': 'avoid-column' },
922
- })
923
- },
924
-
925
- breakAfter: ({ addUtilities }) => {
926
- addUtilities({
927
- '.break-after-auto': { 'break-after': 'auto' },
928
- '.break-after-avoid': { 'break-after': 'avoid' },
929
- '.break-after-all': { 'break-after': 'all' },
930
- '.break-after-avoid-page': { 'break-after': 'avoid-page' },
931
- '.break-after-page': { 'break-after': 'page' },
932
- '.break-after-left': { 'break-after': 'left' },
933
- '.break-after-right': { 'break-after': 'right' },
934
- '.break-after-column': { 'break-after': 'column' },
935
- })
936
- },
937
-
938
- gridAutoColumns: createUtilityPlugin('gridAutoColumns', [['auto-cols', ['gridAutoColumns']]]),
939
-
940
- gridAutoFlow: ({ addUtilities }) => {
941
- addUtilities({
942
- '.grid-flow-row': { gridAutoFlow: 'row' },
943
- '.grid-flow-col': { gridAutoFlow: 'column' },
944
- '.grid-flow-row-dense': { gridAutoFlow: 'row dense' },
945
- '.grid-flow-col-dense': { gridAutoFlow: 'column dense' },
946
- })
947
- },
948
-
949
- gridAutoRows: createUtilityPlugin('gridAutoRows', [['auto-rows', ['gridAutoRows']]]),
950
- gridTemplateColumns: createUtilityPlugin('gridTemplateColumns', [
951
- ['grid-cols', ['gridTemplateColumns']],
952
- ]),
953
- gridTemplateRows: createUtilityPlugin('gridTemplateRows', [['grid-rows', ['gridTemplateRows']]]),
954
-
955
- flexDirection: ({ addUtilities }) => {
956
- addUtilities({
957
- '.flex-row': { 'flex-direction': 'row' },
958
- '.flex-row-reverse': { 'flex-direction': 'row-reverse' },
959
- '.flex-col': { 'flex-direction': 'column' },
960
- '.flex-col-reverse': { 'flex-direction': 'column-reverse' },
961
- })
962
- },
963
-
964
- flexWrap: ({ addUtilities }) => {
965
- addUtilities({
966
- '.flex-wrap': { 'flex-wrap': 'wrap' },
967
- '.flex-wrap-reverse': { 'flex-wrap': 'wrap-reverse' },
968
- '.flex-nowrap': { 'flex-wrap': 'nowrap' },
969
- })
970
- },
971
-
972
- placeContent: ({ addUtilities }) => {
973
- addUtilities({
974
- '.place-content-center': { 'place-content': 'center' },
975
- '.place-content-start': { 'place-content': 'start' },
976
- '.place-content-end': { 'place-content': 'end' },
977
- '.place-content-between': { 'place-content': 'space-between' },
978
- '.place-content-around': { 'place-content': 'space-around' },
979
- '.place-content-evenly': { 'place-content': 'space-evenly' },
980
- '.place-content-stretch': { 'place-content': 'stretch' },
981
- })
982
- },
983
-
984
- placeItems: ({ addUtilities }) => {
985
- addUtilities({
986
- '.place-items-start': { 'place-items': 'start' },
987
- '.place-items-end': { 'place-items': 'end' },
988
- '.place-items-center': { 'place-items': 'center' },
989
- '.place-items-stretch': { 'place-items': 'stretch' },
990
- })
991
- },
992
-
993
- alignContent: ({ addUtilities }) => {
994
- addUtilities({
995
- '.content-center': { 'align-content': 'center' },
996
- '.content-start': { 'align-content': 'flex-start' },
997
- '.content-end': { 'align-content': 'flex-end' },
998
- '.content-between': { 'align-content': 'space-between' },
999
- '.content-around': { 'align-content': 'space-around' },
1000
- '.content-evenly': { 'align-content': 'space-evenly' },
1001
- })
1002
- },
1003
-
1004
- alignItems: ({ addUtilities }) => {
1005
- addUtilities({
1006
- '.items-start': { 'align-items': 'flex-start' },
1007
- '.items-end': { 'align-items': 'flex-end' },
1008
- '.items-center': { 'align-items': 'center' },
1009
- '.items-baseline': { 'align-items': 'baseline' },
1010
- '.items-stretch': { 'align-items': 'stretch' },
1011
- })
1012
- },
1013
-
1014
- justifyContent: ({ addUtilities }) => {
1015
- addUtilities({
1016
- '.justify-start': { 'justify-content': 'flex-start' },
1017
- '.justify-end': { 'justify-content': 'flex-end' },
1018
- '.justify-center': { 'justify-content': 'center' },
1019
- '.justify-between': { 'justify-content': 'space-between' },
1020
- '.justify-around': { 'justify-content': 'space-around' },
1021
- '.justify-evenly': { 'justify-content': 'space-evenly' },
1022
- })
1023
- },
1024
-
1025
- justifyItems: ({ addUtilities }) => {
1026
- addUtilities({
1027
- '.justify-items-start': { 'justify-items': 'start' },
1028
- '.justify-items-end': { 'justify-items': 'end' },
1029
- '.justify-items-center': { 'justify-items': 'center' },
1030
- '.justify-items-stretch': { 'justify-items': 'stretch' },
1031
- })
1032
- },
1033
-
1034
- gap: createUtilityPlugin('gap', [
1035
- ['gap', ['gap']],
1036
- [
1037
- ['gap-x', ['columnGap']],
1038
- ['gap-y', ['rowGap']],
1039
- ],
1040
- ]),
1041
-
1042
- space: ({ matchUtilities, addUtilities, theme }) => {
1043
- matchUtilities(
1044
- {
1045
- 'space-x': (value) => {
1046
- value = value === '0' ? '0px' : value
1047
-
1048
- return {
1049
- '& > :not([hidden]) ~ :not([hidden])': {
1050
- '--tw-space-x-reverse': '0',
1051
- 'margin-right': `calc(${value} * var(--tw-space-x-reverse))`,
1052
- 'margin-left': `calc(${value} * calc(1 - var(--tw-space-x-reverse)))`,
1053
- },
1054
- }
1055
- },
1056
- 'space-y': (value) => {
1057
- value = value === '0' ? '0px' : value
1058
-
1059
- return {
1060
- '& > :not([hidden]) ~ :not([hidden])': {
1061
- '--tw-space-y-reverse': '0',
1062
- 'margin-top': `calc(${value} * calc(1 - var(--tw-space-y-reverse)))`,
1063
- 'margin-bottom': `calc(${value} * var(--tw-space-y-reverse))`,
1064
- },
1065
- }
1066
- },
1067
- },
1068
- { values: theme('space') }
1069
- )
1070
-
1071
- addUtilities({
1072
- '.space-y-reverse > :not([hidden]) ~ :not([hidden])': { '--tw-space-y-reverse': '1' },
1073
- '.space-x-reverse > :not([hidden]) ~ :not([hidden])': { '--tw-space-x-reverse': '1' },
1074
- })
1075
- },
1076
-
1077
- divideWidth: ({ matchUtilities, addUtilities, theme }) => {
1078
- matchUtilities(
1079
- {
1080
- 'divide-x': (value) => {
1081
- value = value === '0' ? '0px' : value
1082
-
1083
- return {
1084
- '& > :not([hidden]) ~ :not([hidden])': {
1085
- '@defaults border-width': {},
1086
- '--tw-divide-x-reverse': '0',
1087
- 'border-right-width': `calc(${value} * var(--tw-divide-x-reverse))`,
1088
- 'border-left-width': `calc(${value} * calc(1 - var(--tw-divide-x-reverse)))`,
1089
- },
1090
- }
1091
- },
1092
- 'divide-y': (value) => {
1093
- value = value === '0' ? '0px' : value
1094
-
1095
- return {
1096
- '& > :not([hidden]) ~ :not([hidden])': {
1097
- '@defaults border-width': {},
1098
- '--tw-divide-y-reverse': '0',
1099
- 'border-top-width': `calc(${value} * calc(1 - var(--tw-divide-y-reverse)))`,
1100
- 'border-bottom-width': `calc(${value} * var(--tw-divide-y-reverse))`,
1101
- },
1102
- }
1103
- },
1104
- },
1105
- { values: theme('divideWidth'), type: ['line-width', 'length'] }
1106
- )
1107
-
1108
- addUtilities({
1109
- '.divide-y-reverse > :not([hidden]) ~ :not([hidden])': {
1110
- '@defaults border-width': {},
1111
- '--tw-divide-y-reverse': '1',
1112
- },
1113
- '.divide-x-reverse > :not([hidden]) ~ :not([hidden])': {
1114
- '@defaults border-width': {},
1115
- '--tw-divide-x-reverse': '1',
1116
- },
1117
- })
1118
- },
1119
-
1120
- divideStyle: ({ addUtilities }) => {
1121
- addUtilities({
1122
- '.divide-solid > :not([hidden]) ~ :not([hidden])': { 'border-style': 'solid' },
1123
- '.divide-dashed > :not([hidden]) ~ :not([hidden])': { 'border-style': 'dashed' },
1124
- '.divide-dotted > :not([hidden]) ~ :not([hidden])': { 'border-style': 'dotted' },
1125
- '.divide-double > :not([hidden]) ~ :not([hidden])': { 'border-style': 'double' },
1126
- '.divide-none > :not([hidden]) ~ :not([hidden])': { 'border-style': 'none' },
1127
- })
1128
- },
1129
-
1130
- divideColor: ({ matchUtilities, theme, corePlugins }) => {
1131
- matchUtilities(
1132
- {
1133
- divide: (value) => {
1134
- if (!corePlugins('divideOpacity')) {
1135
- return {
1136
- ['& > :not([hidden]) ~ :not([hidden])']: {
1137
- 'border-color': toColorValue(value),
1138
- },
1139
- }
1140
- }
1141
-
1142
- return {
1143
- ['& > :not([hidden]) ~ :not([hidden])']: withAlphaVariable({
1144
- color: value,
1145
- property: 'border-color',
1146
- variable: '--tw-divide-opacity',
1147
- }),
1148
- }
1149
- },
1150
- },
1151
- {
1152
- values: (({ DEFAULT: _, ...colors }) => colors)(flattenColorPalette(theme('divideColor'))),
1153
- type: 'color',
1154
- }
1155
- )
1156
- },
1157
-
1158
- divideOpacity: ({ matchUtilities, theme }) => {
1159
- matchUtilities(
1160
- {
1161
- 'divide-opacity': (value) => {
1162
- return { [`& > :not([hidden]) ~ :not([hidden])`]: { '--tw-divide-opacity': value } }
1163
- },
1164
- },
1165
- { values: theme('divideOpacity') }
1166
- )
1167
- },
1168
-
1169
- placeSelf: ({ addUtilities }) => {
1170
- addUtilities({
1171
- '.place-self-auto': { 'place-self': 'auto' },
1172
- '.place-self-start': { 'place-self': 'start' },
1173
- '.place-self-end': { 'place-self': 'end' },
1174
- '.place-self-center': { 'place-self': 'center' },
1175
- '.place-self-stretch': { 'place-self': 'stretch' },
1176
- })
1177
- },
1178
-
1179
- alignSelf: ({ addUtilities }) => {
1180
- addUtilities({
1181
- '.self-auto': { 'align-self': 'auto' },
1182
- '.self-start': { 'align-self': 'flex-start' },
1183
- '.self-end': { 'align-self': 'flex-end' },
1184
- '.self-center': { 'align-self': 'center' },
1185
- '.self-stretch': { 'align-self': 'stretch' },
1186
- '.self-baseline': { 'align-self': 'baseline' },
1187
- })
1188
- },
1189
-
1190
- justifySelf: ({ addUtilities }) => {
1191
- addUtilities({
1192
- '.justify-self-auto': { 'justify-self': 'auto' },
1193
- '.justify-self-start': { 'justify-self': 'start' },
1194
- '.justify-self-end': { 'justify-self': 'end' },
1195
- '.justify-self-center': { 'justify-self': 'center' },
1196
- '.justify-self-stretch': { 'justify-self': 'stretch' },
1197
- })
1198
- },
1199
-
1200
- overflow: ({ addUtilities }) => {
1201
- addUtilities({
1202
- '.overflow-auto': { overflow: 'auto' },
1203
- '.overflow-hidden': { overflow: 'hidden' },
1204
- '.overflow-clip': { overflow: 'clip' },
1205
- '.overflow-visible': { overflow: 'visible' },
1206
- '.overflow-scroll': { overflow: 'scroll' },
1207
- '.overflow-x-auto': { 'overflow-x': 'auto' },
1208
- '.overflow-y-auto': { 'overflow-y': 'auto' },
1209
- '.overflow-x-hidden': { 'overflow-x': 'hidden' },
1210
- '.overflow-y-hidden': { 'overflow-y': 'hidden' },
1211
- '.overflow-x-clip': { 'overflow-x': 'clip' },
1212
- '.overflow-y-clip': { 'overflow-y': 'clip' },
1213
- '.overflow-x-visible': { 'overflow-x': 'visible' },
1214
- '.overflow-y-visible': { 'overflow-y': 'visible' },
1215
- '.overflow-x-scroll': { 'overflow-x': 'scroll' },
1216
- '.overflow-y-scroll': { 'overflow-y': 'scroll' },
1217
- })
1218
- },
1219
-
1220
- overscrollBehavior: ({ addUtilities }) => {
1221
- addUtilities({
1222
- '.overscroll-auto': { 'overscroll-behavior': 'auto' },
1223
- '.overscroll-contain': { 'overscroll-behavior': 'contain' },
1224
- '.overscroll-none': { 'overscroll-behavior': 'none' },
1225
- '.overscroll-y-auto': { 'overscroll-behavior-y': 'auto' },
1226
- '.overscroll-y-contain': { 'overscroll-behavior-y': 'contain' },
1227
- '.overscroll-y-none': { 'overscroll-behavior-y': 'none' },
1228
- '.overscroll-x-auto': { 'overscroll-behavior-x': 'auto' },
1229
- '.overscroll-x-contain': { 'overscroll-behavior-x': 'contain' },
1230
- '.overscroll-x-none': { 'overscroll-behavior-x': 'none' },
1231
- })
1232
- },
1233
-
1234
- scrollBehavior: ({ addUtilities }) => {
1235
- addUtilities({
1236
- '.scroll-auto': { 'scroll-behavior': 'auto' },
1237
- '.scroll-smooth': { 'scroll-behavior': 'smooth' },
1238
- })
1239
- },
1240
-
1241
- textOverflow: ({ addUtilities }) => {
1242
- addUtilities({
1243
- '.truncate': { overflow: 'hidden', 'text-overflow': 'ellipsis', 'white-space': 'nowrap' },
1244
- '.overflow-ellipsis': { 'text-overflow': 'ellipsis' }, // Deprecated
1245
- '.text-ellipsis': { 'text-overflow': 'ellipsis' },
1246
- '.text-clip': { 'text-overflow': 'clip' },
1247
- })
1248
- },
1249
-
1250
- whitespace: ({ addUtilities }) => {
1251
- addUtilities({
1252
- '.whitespace-normal': { 'white-space': 'normal' },
1253
- '.whitespace-nowrap': { 'white-space': 'nowrap' },
1254
- '.whitespace-pre': { 'white-space': 'pre' },
1255
- '.whitespace-pre-line': { 'white-space': 'pre-line' },
1256
- '.whitespace-pre-wrap': { 'white-space': 'pre-wrap' },
1257
- })
1258
- },
1259
-
1260
- wordBreak: ({ addUtilities }) => {
1261
- addUtilities({
1262
- '.break-normal': { 'overflow-wrap': 'normal', 'word-break': 'normal' },
1263
- '.break-words': { 'overflow-wrap': 'break-word' },
1264
- '.break-all': { 'word-break': 'break-all' },
1265
- })
1266
- },
1267
-
1268
- borderRadius: createUtilityPlugin('borderRadius', [
1269
- ['rounded', ['border-radius']],
1270
- [
1271
- ['rounded-t', ['border-top-left-radius', 'border-top-right-radius']],
1272
- ['rounded-r', ['border-top-right-radius', 'border-bottom-right-radius']],
1273
- ['rounded-b', ['border-bottom-right-radius', 'border-bottom-left-radius']],
1274
- ['rounded-l', ['border-top-left-radius', 'border-bottom-left-radius']],
1275
- ],
1276
- [
1277
- ['rounded-tl', ['border-top-left-radius']],
1278
- ['rounded-tr', ['border-top-right-radius']],
1279
- ['rounded-br', ['border-bottom-right-radius']],
1280
- ['rounded-bl', ['border-bottom-left-radius']],
1281
- ],
1282
- ]),
1283
-
1284
- borderWidth: createUtilityPlugin(
1285
- 'borderWidth',
1286
- [
1287
- ['border', [['@defaults border-width', {}], 'border-width']],
1288
- [
1289
- ['border-x', [['@defaults border-width', {}], 'border-left-width', 'border-right-width']],
1290
- ['border-y', [['@defaults border-width', {}], 'border-top-width', 'border-bottom-width']],
1291
- ],
1292
- [
1293
- ['border-t', [['@defaults border-width', {}], 'border-top-width']],
1294
- ['border-r', [['@defaults border-width', {}], 'border-right-width']],
1295
- ['border-b', [['@defaults border-width', {}], 'border-bottom-width']],
1296
- ['border-l', [['@defaults border-width', {}], 'border-left-width']],
1297
- ],
1298
- ],
1299
- { type: ['line-width', 'length'] }
1300
- ),
1301
-
1302
- borderStyle: ({ addUtilities }) => {
1303
- addUtilities({
1304
- '.border-solid': { 'border-style': 'solid' },
1305
- '.border-dashed': { 'border-style': 'dashed' },
1306
- '.border-dotted': { 'border-style': 'dotted' },
1307
- '.border-double': { 'border-style': 'double' },
1308
- '.border-hidden': { 'border-style': 'hidden' },
1309
- '.border-none': { 'border-style': 'none' },
1310
- })
1311
- },
1312
-
1313
- borderColor: ({ addBase, matchUtilities, theme, corePlugins }) => {
1314
- if (!corePlugins('borderOpacity')) {
1315
- let value = theme('borderColor.DEFAULT', 'currentColor')
1316
- addBase({
1317
- '@defaults border-width': {
1318
- 'border-color': toColorValue(value),
1319
- },
1320
- })
1321
- } else {
1322
- addBase({
1323
- '@defaults border-width': withAlphaVariable({
1324
- color: theme('borderColor.DEFAULT', 'currentColor'),
1325
- property: 'border-color',
1326
- variable: '--tw-border-opacity',
1327
- }),
1328
- })
1329
- }
1330
-
1331
- matchUtilities(
1332
- {
1333
- border: (value) => {
1334
- if (!corePlugins('borderOpacity')) {
1335
- return {
1336
- 'border-color': toColorValue(value),
1337
- }
1338
- }
1339
-
1340
- return withAlphaVariable({
1341
- color: value,
1342
- property: 'border-color',
1343
- variable: '--tw-border-opacity',
1344
- })
1345
- },
1346
- },
1347
- {
1348
- values: (({ DEFAULT: _, ...colors }) => colors)(flattenColorPalette(theme('borderColor'))),
1349
- type: ['color'],
1350
- }
1351
- )
1352
-
1353
- matchUtilities(
1354
- {
1355
- 'border-x': (value) => {
1356
- if (!corePlugins('borderOpacity')) {
1357
- return {
1358
- 'border-left-color': toColorValue(value),
1359
- 'border-right-color': toColorValue(value),
1360
- }
1361
- }
1362
-
1363
- return withAlphaVariable({
1364
- color: value,
1365
- property: ['border-left-color', 'border-right-color'],
1366
- variable: '--tw-border-opacity',
1367
- })
1368
- },
1369
- 'border-y': (value) => {
1370
- if (!corePlugins('borderOpacity')) {
1371
- return {
1372
- 'border-top-color': toColorValue(value),
1373
- 'border-bottom-color': toColorValue(value),
1374
- }
1375
- }
1376
-
1377
- return withAlphaVariable({
1378
- color: value,
1379
- property: ['border-top-color', 'border-bottom-color'],
1380
- variable: '--tw-border-opacity',
1381
- })
1382
- },
1383
- },
1384
- {
1385
- values: (({ DEFAULT: _, ...colors }) => colors)(flattenColorPalette(theme('borderColor'))),
1386
- type: 'color',
1387
- }
1388
- )
1389
-
1390
- matchUtilities(
1391
- {
1392
- 'border-t': (value) => {
1393
- if (!corePlugins('borderOpacity')) {
1394
- return {
1395
- 'border-top-color': toColorValue(value),
1396
- }
1397
- }
1398
-
1399
- return withAlphaVariable({
1400
- color: value,
1401
- property: 'border-top-color',
1402
- variable: '--tw-border-opacity',
1403
- })
1404
- },
1405
- 'border-r': (value) => {
1406
- if (!corePlugins('borderOpacity')) {
1407
- return {
1408
- 'border-right-color': toColorValue(value),
1409
- }
1410
- }
1411
-
1412
- return withAlphaVariable({
1413
- color: value,
1414
- property: 'border-right-color',
1415
- variable: '--tw-border-opacity',
1416
- })
1417
- },
1418
- 'border-b': (value) => {
1419
- if (!corePlugins('borderOpacity')) {
1420
- return {
1421
- 'border-bottom-color': toColorValue(value),
1422
- }
1423
- }
1424
-
1425
- return withAlphaVariable({
1426
- color: value,
1427
- property: 'border-bottom-color',
1428
- variable: '--tw-border-opacity',
1429
- })
1430
- },
1431
- 'border-l': (value) => {
1432
- if (!corePlugins('borderOpacity')) {
1433
- return {
1434
- 'border-left-color': toColorValue(value),
1435
- }
1436
- }
1437
-
1438
- return withAlphaVariable({
1439
- color: value,
1440
- property: 'border-left-color',
1441
- variable: '--tw-border-opacity',
1442
- })
1443
- },
1444
- },
1445
- {
1446
- values: (({ DEFAULT: _, ...colors }) => colors)(flattenColorPalette(theme('borderColor'))),
1447
- type: 'color',
1448
- }
1449
- )
1450
- },
1451
-
1452
- borderOpacity: createUtilityPlugin('borderOpacity', [
1453
- ['border-opacity', ['--tw-border-opacity']],
1454
- ]),
1455
-
1456
- backgroundColor: ({ matchUtilities, theme, corePlugins }) => {
1457
- matchUtilities(
1458
- {
1459
- bg: (value) => {
1460
- if (!corePlugins('backgroundOpacity')) {
1461
- return {
1462
- 'background-color': toColorValue(value),
1463
- }
1464
- }
1465
-
1466
- return withAlphaVariable({
1467
- color: value,
1468
- property: 'background-color',
1469
- variable: '--tw-bg-opacity',
1470
- })
1471
- },
1472
- },
1473
- { values: flattenColorPalette(theme('backgroundColor')), type: 'color' }
1474
- )
1475
- },
1476
-
1477
- backgroundOpacity: createUtilityPlugin('backgroundOpacity', [
1478
- ['bg-opacity', ['--tw-bg-opacity']],
1479
- ]),
1480
- backgroundImage: createUtilityPlugin('backgroundImage', [['bg', ['background-image']]], {
1481
- type: ['lookup', 'image', 'url'],
1482
- }),
1483
- gradientColorStops: (() => {
1484
- function transparentTo(value) {
1485
- return withAlphaValue(value, 0, 'rgb(255 255 255 / 0)')
1486
- }
1487
-
1488
- return function ({ matchUtilities, theme }) {
1489
- let options = {
1490
- values: flattenColorPalette(theme('gradientColorStops')),
1491
- type: ['color', 'any'],
1492
- }
1493
-
1494
- matchUtilities(
1495
- {
1496
- from: (value) => {
1497
- let transparentToValue = transparentTo(value)
1498
-
1499
- return {
1500
- '--tw-gradient-from': toColorValue(value, 'from'),
1501
- '--tw-gradient-stops': `var(--tw-gradient-from), var(--tw-gradient-to, ${transparentToValue})`,
1502
- }
1503
- },
1504
- },
1505
- options
1506
- )
1507
- matchUtilities(
1508
- {
1509
- via: (value) => {
1510
- let transparentToValue = transparentTo(value)
1511
-
1512
- return {
1513
- '--tw-gradient-stops': `var(--tw-gradient-from), ${toColorValue(
1514
- value,
1515
- 'via'
1516
- )}, var(--tw-gradient-to, ${transparentToValue})`,
1517
- }
1518
- },
1519
- },
1520
- options
1521
- )
1522
- matchUtilities(
1523
- { to: (value) => ({ '--tw-gradient-to': toColorValue(value, 'to') }) },
1524
- options
1525
- )
1526
- }
1527
- })(),
1528
-
1529
- boxDecorationBreak: ({ addUtilities }) => {
1530
- addUtilities({
1531
- '.decoration-slice': { 'box-decoration-break': 'slice' },
1532
- '.decoration-clone': { 'box-decoration-break': 'clone' },
1533
- })
1534
- },
1535
-
1536
- backgroundSize: createUtilityPlugin('backgroundSize', [['bg', ['background-size']]], {
1537
- type: ['lookup', 'length', 'percentage'],
1538
- }),
1539
-
1540
- backgroundAttachment: ({ addUtilities }) => {
1541
- addUtilities({
1542
- '.bg-fixed': { 'background-attachment': 'fixed' },
1543
- '.bg-local': { 'background-attachment': 'local' },
1544
- '.bg-scroll': { 'background-attachment': 'scroll' },
1545
- })
1546
- },
1547
-
1548
- backgroundClip: ({ addUtilities }) => {
1549
- addUtilities({
1550
- '.bg-clip-border': { 'background-clip': 'border-box' },
1551
- '.bg-clip-padding': { 'background-clip': 'padding-box' },
1552
- '.bg-clip-content': { 'background-clip': 'content-box' },
1553
- '.bg-clip-text': { 'background-clip': 'text' },
1554
- })
1555
- },
1556
-
1557
- backgroundPosition: createUtilityPlugin('backgroundPosition', [['bg', ['background-position']]], {
1558
- type: ['lookup', 'position'],
1559
- }),
1560
-
1561
- backgroundRepeat: ({ addUtilities }) => {
1562
- addUtilities({
1563
- '.bg-repeat': { 'background-repeat': 'repeat' },
1564
- '.bg-no-repeat': { 'background-repeat': 'no-repeat' },
1565
- '.bg-repeat-x': { 'background-repeat': 'repeat-x' },
1566
- '.bg-repeat-y': { 'background-repeat': 'repeat-y' },
1567
- '.bg-repeat-round': { 'background-repeat': 'round' },
1568
- '.bg-repeat-space': { 'background-repeat': 'space' },
1569
- })
1570
- },
1571
-
1572
- backgroundOrigin: ({ addUtilities }) => {
1573
- addUtilities({
1574
- '.bg-origin-border': { 'background-origin': 'border-box' },
1575
- '.bg-origin-padding': { 'background-origin': 'padding-box' },
1576
- '.bg-origin-content': { 'background-origin': 'content-box' },
1577
- })
1578
- },
1579
-
1580
- fill: ({ matchUtilities, theme }) => {
1581
- matchUtilities(
1582
- {
1583
- fill: (value) => {
1584
- return { fill: toColorValue(value) }
1585
- },
1586
- },
1587
- { values: flattenColorPalette(theme('fill')), type: ['color', 'any'] }
1588
- )
1589
- },
1590
-
1591
- stroke: ({ matchUtilities, theme }) => {
1592
- matchUtilities(
1593
- {
1594
- stroke: (value) => {
1595
- return { stroke: toColorValue(value) }
1596
- },
1597
- },
1598
- { values: flattenColorPalette(theme('stroke')), type: ['color', 'url'] }
1599
- )
1600
- },
1601
-
1602
- strokeWidth: createUtilityPlugin('strokeWidth', [['stroke', ['stroke-width']]], {
1603
- type: ['length', 'number', 'percentage'],
1604
- }),
1605
-
1606
- objectFit: ({ addUtilities }) => {
1607
- addUtilities({
1608
- '.object-contain': { 'object-fit': 'contain' },
1609
- '.object-cover': { 'object-fit': 'cover' },
1610
- '.object-fill': { 'object-fit': 'fill' },
1611
- '.object-none': { 'object-fit': 'none' },
1612
- '.object-scale-down': { 'object-fit': 'scale-down' },
1613
- })
1614
- },
1615
- objectPosition: createUtilityPlugin('objectPosition', [['object', ['object-position']]]),
1616
-
1617
- padding: createUtilityPlugin('padding', [
1618
- ['p', ['padding']],
1619
- [
1620
- ['px', ['padding-left', 'padding-right']],
1621
- ['py', ['padding-top', 'padding-bottom']],
1622
- ],
1623
- [
1624
- ['pt', ['padding-top']],
1625
- ['pr', ['padding-right']],
1626
- ['pb', ['padding-bottom']],
1627
- ['pl', ['padding-left']],
1628
- ],
1629
- ]),
1630
-
1631
- textAlign: ({ addUtilities }) => {
1632
- addUtilities({
1633
- '.text-left': { 'text-align': 'left' },
1634
- '.text-center': { 'text-align': 'center' },
1635
- '.text-right': { 'text-align': 'right' },
1636
- '.text-justify': { 'text-align': 'justify' },
1637
- })
1638
- },
1639
-
1640
- textIndent: createUtilityPlugin('textIndent', [['indent', ['text-indent']]]),
1641
-
1642
- verticalAlign: ({ addUtilities, matchUtilities }) => {
1643
- addUtilities({
1644
- '.align-baseline': { 'vertical-align': 'baseline' },
1645
- '.align-top': { 'vertical-align': 'top' },
1646
- '.align-middle': { 'vertical-align': 'middle' },
1647
- '.align-bottom': { 'vertical-align': 'bottom' },
1648
- '.align-text-top': { 'vertical-align': 'text-top' },
1649
- '.align-text-bottom': { 'vertical-align': 'text-bottom' },
1650
- '.align-sub': { 'vertical-align': 'sub' },
1651
- '.align-super': { 'vertical-align': 'super' },
1652
- })
1653
-
1654
- matchUtilities({ align: (value) => ({ 'vertical-align': value }) })
1655
- },
1656
-
1657
- fontFamily: createUtilityPlugin('fontFamily', [['font', ['fontFamily']]], {
1658
- type: ['lookup', 'generic-name', 'family-name'],
1659
- }),
1660
-
1661
- fontSize: ({ matchUtilities, theme }) => {
1662
- matchUtilities(
1663
- {
1664
- text: (value) => {
1665
- let [fontSize, options] = Array.isArray(value) ? value : [value]
1666
- let { lineHeight, letterSpacing } = isPlainObject(options)
1667
- ? options
1668
- : { lineHeight: options }
1669
-
1670
- return {
1671
- 'font-size': fontSize,
1672
- ...(lineHeight === undefined ? {} : { 'line-height': lineHeight }),
1673
- ...(letterSpacing === undefined ? {} : { 'letter-spacing': letterSpacing }),
1674
- }
1675
- },
1676
- },
1677
- {
1678
- values: theme('fontSize'),
1679
- type: ['absolute-size', 'relative-size', 'length', 'percentage'],
1680
- }
1681
- )
1682
- },
1683
-
1684
- fontWeight: createUtilityPlugin('fontWeight', [['font', ['fontWeight']]], {
1685
- type: ['lookup', 'number'],
1686
- }),
1687
-
1688
- textTransform: ({ addUtilities }) => {
1689
- addUtilities({
1690
- '.uppercase': { 'text-transform': 'uppercase' },
1691
- '.lowercase': { 'text-transform': 'lowercase' },
1692
- '.capitalize': { 'text-transform': 'capitalize' },
1693
- '.normal-case': { 'text-transform': 'none' },
1694
- })
1695
- },
1696
-
1697
- fontStyle: ({ addUtilities }) => {
1698
- addUtilities({
1699
- '.italic': { 'font-style': 'italic' },
1700
- '.not-italic': { 'font-style': 'normal' },
1701
- })
1702
- },
1703
-
1704
- fontVariantNumeric: ({ addUtilities }) => {
1705
- addUtilities({
1706
- '.ordinal, .slashed-zero, .lining-nums, .oldstyle-nums, .proportional-nums, .tabular-nums, .diagonal-fractions, .stacked-fractions':
1707
- {
1708
- '--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)',
1709
- '--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)',
1710
- '--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)',
1711
- '--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)',
1712
- '--tw-numeric-fraction': 'var(--tw-empty,/*!*/ /*!*/)',
1713
- 'font-variant-numeric':
1714
- 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)',
1715
- },
1716
- '.normal-nums': { 'font-variant-numeric': 'normal' },
1717
- '.ordinal': { '--tw-ordinal': 'ordinal' },
1718
- '.slashed-zero': { '--tw-slashed-zero': 'slashed-zero' },
1719
- '.lining-nums': { '--tw-numeric-figure': 'lining-nums' },
1720
- '.oldstyle-nums': { '--tw-numeric-figure': 'oldstyle-nums' },
1721
- '.proportional-nums': { '--tw-numeric-spacing': 'proportional-nums' },
1722
- '.tabular-nums': { '--tw-numeric-spacing': 'tabular-nums' },
1723
- '.diagonal-fractions': { '--tw-numeric-fraction': 'diagonal-fractions' },
1724
- '.stacked-fractions': { '--tw-numeric-fraction': 'stacked-fractions' },
1725
- })
1726
- },
1727
-
1728
- lineHeight: createUtilityPlugin('lineHeight', [['leading', ['lineHeight']]]),
1729
- letterSpacing: createUtilityPlugin('letterSpacing', [['tracking', ['letterSpacing']]]),
1730
-
1731
- textColor: ({ matchUtilities, theme, corePlugins }) => {
1732
- matchUtilities(
1733
- {
1734
- text: (value) => {
1735
- if (!corePlugins('textOpacity')) {
1736
- return { color: toColorValue(value) }
1737
- }
1738
-
1739
- return withAlphaVariable({
1740
- color: value,
1741
- property: 'color',
1742
- variable: '--tw-text-opacity',
1743
- })
1744
- },
1745
- },
1746
- { values: flattenColorPalette(theme('textColor')), type: 'color' }
1747
- )
1748
- },
1749
-
1750
- textOpacity: createUtilityPlugin('textOpacity', [['text-opacity', ['--tw-text-opacity']]]),
1751
-
1752
- textDecoration: ({ addUtilities }) => {
1753
- addUtilities({
1754
- '.underline': { 'text-decoration': 'underline' },
1755
- '.line-through': { 'text-decoration': 'line-through' },
1756
- '.no-underline': { 'text-decoration': 'none' },
1757
- })
1758
- },
1759
-
1760
- fontSmoothing: ({ addUtilities }) => {
1761
- addUtilities({
1762
- '.antialiased': {
1763
- '-webkit-font-smoothing': 'antialiased',
1764
- '-moz-osx-font-smoothing': 'grayscale',
1765
- },
1766
- '.subpixel-antialiased': {
1767
- '-webkit-font-smoothing': 'auto',
1768
- '-moz-osx-font-smoothing': 'auto',
1769
- },
1770
- })
1771
- },
1772
-
1773
- placeholderColor: ({ matchUtilities, theme, corePlugins }) => {
1774
- matchUtilities(
1775
- {
1776
- placeholder: (value) => {
1777
- if (!corePlugins('placeholderOpacity')) {
1778
- return {
1779
- '&::placeholder': {
1780
- color: toColorValue(value),
1781
- },
1782
- }
1783
- }
1784
-
1785
- return {
1786
- '&::placeholder': withAlphaVariable({
1787
- color: value,
1788
- property: 'color',
1789
- variable: '--tw-placeholder-opacity',
1790
- }),
1791
- }
1792
- },
1793
- },
1794
- { values: flattenColorPalette(theme('placeholderColor')), type: ['color', 'any'] }
1795
- )
1796
- },
1797
-
1798
- placeholderOpacity: ({ matchUtilities, theme }) => {
1799
- matchUtilities(
1800
- {
1801
- 'placeholder-opacity': (value) => {
1802
- return { ['&::placeholder']: { '--tw-placeholder-opacity': value } }
1803
- },
1804
- },
1805
- { values: theme('placeholderOpacity') }
1806
- )
1807
- },
1808
-
1809
- caretColor: ({ matchUtilities, theme }) => {
1810
- matchUtilities(
1811
- {
1812
- caret: (value) => {
1813
- return { 'caret-color': toColorValue(value) }
1814
- },
1815
- },
1816
- { values: flattenColorPalette(theme('caretColor')), type: ['color', 'any'] }
1817
- )
1818
- },
1819
-
1820
- accentColor: ({ matchUtilities, theme }) => {
1821
- matchUtilities(
1822
- {
1823
- accent: (value) => {
1824
- return { 'accent-color': toColorValue(value) }
1825
- },
1826
- },
1827
- { values: flattenColorPalette(theme('accentColor')), type: ['color', 'any'] }
1828
- )
1829
- },
1830
-
1831
- opacity: createUtilityPlugin('opacity', [['opacity', ['opacity']]]),
1832
-
1833
- backgroundBlendMode: ({ addUtilities }) => {
1834
- addUtilities({
1835
- '.bg-blend-normal': { 'background-blend-mode': 'normal' },
1836
- '.bg-blend-multiply': { 'background-blend-mode': 'multiply' },
1837
- '.bg-blend-screen': { 'background-blend-mode': 'screen' },
1838
- '.bg-blend-overlay': { 'background-blend-mode': 'overlay' },
1839
- '.bg-blend-darken': { 'background-blend-mode': 'darken' },
1840
- '.bg-blend-lighten': { 'background-blend-mode': 'lighten' },
1841
- '.bg-blend-color-dodge': { 'background-blend-mode': 'color-dodge' },
1842
- '.bg-blend-color-burn': { 'background-blend-mode': 'color-burn' },
1843
- '.bg-blend-hard-light': { 'background-blend-mode': 'hard-light' },
1844
- '.bg-blend-soft-light': { 'background-blend-mode': 'soft-light' },
1845
- '.bg-blend-difference': { 'background-blend-mode': 'difference' },
1846
- '.bg-blend-exclusion': { 'background-blend-mode': 'exclusion' },
1847
- '.bg-blend-hue': { 'background-blend-mode': 'hue' },
1848
- '.bg-blend-saturation': { 'background-blend-mode': 'saturation' },
1849
- '.bg-blend-color': { 'background-blend-mode': 'color' },
1850
- '.bg-blend-luminosity': { 'background-blend-mode': 'luminosity' },
1851
- })
1852
- },
1853
-
1854
- mixBlendMode: ({ addUtilities }) => {
1855
- addUtilities({
1856
- '.mix-blend-normal': { 'mix-blend-mode': 'normal' },
1857
- '.mix-blend-multiply': { 'mix-blend-mode': 'multiply' },
1858
- '.mix-blend-screen': { 'mix-blend-mode': 'screen' },
1859
- '.mix-blend-overlay': { 'mix-blend-mode': 'overlay' },
1860
- '.mix-blend-darken': { 'mix-blend-mode': 'darken' },
1861
- '.mix-blend-lighten': { 'mix-blend-mode': 'lighten' },
1862
- '.mix-blend-color-dodge': { 'mix-blend-mode': 'color-dodge' },
1863
- '.mix-blend-color-burn': { 'mix-blend-mode': 'color-burn' },
1864
- '.mix-blend-hard-light': { 'mix-blend-mode': 'hard-light' },
1865
- '.mix-blend-soft-light': { 'mix-blend-mode': 'soft-light' },
1866
- '.mix-blend-difference': { 'mix-blend-mode': 'difference' },
1867
- '.mix-blend-exclusion': { 'mix-blend-mode': 'exclusion' },
1868
- '.mix-blend-hue': { 'mix-blend-mode': 'hue' },
1869
- '.mix-blend-saturation': { 'mix-blend-mode': 'saturation' },
1870
- '.mix-blend-color': { 'mix-blend-mode': 'color' },
1871
- '.mix-blend-luminosity': { 'mix-blend-mode': 'luminosity' },
1872
- })
1873
- },
1874
-
1875
- boxShadow: (() => {
1876
- let transformValue = transformThemeValue('boxShadow')
1877
- let defaultBoxShadow = [
1878
- `var(--tw-ring-offset-shadow, 0 0 #0000)`,
1879
- `var(--tw-ring-shadow, 0 0 #0000)`,
1880
- `var(--tw-shadow)`,
1881
- ].join(', ')
1882
-
1883
- return function ({ matchUtilities, addBase, theme }) {
1884
- addBase({
1885
- '@defaults box-shadow': {
1886
- '--tw-ring-offset-shadow': '0 0 #0000',
1887
- '--tw-ring-shadow': '0 0 #0000',
1888
- '--tw-shadow': '0 0 #0000',
1889
- },
1890
- })
1891
-
1892
- matchUtilities(
1893
- {
1894
- shadow: (value) => {
1895
- value = transformValue(value)
1896
-
1897
- return {
1898
- '@defaults box-shadow': {},
1899
- '--tw-shadow': value === 'none' ? '0 0 #0000' : value,
1900
- 'box-shadow': defaultBoxShadow,
1901
- }
1902
- },
1903
- },
1904
- { values: theme('boxShadow') }
1905
- )
1906
- }
1907
- })(),
1908
-
1909
- outline: ({ matchUtilities, theme }) => {
1910
- matchUtilities(
1911
- {
1912
- outline: (value) => {
1913
- value = Array.isArray(value) ? value : value.split(',')
1914
- let [outline, outlineOffset = '0'] = Array.isArray(value) ? value : [value]
1915
-
1916
- return { outline, 'outline-offset': outlineOffset }
1917
- },
1918
- },
1919
- { values: theme('outline') }
1920
- )
1921
- },
1922
-
1923
- ringWidth: ({ matchUtilities, addBase, addUtilities, theme }) => {
1924
- let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5')
1925
- let ringColorDefault = withAlphaValue(
1926
- theme('ringColor.DEFAULT'),
1927
- ringOpacityDefault,
1928
- `rgb(147 197 253 / ${ringOpacityDefault})`
1929
- )
1930
-
1931
- addBase({
1932
- '@defaults ring-width': {
1933
- '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
1934
- '--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
1935
- '--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
1936
- '--tw-ring-color': ringColorDefault,
1937
- '--tw-ring-offset-shadow': '0 0 #0000',
1938
- '--tw-ring-shadow': '0 0 #0000',
1939
- '--tw-shadow': '0 0 #0000',
1940
- },
1941
- })
1942
-
1943
- matchUtilities(
1944
- {
1945
- ring: (value) => {
1946
- return {
1947
- '@defaults ring-width': {},
1948
- '--tw-ring-offset-shadow': `var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)`,
1949
- '--tw-ring-shadow': `var(--tw-ring-inset) 0 0 0 calc(${value} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,
1950
- 'box-shadow': [
1951
- `var(--tw-ring-offset-shadow)`,
1952
- `var(--tw-ring-shadow)`,
1953
- `var(--tw-shadow, 0 0 #0000)`,
1954
- ].join(', '),
1955
- }
1956
- },
1957
- },
1958
- { values: theme('ringWidth'), type: 'length' }
1959
- )
1960
-
1961
- addUtilities({
1962
- '.ring-inset': { '@defaults ring-width': {}, '--tw-ring-inset': 'inset' },
1963
- })
1964
- },
1965
-
1966
- ringColor: ({ matchUtilities, theme }) => {
1967
- matchUtilities(
1968
- {
1969
- ring: (value) => {
1970
- return withAlphaVariable({
1971
- color: value,
1972
- property: '--tw-ring-color',
1973
- variable: '--tw-ring-opacity',
1974
- })
1975
- },
1976
- },
1977
- {
1978
- values: Object.fromEntries(
1979
- Object.entries(flattenColorPalette(theme('ringColor'))).filter(
1980
- ([modifier]) => modifier !== 'DEFAULT'
1981
- )
1982
- ),
1983
- type: 'color',
1984
- }
1985
- )
1986
- },
1987
-
1988
- ringOpacity: createUtilityPlugin('ringOpacity', [['ring-opacity', ['--tw-ring-opacity']]], {
1989
- filterDefault: true,
1990
- }),
1991
- ringOffsetWidth: createUtilityPlugin(
1992
- 'ringOffsetWidth',
1993
- [['ring-offset', ['--tw-ring-offset-width']]],
1994
- { type: 'length' }
1995
- ),
1996
-
1997
- ringOffsetColor: ({ matchUtilities, theme }) => {
1998
- matchUtilities(
1999
- {
2000
- 'ring-offset': (value) => {
2001
- return {
2002
- '--tw-ring-offset-color': toColorValue(value),
2003
- }
2004
- },
2005
- },
2006
- { values: flattenColorPalette(theme('ringOffsetColor')), type: 'color' }
2007
- )
2008
- },
2009
-
2010
- blur: ({ matchUtilities, theme }) => {
2011
- matchUtilities(
2012
- {
2013
- blur: (value) => {
2014
- return {
2015
- '--tw-blur': `blur(${value})`,
2016
- '@defaults filter': {},
2017
- filter: 'var(--tw-filter)',
2018
- }
2019
- },
2020
- },
2021
- { values: theme('blur') }
2022
- )
2023
- },
2024
-
2025
- brightness: ({ matchUtilities, theme }) => {
2026
- matchUtilities(
2027
- {
2028
- brightness: (value) => {
2029
- return {
2030
- '--tw-brightness': `brightness(${value})`,
2031
- '@defaults filter': {},
2032
- filter: 'var(--tw-filter)',
2033
- }
2034
- },
2035
- },
2036
- { values: theme('brightness') }
2037
- )
2038
- },
2039
-
2040
- contrast: ({ matchUtilities, theme }) => {
2041
- matchUtilities(
2042
- {
2043
- contrast: (value) => {
2044
- return {
2045
- '--tw-contrast': `contrast(${value})`,
2046
- '@defaults filter': {},
2047
- filter: 'var(--tw-filter)',
2048
- }
2049
- },
2050
- },
2051
- { values: theme('contrast') }
2052
- )
2053
- },
2054
-
2055
- dropShadow: ({ matchUtilities, theme }) => {
2056
- matchUtilities(
2057
- {
2058
- 'drop-shadow': (value) => {
2059
- return {
2060
- '--tw-drop-shadow': Array.isArray(value)
2061
- ? value.map((v) => `drop-shadow(${v})`).join(' ')
2062
- : `drop-shadow(${value})`,
2063
- '@defaults filter': {},
2064
- filter: 'var(--tw-filter)',
2065
- }
2066
- },
2067
- },
2068
- { values: theme('dropShadow') }
2069
- )
2070
- },
2071
-
2072
- grayscale: ({ matchUtilities, theme }) => {
2073
- matchUtilities(
2074
- {
2075
- grayscale: (value) => {
2076
- return {
2077
- '--tw-grayscale': `grayscale(${value})`,
2078
- '@defaults filter': {},
2079
- filter: 'var(--tw-filter)',
2080
- }
2081
- },
2082
- },
2083
- { values: theme('grayscale') }
2084
- )
2085
- },
2086
-
2087
- hueRotate: ({ matchUtilities, theme }) => {
2088
- matchUtilities(
2089
- {
2090
- 'hue-rotate': (value) => {
2091
- return {
2092
- '--tw-hue-rotate': `hue-rotate(${value})`,
2093
- '@defaults filter': {},
2094
- filter: 'var(--tw-filter)',
2095
- }
2096
- },
2097
- },
2098
- { values: theme('hueRotate') }
2099
- )
2100
- },
2101
-
2102
- invert: ({ matchUtilities, theme }) => {
2103
- matchUtilities(
2104
- {
2105
- invert: (value) => {
2106
- return {
2107
- '--tw-invert': `invert(${value})`,
2108
- '@defaults filter': {},
2109
- filter: 'var(--tw-filter)',
2110
- }
2111
- },
2112
- },
2113
- { values: theme('invert') }
2114
- )
2115
- },
2116
-
2117
- saturate: ({ matchUtilities, theme }) => {
2118
- matchUtilities(
2119
- {
2120
- saturate: (value) => {
2121
- return {
2122
- '--tw-saturate': `saturate(${value})`,
2123
- '@defaults filter': {},
2124
- filter: 'var(--tw-filter)',
2125
- }
2126
- },
2127
- },
2128
- { values: theme('saturate') }
2129
- )
2130
- },
2131
-
2132
- sepia: ({ matchUtilities, theme }) => {
2133
- matchUtilities(
2134
- {
2135
- sepia: (value) => {
2136
- return {
2137
- '--tw-sepia': `sepia(${value})`,
2138
- '@defaults filter': {},
2139
- filter: 'var(--tw-filter)',
2140
- }
2141
- },
2142
- },
2143
- { values: theme('sepia') }
2144
- )
2145
- },
2146
-
2147
- filter: ({ addBase, addUtilities }) => {
2148
- addBase({
2149
- '@defaults filter': {
2150
- '--tw-blur': 'var(--tw-empty,/*!*/ /*!*/)',
2151
- '--tw-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
2152
- '--tw-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
2153
- '--tw-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
2154
- '--tw-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
2155
- '--tw-invert': 'var(--tw-empty,/*!*/ /*!*/)',
2156
- '--tw-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
2157
- '--tw-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
2158
- '--tw-drop-shadow': 'var(--tw-empty,/*!*/ /*!*/)',
2159
- '--tw-filter': [
2160
- 'var(--tw-blur)',
2161
- 'var(--tw-brightness)',
2162
- 'var(--tw-contrast)',
2163
- 'var(--tw-grayscale)',
2164
- 'var(--tw-hue-rotate)',
2165
- 'var(--tw-invert)',
2166
- 'var(--tw-saturate)',
2167
- 'var(--tw-sepia)',
2168
- 'var(--tw-drop-shadow)',
2169
- ].join(' '),
2170
- },
2171
- })
2172
- addUtilities({
2173
- '.filter': { '@defaults filter': {}, filter: 'var(--tw-filter)' },
2174
- '.filter-none': { filter: 'none' },
2175
- })
2176
- },
2177
-
2178
- backdropBlur: ({ matchUtilities, theme }) => {
2179
- matchUtilities(
2180
- {
2181
- 'backdrop-blur': (value) => {
2182
- return {
2183
- '--tw-backdrop-blur': `blur(${value})`,
2184
- '@defaults backdrop-filter': {},
2185
- 'backdrop-filter': 'var(--tw-backdrop-filter)',
2186
- }
2187
- },
2188
- },
2189
- { values: theme('backdropBlur') }
2190
- )
2191
- },
2192
-
2193
- backdropBrightness: ({ matchUtilities, theme }) => {
2194
- matchUtilities(
2195
- {
2196
- 'backdrop-brightness': (value) => {
2197
- return {
2198
- '--tw-backdrop-brightness': `brightness(${value})`,
2199
- '@defaults backdrop-filter': {},
2200
- 'backdrop-filter': 'var(--tw-backdrop-filter)',
2201
- }
2202
- },
2203
- },
2204
- { values: theme('backdropBrightness') }
2205
- )
2206
- },
2207
-
2208
- backdropContrast: ({ matchUtilities, theme }) => {
2209
- matchUtilities(
2210
- {
2211
- 'backdrop-contrast': (value) => {
2212
- return {
2213
- '--tw-backdrop-contrast': `contrast(${value})`,
2214
- '@defaults backdrop-filter': {},
2215
- 'backdrop-filter': 'var(--tw-backdrop-filter)',
2216
- }
2217
- },
2218
- },
2219
- { values: theme('backdropContrast') }
2220
- )
2221
- },
2222
-
2223
- backdropGrayscale: ({ matchUtilities, theme }) => {
2224
- matchUtilities(
2225
- {
2226
- 'backdrop-grayscale': (value) => {
2227
- return {
2228
- '--tw-backdrop-grayscale': `grayscale(${value})`,
2229
- '@defaults backdrop-filter': {},
2230
- 'backdrop-filter': 'var(--tw-backdrop-filter)',
2231
- }
2232
- },
2233
- },
2234
- { values: theme('backdropGrayscale') }
2235
- )
2236
- },
2237
-
2238
- backdropHueRotate: ({ matchUtilities, theme }) => {
2239
- matchUtilities(
2240
- {
2241
- 'backdrop-hue-rotate': (value) => {
2242
- return {
2243
- '--tw-backdrop-hue-rotate': `hue-rotate(${value})`,
2244
- '@defaults backdrop-filter': {},
2245
- 'backdrop-filter': 'var(--tw-backdrop-filter)',
2246
- }
2247
- },
2248
- },
2249
- { values: theme('backdropHueRotate') }
2250
- )
2251
- },
2252
-
2253
- backdropInvert: ({ matchUtilities, theme }) => {
2254
- matchUtilities(
2255
- {
2256
- 'backdrop-invert': (value) => {
2257
- return {
2258
- '--tw-backdrop-invert': `invert(${value})`,
2259
- '@defaults backdrop-filter': {},
2260
- 'backdrop-filter': 'var(--tw-backdrop-filter)',
2261
- }
2262
- },
2263
- },
2264
- { values: theme('backdropInvert') }
2265
- )
2266
- },
2267
-
2268
- backdropOpacity: ({ matchUtilities, theme }) => {
2269
- matchUtilities(
2270
- {
2271
- 'backdrop-opacity': (value) => {
2272
- return {
2273
- '--tw-backdrop-opacity': `opacity(${value})`,
2274
- '@defaults backdrop-filter': {},
2275
- 'backdrop-filter': 'var(--tw-backdrop-filter)',
2276
- }
2277
- },
2278
- },
2279
- { values: theme('backdropOpacity') }
2280
- )
2281
- },
2282
-
2283
- backdropSaturate: ({ matchUtilities, theme }) => {
2284
- matchUtilities(
2285
- {
2286
- 'backdrop-saturate': (value) => {
2287
- return {
2288
- '--tw-backdrop-saturate': `saturate(${value})`,
2289
- '@defaults backdrop-filter': {},
2290
- 'backdrop-filter': 'var(--tw-backdrop-filter)',
2291
- }
2292
- },
2293
- },
2294
- { values: theme('backdropSaturate') }
2295
- )
2296
- },
2297
-
2298
- backdropSepia: ({ matchUtilities, theme }) => {
2299
- matchUtilities(
2300
- {
2301
- 'backdrop-sepia': (value) => {
2302
- return {
2303
- '--tw-backdrop-sepia': `sepia(${value})`,
2304
- '@defaults backdrop-filter': {},
2305
- 'backdrop-filter': 'var(--tw-backdrop-filter)',
2306
- }
2307
- },
2308
- },
2309
- { values: theme('backdropSepia') }
2310
- )
2311
- },
2312
-
2313
- backdropFilter: ({ addBase, addUtilities }) => {
2314
- addBase({
2315
- '@defaults backdrop-filter': {
2316
- '--tw-backdrop-blur': 'var(--tw-empty,/*!*/ /*!*/)',
2317
- '--tw-backdrop-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
2318
- '--tw-backdrop-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
2319
- '--tw-backdrop-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
2320
- '--tw-backdrop-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
2321
- '--tw-backdrop-invert': 'var(--tw-empty,/*!*/ /*!*/)',
2322
- '--tw-backdrop-opacity': 'var(--tw-empty,/*!*/ /*!*/)',
2323
- '--tw-backdrop-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
2324
- '--tw-backdrop-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
2325
- '--tw-backdrop-filter': [
2326
- 'var(--tw-backdrop-blur)',
2327
- 'var(--tw-backdrop-brightness)',
2328
- 'var(--tw-backdrop-contrast)',
2329
- 'var(--tw-backdrop-grayscale)',
2330
- 'var(--tw-backdrop-hue-rotate)',
2331
- 'var(--tw-backdrop-invert)',
2332
- 'var(--tw-backdrop-opacity)',
2333
- 'var(--tw-backdrop-saturate)',
2334
- 'var(--tw-backdrop-sepia)',
2335
- ].join(' '),
2336
- },
2337
- })
2338
- addUtilities({
2339
- '.backdrop-filter': {
2340
- '@defaults backdrop-filter': {},
2341
- 'backdrop-filter': 'var(--tw-backdrop-filter)',
2342
- },
2343
- '.backdrop-filter-none': { 'backdrop-filter': 'none' },
2344
- })
2345
- },
2346
-
2347
- transitionProperty: ({ matchUtilities, theme }) => {
2348
- let defaultTimingFunction = theme('transitionTimingFunction.DEFAULT')
2349
- let defaultDuration = theme('transitionDuration.DEFAULT')
2350
-
2351
- matchUtilities(
2352
- {
2353
- transition: (value) => {
2354
- return {
2355
- 'transition-property': value,
2356
- ...(value === 'none'
2357
- ? {}
2358
- : {
2359
- 'transition-timing-function': defaultTimingFunction,
2360
- 'transition-duration': defaultDuration,
2361
- }),
2362
- }
2363
- },
2364
- },
2365
- { values: theme('transitionProperty') }
2366
- )
2367
- },
2368
-
2369
- transitionDelay: createUtilityPlugin('transitionDelay', [['delay', ['transitionDelay']]]),
2370
- transitionDuration: createUtilityPlugin(
2371
- 'transitionDuration',
2372
- [['duration', ['transitionDuration']]],
2373
- { filterDefault: true }
2374
- ),
2375
- transitionTimingFunction: createUtilityPlugin(
2376
- 'transitionTimingFunction',
2377
- [['ease', ['transitionTimingFunction']]],
2378
- { filterDefault: true }
2379
- ),
2380
- willChange: createUtilityPlugin('willChange', [['will-change', ['will-change']]]),
2381
- content: createUtilityPlugin('content'),
2382
- }