tailwindcss 0.0.0-insiders.ee945bb → 0.0.0-insiders.eec1bf2

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