tailwindcss 0.0.0-insiders.fc623da → 0.0.0-insiders.fc63ce7

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