tailwindcss 0.0.0-insiders.bbafc8e → 0.0.0-insiders.bbc2f3f

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