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