tailwindcss 0.0.0-insiders.eebf529 → 0.0.0-insiders.eef91c9
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/LICENSE +1 -2
- package/README.md +15 -8
- package/colors.d.ts +3 -0
- package/defaultConfig.d.ts +3 -0
- package/defaultTheme.d.ts +4 -0
- package/lib/cli/build/deps.js +62 -0
- package/lib/cli/build/index.js +54 -0
- package/lib/cli/build/plugin.js +371 -0
- package/lib/cli/build/utils.js +88 -0
- package/lib/cli/build/watching.js +182 -0
- package/lib/cli/help/index.js +73 -0
- package/lib/cli/index.js +230 -0
- package/lib/cli/init/index.js +63 -0
- package/lib/cli-peer-dependencies.js +28 -7
- package/lib/cli.js +1 -704
- package/lib/corePluginList.js +17 -4
- package/lib/corePlugins.js +2533 -1870
- package/lib/css/preflight.css +35 -16
- package/lib/featureFlags.js +45 -26
- package/lib/index.js +1 -31
- package/lib/lib/cacheInvalidation.js +92 -0
- package/lib/lib/collapseAdjacentRules.js +30 -10
- package/lib/lib/collapseDuplicateDeclarations.js +60 -4
- package/lib/lib/content.js +181 -0
- package/lib/lib/defaultExtractor.js +251 -0
- package/lib/lib/evaluateTailwindFunctions.js +117 -50
- package/lib/lib/expandApplyAtRules.js +485 -160
- package/lib/lib/expandTailwindAtRules.js +166 -134
- package/lib/lib/findAtConfigPath.js +46 -0
- package/lib/lib/generateRules.js +578 -200
- package/lib/lib/getModuleDependencies.js +88 -37
- package/lib/lib/load-config.js +57 -0
- package/lib/lib/normalizeTailwindDirectives.js +46 -33
- package/lib/lib/offsets.js +355 -0
- package/lib/lib/partitionApplyAtRules.js +58 -0
- package/lib/lib/regex.js +74 -0
- package/lib/lib/remap-bitfield.js +89 -0
- package/lib/lib/resolveDefaultsAtRules.js +100 -58
- package/lib/lib/setupContextUtils.js +819 -324
- package/lib/lib/setupTrackingContext.js +71 -75
- package/lib/lib/sharedState.js +70 -10
- package/lib/lib/substituteScreenAtRules.js +14 -10
- package/lib/plugin.js +48 -0
- package/{nesting → lib/postcss-plugins/nesting}/README.md +2 -2
- package/lib/postcss-plugins/nesting/index.js +21 -0
- package/lib/postcss-plugins/nesting/plugin.js +89 -0
- package/lib/processTailwindFeatures.js +38 -27
- package/lib/public/colors.js +272 -246
- package/lib/public/create-plugin.js +9 -5
- package/lib/public/default-config.js +10 -6
- package/lib/public/default-theme.js +10 -6
- package/lib/public/load-config.js +12 -0
- package/lib/public/resolve-config.js +11 -6
- package/lib/util/applyImportantSelector.js +36 -0
- package/lib/util/bigSign.js +6 -1
- package/lib/util/buildMediaQuery.js +13 -6
- package/lib/util/cloneDeep.js +9 -6
- package/lib/util/cloneNodes.js +44 -4
- package/lib/util/color.js +70 -38
- package/lib/util/colorNames.js +752 -0
- package/lib/util/configurePlugins.js +7 -2
- package/lib/util/createPlugin.js +8 -6
- package/lib/util/createUtilityPlugin.js +16 -16
- package/lib/util/dataTypes.js +301 -113
- package/lib/util/defaults.js +14 -3
- package/lib/util/escapeClassName.js +13 -8
- package/lib/util/escapeCommas.js +7 -2
- package/lib/util/flattenColorPalette.js +11 -12
- package/lib/util/formatVariantSelector.js +235 -151
- package/lib/util/getAllConfigs.js +33 -12
- package/lib/util/hashConfig.js +9 -4
- package/lib/util/isKeyframeRule.js +7 -2
- package/lib/util/isPlainObject.js +8 -3
- package/lib/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +25 -15
- package/lib/util/log.js +27 -13
- package/lib/util/nameClass.js +27 -10
- package/lib/util/negateValue.js +25 -8
- package/lib/util/normalizeConfig.js +139 -65
- package/lib/util/normalizeScreens.js +128 -11
- package/lib/util/parseAnimationValue.js +44 -40
- package/lib/util/parseBoxShadowValue.js +34 -23
- package/lib/util/parseDependency.js +39 -55
- package/lib/util/parseGlob.js +36 -0
- package/lib/util/parseObjectStyles.js +15 -10
- package/lib/util/pluginUtils.js +172 -69
- package/lib/util/prefixSelector.js +30 -12
- package/lib/util/pseudoElements.js +212 -0
- package/lib/util/removeAlphaVariables.js +31 -0
- package/lib/util/resolveConfig.js +101 -79
- package/lib/util/resolveConfigPath.js +30 -12
- package/lib/util/responsive.js +11 -6
- package/lib/util/splitAtTopLevelOnly.js +51 -0
- package/lib/util/tap.js +6 -1
- package/lib/util/toColorValue.js +7 -3
- package/lib/util/toPath.js +26 -3
- package/lib/util/transformThemeValue.js +40 -30
- package/lib/util/validateConfig.js +37 -0
- package/lib/util/validateFormalSyntax.js +26 -0
- package/lib/util/withAlphaVariable.js +27 -15
- package/lib/value-parser/LICENSE +22 -0
- package/lib/value-parser/README.md +3 -0
- package/lib/value-parser/index.d.js +2 -0
- package/lib/value-parser/index.js +22 -0
- package/lib/value-parser/parse.js +259 -0
- package/lib/value-parser/stringify.js +38 -0
- package/lib/value-parser/unit.js +86 -0
- package/lib/value-parser/walk.js +16 -0
- package/loadConfig.d.ts +4 -0
- package/loadConfig.js +2 -0
- package/nesting/index.d.ts +4 -0
- package/nesting/index.js +2 -12
- package/package.json +62 -57
- package/peers/index.js +77144 -56580
- package/plugin.d.ts +11 -0
- package/resolveConfig.d.ts +31 -0
- package/scripts/generate-types.js +104 -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 +437 -0
- package/src/cli/build/utils.js +76 -0
- package/src/cli/build/watching.js +229 -0
- package/src/cli/help/index.js +70 -0
- package/src/cli/index.js +216 -0
- package/src/cli/init/index.js +79 -0
- package/src/cli-peer-dependencies.js +7 -1
- package/src/cli.js +1 -766
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +918 -301
- package/src/css/preflight.css +35 -16
- package/src/featureFlags.js +13 -5
- package/src/index.js +1 -34
- package/src/lib/cacheInvalidation.js +52 -0
- package/src/lib/collapseAdjacentRules.js +21 -2
- package/src/lib/collapseDuplicateDeclarations.js +66 -1
- package/src/lib/content.js +208 -0
- package/src/lib/defaultExtractor.js +230 -0
- package/src/lib/evaluateTailwindFunctions.js +83 -9
- package/src/lib/expandApplyAtRules.js +538 -152
- package/src/lib/expandTailwindAtRules.js +115 -87
- package/src/lib/findAtConfigPath.js +48 -0
- package/src/lib/generateRules.js +570 -148
- package/src/lib/getModuleDependencies.js +70 -30
- package/src/lib/load-config.ts +44 -0
- package/src/lib/normalizeTailwindDirectives.js +7 -1
- package/src/lib/offsets.js +432 -0
- package/src/lib/partitionApplyAtRules.js +52 -0
- package/src/lib/regex.js +74 -0
- package/src/lib/remap-bitfield.js +82 -0
- package/src/lib/resolveDefaultsAtRules.js +63 -17
- package/src/lib/setupContextUtils.js +752 -182
- package/src/lib/setupTrackingContext.js +52 -65
- package/src/lib/sharedState.js +54 -7
- package/src/plugin.js +47 -0
- 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 +13 -5
- package/src/public/colors.js +22 -0
- package/src/public/default-config.js +1 -1
- package/src/public/default-theme.js +2 -2
- package/src/public/load-config.js +2 -0
- package/src/util/applyImportantSelector.js +27 -0
- package/src/util/buildMediaQuery.js +5 -3
- package/src/util/cloneNodes.js +40 -2
- package/src/util/color.js +44 -12
- package/src/util/colorNames.js +150 -0
- package/src/util/dataTypes.js +190 -26
- package/src/util/defaults.js +6 -0
- package/src/util/formatVariantSelector.js +272 -144
- package/src/util/getAllConfigs.js +21 -2
- package/src/util/isPlainObject.js +1 -1
- package/src/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +1 -1
- package/src/util/log.js +11 -7
- package/src/util/nameClass.js +4 -0
- package/src/util/negateValue.js +11 -3
- package/src/util/normalizeConfig.js +57 -5
- package/src/util/normalizeScreens.js +99 -4
- package/src/util/parseBoxShadowValue.js +4 -3
- package/src/util/parseDependency.js +37 -42
- package/src/util/parseGlob.js +24 -0
- package/src/util/pluginUtils.js +139 -24
- package/src/util/prefixSelector.js +31 -10
- package/src/util/pseudoElements.js +171 -0
- package/src/util/removeAlphaVariables.js +24 -0
- package/src/util/resolveConfig.js +74 -26
- package/src/util/resolveConfigPath.js +12 -1
- package/src/util/splitAtTopLevelOnly.js +52 -0
- package/src/util/toPath.js +23 -1
- package/src/util/transformThemeValue.js +13 -3
- package/src/util/validateConfig.js +26 -0
- package/src/util/validateFormalSyntax.js +34 -0
- package/src/util/withAlphaVariable.js +1 -1
- package/src/value-parser/LICENSE +22 -0
- package/src/value-parser/README.md +3 -0
- package/src/value-parser/index.d.ts +177 -0
- package/src/value-parser/index.js +28 -0
- package/src/value-parser/parse.js +303 -0
- package/src/value-parser/stringify.js +41 -0
- package/src/value-parser/unit.js +118 -0
- package/src/value-parser/walk.js +18 -0
- package/stubs/.gitignore +1 -0
- package/stubs/.prettierrc.json +6 -0
- package/stubs/{defaultConfig.stub.js → config.full.js} +293 -181
- package/stubs/postcss.config.js +6 -0
- package/stubs/tailwind.config.cjs +2 -0
- package/stubs/tailwind.config.js +2 -0
- package/stubs/tailwind.config.ts +3 -0
- package/types/config.d.ts +376 -0
- package/types/generated/.gitkeep +0 -0
- package/types/generated/colors.d.ts +298 -0
- package/types/generated/corePluginList.d.ts +1 -0
- package/types/generated/default-theme.d.ts +397 -0
- package/types/index.d.ts +11 -0
- package/CHANGELOG.md +0 -1853
- package/lib/constants.js +0 -37
- package/lib/lib/detectNesting.js +0 -34
- package/lib/lib/setupWatchingContext.js +0 -288
- package/nesting/plugin.js +0 -41
- package/scripts/install-integrations.js +0 -27
- package/scripts/rebuildFixtures.js +0 -68
- package/src/constants.js +0 -17
- package/src/lib/detectNesting.js +0 -39
- package/src/lib/setupWatchingContext.js +0 -311
- /package/stubs/{simpleConfig.stub.js → config.simple.js} +0 -0
- /package/stubs/{defaultPostCssConfig.stub.js → postcss.config.cjs} +0 -0
package/src/corePlugins.js
CHANGED
|
@@ -3,6 +3,7 @@ import * as path from 'path'
|
|
|
3
3
|
import postcss from 'postcss'
|
|
4
4
|
import createUtilityPlugin from './util/createUtilityPlugin'
|
|
5
5
|
import buildMediaQuery from './util/buildMediaQuery'
|
|
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'
|
|
@@ -11,21 +12,47 @@ import isPlainObject from './util/isPlainObject'
|
|
|
11
12
|
import transformThemeValue from './util/transformThemeValue'
|
|
12
13
|
import { version as tailwindVersion } from '../package.json'
|
|
13
14
|
import log from './util/log'
|
|
14
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
normalizeScreens,
|
|
17
|
+
isScreenSortable,
|
|
18
|
+
compareScreens,
|
|
19
|
+
toScreen,
|
|
20
|
+
} from './util/normalizeScreens'
|
|
15
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
|
+
import { INTERNAL_FEATURES } from './lib/setupContextUtils'
|
|
16
26
|
|
|
17
27
|
export let variantPlugins = {
|
|
28
|
+
childVariant: ({ addVariant }) => {
|
|
29
|
+
addVariant('*', '& > *')
|
|
30
|
+
},
|
|
18
31
|
pseudoElementVariants: ({ addVariant }) => {
|
|
19
32
|
addVariant('first-letter', '&::first-letter')
|
|
20
33
|
addVariant('first-line', '&::first-line')
|
|
21
34
|
|
|
22
|
-
addVariant('marker', [
|
|
35
|
+
addVariant('marker', [
|
|
36
|
+
({ container }) => {
|
|
37
|
+
removeAlphaVariables(container, ['--tw-text-opacity'])
|
|
38
|
+
|
|
39
|
+
return '& *::marker'
|
|
40
|
+
},
|
|
41
|
+
({ container }) => {
|
|
42
|
+
removeAlphaVariables(container, ['--tw-text-opacity'])
|
|
43
|
+
|
|
44
|
+
return '&::marker'
|
|
45
|
+
},
|
|
46
|
+
])
|
|
47
|
+
|
|
23
48
|
addVariant('selection', ['& *::selection', '&::selection'])
|
|
24
49
|
|
|
25
50
|
addVariant('file', '&::file-selector-button')
|
|
26
51
|
|
|
27
52
|
addVariant('placeholder', '&::placeholder')
|
|
28
53
|
|
|
54
|
+
addVariant('backdrop', '&::backdrop')
|
|
55
|
+
|
|
29
56
|
addVariant('before', ({ container }) => {
|
|
30
57
|
container.walkRules((rule) => {
|
|
31
58
|
let foundContent = false
|
|
@@ -57,22 +84,33 @@ export let variantPlugins = {
|
|
|
57
84
|
})
|
|
58
85
|
},
|
|
59
86
|
|
|
60
|
-
pseudoClassVariants: ({ addVariant }) => {
|
|
87
|
+
pseudoClassVariants: ({ addVariant, matchVariant, config, prefix }) => {
|
|
61
88
|
let pseudoVariants = [
|
|
62
89
|
// Positional
|
|
63
|
-
['first', '
|
|
64
|
-
['last', '
|
|
65
|
-
['only', '
|
|
66
|
-
['odd', '
|
|
67
|
-
['even', '
|
|
90
|
+
['first', '&:first-child'],
|
|
91
|
+
['last', '&:last-child'],
|
|
92
|
+
['only', '&:only-child'],
|
|
93
|
+
['odd', '&:nth-child(odd)'],
|
|
94
|
+
['even', '&:nth-child(even)'],
|
|
68
95
|
'first-of-type',
|
|
69
96
|
'last-of-type',
|
|
70
97
|
'only-of-type',
|
|
71
98
|
|
|
72
99
|
// State
|
|
73
|
-
|
|
100
|
+
[
|
|
101
|
+
'visited',
|
|
102
|
+
({ container }) => {
|
|
103
|
+
removeAlphaVariables(container, [
|
|
104
|
+
'--tw-text-opacity',
|
|
105
|
+
'--tw-border-opacity',
|
|
106
|
+
'--tw-bg-opacity',
|
|
107
|
+
])
|
|
108
|
+
|
|
109
|
+
return '&:visited'
|
|
110
|
+
},
|
|
111
|
+
],
|
|
74
112
|
'target',
|
|
75
|
-
['open', '[open]'],
|
|
113
|
+
['open', '&[open]'],
|
|
76
114
|
|
|
77
115
|
// Forms
|
|
78
116
|
'default',
|
|
@@ -80,6 +118,7 @@ export let variantPlugins = {
|
|
|
80
118
|
'indeterminate',
|
|
81
119
|
'placeholder-shown',
|
|
82
120
|
'autofill',
|
|
121
|
+
'optional',
|
|
83
122
|
'required',
|
|
84
123
|
'valid',
|
|
85
124
|
'invalid',
|
|
@@ -92,44 +131,84 @@ export let variantPlugins = {
|
|
|
92
131
|
|
|
93
132
|
// Interactive
|
|
94
133
|
'focus-within',
|
|
95
|
-
|
|
134
|
+
[
|
|
135
|
+
'hover',
|
|
136
|
+
!flagEnabled(config(), 'hoverOnlyWhenSupported')
|
|
137
|
+
? '&:hover'
|
|
138
|
+
: '@media (hover: hover) and (pointer: fine) { &:hover }',
|
|
139
|
+
],
|
|
96
140
|
'focus',
|
|
97
141
|
'focus-visible',
|
|
98
142
|
'active',
|
|
143
|
+
'enabled',
|
|
99
144
|
'disabled',
|
|
100
|
-
].map((variant) => (Array.isArray(variant) ? variant : [variant,
|
|
145
|
+
].map((variant) => (Array.isArray(variant) ? variant : [variant, `&:${variant}`]))
|
|
101
146
|
|
|
102
147
|
for (let [variantName, state] of pseudoVariants) {
|
|
103
|
-
addVariant(variantName,
|
|
104
|
-
|
|
148
|
+
addVariant(variantName, (ctx) => {
|
|
149
|
+
let result = typeof state === 'function' ? state(ctx) : state
|
|
105
150
|
|
|
106
|
-
|
|
107
|
-
|
|
151
|
+
return result
|
|
152
|
+
})
|
|
108
153
|
}
|
|
109
154
|
|
|
110
|
-
|
|
111
|
-
|
|
155
|
+
let variants = {
|
|
156
|
+
group: (_, { modifier }) =>
|
|
157
|
+
modifier
|
|
158
|
+
? [`:merge(${prefix('.group')}\\/${escapeClassName(modifier)})`, ' &']
|
|
159
|
+
: [`:merge(${prefix('.group')})`, ' &'],
|
|
160
|
+
peer: (_, { modifier }) =>
|
|
161
|
+
modifier
|
|
162
|
+
? [`:merge(${prefix('.peer')}\\/${escapeClassName(modifier)})`, ' ~ &']
|
|
163
|
+
: [`:merge(${prefix('.peer')})`, ' ~ &'],
|
|
112
164
|
}
|
|
113
|
-
},
|
|
114
165
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
166
|
+
for (let [name, fn] of Object.entries(variants)) {
|
|
167
|
+
matchVariant(
|
|
168
|
+
name,
|
|
169
|
+
(value = '', extra) => {
|
|
170
|
+
let result = normalize(typeof value === 'function' ? value(extra) : value)
|
|
171
|
+
if (!result.includes('&')) result = '&' + result
|
|
172
|
+
|
|
173
|
+
let [a, b] = fn('', extra)
|
|
174
|
+
|
|
175
|
+
let start = null
|
|
176
|
+
let end = null
|
|
177
|
+
let quotes = 0
|
|
178
|
+
|
|
179
|
+
for (let i = 0; i < result.length; ++i) {
|
|
180
|
+
let c = result[i]
|
|
181
|
+
if (c === '&') {
|
|
182
|
+
start = i
|
|
183
|
+
} else if (c === "'" || c === '"') {
|
|
184
|
+
quotes += 1
|
|
185
|
+
} else if (start !== null && c === ' ' && !quotes) {
|
|
186
|
+
end = i
|
|
187
|
+
}
|
|
188
|
+
}
|
|
121
189
|
|
|
122
|
-
|
|
123
|
-
|
|
190
|
+
if (start !== null && end === null) {
|
|
191
|
+
end = result.length
|
|
192
|
+
}
|
|
124
193
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
'The RTL features in Tailwind CSS are currently in preview.',
|
|
128
|
-
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
|
|
129
|
-
])
|
|
194
|
+
// Basically this but can handle quotes:
|
|
195
|
+
// result.replace(/&(\S+)?/g, (_, pseudo = '') => a + pseudo + b)
|
|
130
196
|
|
|
131
|
-
|
|
132
|
-
|
|
197
|
+
return result.slice(0, start) + a + result.slice(start + 1, end) + b + result.slice(end)
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
values: Object.fromEntries(pseudoVariants),
|
|
201
|
+
[INTERNAL_FEATURES]: {
|
|
202
|
+
respectPrefix: false,
|
|
203
|
+
},
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
|
|
209
|
+
directionVariants: ({ addVariant }) => {
|
|
210
|
+
addVariant('ltr', '&:where([dir="ltr"], [dir="ltr"] *)')
|
|
211
|
+
addVariant('rtl', '&:where([dir="rtl"], [dir="rtl"] *)')
|
|
133
212
|
},
|
|
134
213
|
|
|
135
214
|
reducedMotionVariants: ({ addVariant }) => {
|
|
@@ -138,19 +217,60 @@ export let variantPlugins = {
|
|
|
138
217
|
},
|
|
139
218
|
|
|
140
219
|
darkVariants: ({ config, addVariant }) => {
|
|
141
|
-
let mode = config('darkMode', 'media')
|
|
220
|
+
let [mode, selector = '.dark'] = [].concat(config('darkMode', 'media'))
|
|
221
|
+
|
|
142
222
|
if (mode === false) {
|
|
143
223
|
mode = 'media'
|
|
144
224
|
log.warn('darkmode-false', [
|
|
145
225
|
'The `darkMode` option in your Tailwind CSS configuration is set to `false`, which now behaves the same as `media`.',
|
|
146
226
|
'Change `darkMode` to `media` or remove it entirely.',
|
|
227
|
+
'https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration',
|
|
147
228
|
])
|
|
148
229
|
}
|
|
149
230
|
|
|
150
|
-
if (mode === '
|
|
151
|
-
|
|
231
|
+
if (mode === 'variant') {
|
|
232
|
+
let formats
|
|
233
|
+
if (Array.isArray(selector)) {
|
|
234
|
+
formats = selector
|
|
235
|
+
} else if (typeof selector === 'function') {
|
|
236
|
+
formats = selector
|
|
237
|
+
} else if (typeof selector === 'string') {
|
|
238
|
+
formats = [selector]
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// TODO: We could also add these warnings if the user passes a function that returns string | string[]
|
|
242
|
+
// But this is an advanced enough use case that it's probably not necessary
|
|
243
|
+
if (Array.isArray(formats)) {
|
|
244
|
+
for (let format of formats) {
|
|
245
|
+
if (format === '.dark') {
|
|
246
|
+
mode = false
|
|
247
|
+
log.warn('darkmode-variant-without-selector', [
|
|
248
|
+
'When using `variant` for `darkMode`, you must provide a selector.',
|
|
249
|
+
'Example: `darkMode: ["variant", ".your-selector &"]`',
|
|
250
|
+
])
|
|
251
|
+
} else if (!format.includes('&')) {
|
|
252
|
+
mode = false
|
|
253
|
+
log.warn('darkmode-variant-without-ampersand', [
|
|
254
|
+
'When using `variant` for `darkMode`, your selector must contain `&`.',
|
|
255
|
+
'Example `darkMode: ["variant", ".your-selector &"]`',
|
|
256
|
+
])
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
selector = formats
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (mode === 'selector') {
|
|
265
|
+
// New preferred behavior
|
|
266
|
+
addVariant('dark', `&:where(${selector}, ${selector} *)`)
|
|
152
267
|
} else if (mode === 'media') {
|
|
153
268
|
addVariant('dark', '@media (prefers-color-scheme: dark)')
|
|
269
|
+
} else if (mode === 'variant') {
|
|
270
|
+
addVariant('dark', selector)
|
|
271
|
+
} else if (mode === 'class') {
|
|
272
|
+
// Old behavior
|
|
273
|
+
addVariant('dark', `&:is(${selector} *)`)
|
|
154
274
|
}
|
|
155
275
|
},
|
|
156
276
|
|
|
@@ -158,20 +278,287 @@ export let variantPlugins = {
|
|
|
158
278
|
addVariant('print', '@media print')
|
|
159
279
|
},
|
|
160
280
|
|
|
161
|
-
screenVariants: ({ theme, addVariant }) => {
|
|
162
|
-
|
|
163
|
-
|
|
281
|
+
screenVariants: ({ theme, addVariant, matchVariant }) => {
|
|
282
|
+
let rawScreens = theme('screens') ?? {}
|
|
283
|
+
let areSimpleScreens = Object.values(rawScreens).every((v) => typeof v === 'string')
|
|
284
|
+
let screens = normalizeScreens(theme('screens'))
|
|
285
|
+
|
|
286
|
+
/** @type {Set<string>} */
|
|
287
|
+
let unitCache = new Set([])
|
|
288
|
+
|
|
289
|
+
/** @param {string} value */
|
|
290
|
+
function units(value) {
|
|
291
|
+
return value.match(/(\D+)$/)?.[1] ?? '(none)'
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/** @param {string} value */
|
|
295
|
+
function recordUnits(value) {
|
|
296
|
+
if (value !== undefined) {
|
|
297
|
+
unitCache.add(units(value))
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/** @param {string} value */
|
|
302
|
+
function canUseUnits(value) {
|
|
303
|
+
recordUnits(value)
|
|
304
|
+
|
|
305
|
+
// If the cache was empty it'll become 1 because we've just added the current unit
|
|
306
|
+
// If the cache was not empty and the units are the same the size doesn't change
|
|
307
|
+
// Otherwise, if the units are different from what is already known the size will always be > 1
|
|
308
|
+
return unitCache.size === 1
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
for (const screen of screens) {
|
|
312
|
+
for (const value of screen.values) {
|
|
313
|
+
recordUnits(value.min)
|
|
314
|
+
recordUnits(value.max)
|
|
315
|
+
}
|
|
316
|
+
}
|
|
164
317
|
|
|
165
|
-
|
|
318
|
+
let screensUseConsistentUnits = unitCache.size <= 1
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* @typedef {import('./util/normalizeScreens').Screen} Screen
|
|
322
|
+
*/
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* @param {'min' | 'max'} type
|
|
326
|
+
* @returns {Record<string, Screen>}
|
|
327
|
+
*/
|
|
328
|
+
function buildScreenValues(type) {
|
|
329
|
+
return Object.fromEntries(
|
|
330
|
+
screens
|
|
331
|
+
.filter((screen) => isScreenSortable(screen).result)
|
|
332
|
+
.map((screen) => {
|
|
333
|
+
let { min, max } = screen.values[0]
|
|
334
|
+
|
|
335
|
+
if (type === 'min' && min !== undefined) {
|
|
336
|
+
return screen
|
|
337
|
+
} else if (type === 'min' && max !== undefined) {
|
|
338
|
+
return { ...screen, not: !screen.not }
|
|
339
|
+
} else if (type === 'max' && max !== undefined) {
|
|
340
|
+
return screen
|
|
341
|
+
} else if (type === 'max' && min !== undefined) {
|
|
342
|
+
return { ...screen, not: !screen.not }
|
|
343
|
+
}
|
|
344
|
+
})
|
|
345
|
+
.map((screen) => [screen.name, screen])
|
|
346
|
+
)
|
|
166
347
|
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* @param {'min' | 'max'} type
|
|
351
|
+
* @returns {(a: { value: string | Screen }, z: { value: string | Screen }) => number}
|
|
352
|
+
*/
|
|
353
|
+
function buildSort(type) {
|
|
354
|
+
return (a, z) => compareScreens(type, a.value, z.value)
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
let maxSort = buildSort('max')
|
|
358
|
+
let minSort = buildSort('min')
|
|
359
|
+
|
|
360
|
+
/** @param {'min'|'max'} type */
|
|
361
|
+
function buildScreenVariant(type) {
|
|
362
|
+
return (value) => {
|
|
363
|
+
if (!areSimpleScreens) {
|
|
364
|
+
log.warn('complex-screen-config', [
|
|
365
|
+
'The `min-*` and `max-*` variants are not supported with a `screens` configuration containing objects.',
|
|
366
|
+
])
|
|
367
|
+
|
|
368
|
+
return []
|
|
369
|
+
} else if (!screensUseConsistentUnits) {
|
|
370
|
+
log.warn('mixed-screen-units', [
|
|
371
|
+
'The `min-*` and `max-*` variants are not supported with a `screens` configuration containing mixed units.',
|
|
372
|
+
])
|
|
373
|
+
|
|
374
|
+
return []
|
|
375
|
+
} else if (typeof value === 'string' && !canUseUnits(value)) {
|
|
376
|
+
log.warn('minmax-have-mixed-units', [
|
|
377
|
+
'The `min-*` and `max-*` variants are not supported with a `screens` configuration containing mixed units.',
|
|
378
|
+
])
|
|
379
|
+
|
|
380
|
+
return []
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
return [`@media ${buildMediaQuery(toScreen(value, type))}`]
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
matchVariant('max', buildScreenVariant('max'), {
|
|
388
|
+
sort: maxSort,
|
|
389
|
+
values: areSimpleScreens ? buildScreenValues('max') : {},
|
|
390
|
+
})
|
|
391
|
+
|
|
392
|
+
// screens and min-* are sorted together when they can be
|
|
393
|
+
let id = 'min-screens'
|
|
394
|
+
for (let screen of screens) {
|
|
395
|
+
addVariant(screen.name, `@media ${buildMediaQuery(screen)}`, {
|
|
396
|
+
id,
|
|
397
|
+
sort: areSimpleScreens && screensUseConsistentUnits ? minSort : undefined,
|
|
398
|
+
value: screen,
|
|
399
|
+
})
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
matchVariant('min', buildScreenVariant('min'), {
|
|
403
|
+
id,
|
|
404
|
+
sort: minSort,
|
|
405
|
+
})
|
|
406
|
+
},
|
|
407
|
+
|
|
408
|
+
supportsVariants: ({ matchVariant, theme }) => {
|
|
409
|
+
matchVariant(
|
|
410
|
+
'supports',
|
|
411
|
+
(value = '') => {
|
|
412
|
+
let check = normalize(value)
|
|
413
|
+
let isRaw = /^\w*\s*\(/.test(check)
|
|
414
|
+
|
|
415
|
+
// Chrome has a bug where `(condtion1)or(condition2)` is not valid
|
|
416
|
+
// But `(condition1) or (condition2)` is supported.
|
|
417
|
+
check = isRaw ? check.replace(/\b(and|or|not)\b/g, ' $1 ') : check
|
|
418
|
+
|
|
419
|
+
if (isRaw) {
|
|
420
|
+
return `@supports ${check}`
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
if (!check.includes(':')) {
|
|
424
|
+
check = `${check}: var(--tw)`
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
if (!(check.startsWith('(') && check.endsWith(')'))) {
|
|
428
|
+
check = `(${check})`
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
return `@supports ${check}`
|
|
432
|
+
},
|
|
433
|
+
{ values: theme('supports') ?? {} }
|
|
434
|
+
)
|
|
435
|
+
},
|
|
436
|
+
|
|
437
|
+
hasVariants: ({ matchVariant, prefix }) => {
|
|
438
|
+
matchVariant('has', (value) => `&:has(${normalize(value)})`, {
|
|
439
|
+
values: {},
|
|
440
|
+
[INTERNAL_FEATURES]: {
|
|
441
|
+
respectPrefix: false,
|
|
442
|
+
},
|
|
443
|
+
})
|
|
444
|
+
|
|
445
|
+
matchVariant(
|
|
446
|
+
'group-has',
|
|
447
|
+
(value, { modifier }) =>
|
|
448
|
+
modifier
|
|
449
|
+
? `:merge(${prefix('.group')}\\/${modifier}):has(${normalize(value)}) &`
|
|
450
|
+
: `:merge(${prefix('.group')}):has(${normalize(value)}) &`,
|
|
451
|
+
{
|
|
452
|
+
values: {},
|
|
453
|
+
[INTERNAL_FEATURES]: {
|
|
454
|
+
respectPrefix: false,
|
|
455
|
+
},
|
|
456
|
+
}
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
matchVariant(
|
|
460
|
+
'peer-has',
|
|
461
|
+
(value, { modifier }) =>
|
|
462
|
+
modifier
|
|
463
|
+
? `:merge(${prefix('.peer')}\\/${modifier}):has(${normalize(value)}) ~ &`
|
|
464
|
+
: `:merge(${prefix('.peer')}):has(${normalize(value)}) ~ &`,
|
|
465
|
+
{
|
|
466
|
+
values: {},
|
|
467
|
+
[INTERNAL_FEATURES]: {
|
|
468
|
+
respectPrefix: false,
|
|
469
|
+
},
|
|
470
|
+
}
|
|
471
|
+
)
|
|
472
|
+
},
|
|
473
|
+
|
|
474
|
+
ariaVariants: ({ matchVariant, theme }) => {
|
|
475
|
+
matchVariant('aria', (value) => `&[aria-${normalize(value)}]`, { values: theme('aria') ?? {} })
|
|
476
|
+
matchVariant(
|
|
477
|
+
'group-aria',
|
|
478
|
+
(value, { modifier }) =>
|
|
479
|
+
modifier
|
|
480
|
+
? `:merge(.group\\/${modifier})[aria-${normalize(value)}] &`
|
|
481
|
+
: `:merge(.group)[aria-${normalize(value)}] &`,
|
|
482
|
+
{ values: theme('aria') ?? {} }
|
|
483
|
+
)
|
|
484
|
+
matchVariant(
|
|
485
|
+
'peer-aria',
|
|
486
|
+
(value, { modifier }) =>
|
|
487
|
+
modifier
|
|
488
|
+
? `:merge(.peer\\/${modifier})[aria-${normalize(value)}] ~ &`
|
|
489
|
+
: `:merge(.peer)[aria-${normalize(value)}] ~ &`,
|
|
490
|
+
{ values: theme('aria') ?? {} }
|
|
491
|
+
)
|
|
492
|
+
},
|
|
493
|
+
|
|
494
|
+
dataVariants: ({ matchVariant, theme }) => {
|
|
495
|
+
matchVariant('data', (value) => `&[data-${normalize(value)}]`, { values: theme('data') ?? {} })
|
|
496
|
+
matchVariant(
|
|
497
|
+
'group-data',
|
|
498
|
+
(value, { modifier }) =>
|
|
499
|
+
modifier
|
|
500
|
+
? `:merge(.group\\/${modifier})[data-${normalize(value)}] &`
|
|
501
|
+
: `:merge(.group)[data-${normalize(value)}] &`,
|
|
502
|
+
{ values: theme('data') ?? {} }
|
|
503
|
+
)
|
|
504
|
+
matchVariant(
|
|
505
|
+
'peer-data',
|
|
506
|
+
(value, { modifier }) =>
|
|
507
|
+
modifier
|
|
508
|
+
? `:merge(.peer\\/${modifier})[data-${normalize(value)}] ~ &`
|
|
509
|
+
: `:merge(.peer)[data-${normalize(value)}] ~ &`,
|
|
510
|
+
{ values: theme('data') ?? {} }
|
|
511
|
+
)
|
|
167
512
|
},
|
|
168
513
|
|
|
169
514
|
orientationVariants: ({ addVariant }) => {
|
|
170
515
|
addVariant('portrait', '@media (orientation: portrait)')
|
|
171
516
|
addVariant('landscape', '@media (orientation: landscape)')
|
|
172
517
|
},
|
|
518
|
+
|
|
519
|
+
prefersContrastVariants: ({ addVariant }) => {
|
|
520
|
+
addVariant('contrast-more', '@media (prefers-contrast: more)')
|
|
521
|
+
addVariant('contrast-less', '@media (prefers-contrast: less)')
|
|
522
|
+
},
|
|
523
|
+
|
|
524
|
+
forcedColorsVariants: ({ addVariant }) => {
|
|
525
|
+
addVariant('forced-colors', '@media (forced-colors: active)')
|
|
526
|
+
},
|
|
173
527
|
}
|
|
174
528
|
|
|
529
|
+
let cssTransformValue = [
|
|
530
|
+
'translate(var(--tw-translate-x), var(--tw-translate-y))',
|
|
531
|
+
'rotate(var(--tw-rotate))',
|
|
532
|
+
'skewX(var(--tw-skew-x))',
|
|
533
|
+
'skewY(var(--tw-skew-y))',
|
|
534
|
+
'scaleX(var(--tw-scale-x))',
|
|
535
|
+
'scaleY(var(--tw-scale-y))',
|
|
536
|
+
].join(' ')
|
|
537
|
+
|
|
538
|
+
let cssFilterValue = [
|
|
539
|
+
'var(--tw-blur)',
|
|
540
|
+
'var(--tw-brightness)',
|
|
541
|
+
'var(--tw-contrast)',
|
|
542
|
+
'var(--tw-grayscale)',
|
|
543
|
+
'var(--tw-hue-rotate)',
|
|
544
|
+
'var(--tw-invert)',
|
|
545
|
+
'var(--tw-saturate)',
|
|
546
|
+
'var(--tw-sepia)',
|
|
547
|
+
'var(--tw-drop-shadow)',
|
|
548
|
+
].join(' ')
|
|
549
|
+
|
|
550
|
+
let cssBackdropFilterValue = [
|
|
551
|
+
'var(--tw-backdrop-blur)',
|
|
552
|
+
'var(--tw-backdrop-brightness)',
|
|
553
|
+
'var(--tw-backdrop-contrast)',
|
|
554
|
+
'var(--tw-backdrop-grayscale)',
|
|
555
|
+
'var(--tw-backdrop-hue-rotate)',
|
|
556
|
+
'var(--tw-backdrop-invert)',
|
|
557
|
+
'var(--tw-backdrop-opacity)',
|
|
558
|
+
'var(--tw-backdrop-saturate)',
|
|
559
|
+
'var(--tw-backdrop-sepia)',
|
|
560
|
+
].join(' ')
|
|
561
|
+
|
|
175
562
|
export let corePlugins = {
|
|
176
563
|
preflight: ({ addBase }) => {
|
|
177
564
|
let preflightStyles = postcss.parse(
|
|
@@ -310,6 +697,7 @@ export let corePlugins = {
|
|
|
310
697
|
addUtilities({
|
|
311
698
|
'.visible': { visibility: 'visible' },
|
|
312
699
|
'.invisible': { visibility: 'hidden' },
|
|
700
|
+
'.collapse': { visibility: 'collapse' },
|
|
313
701
|
})
|
|
314
702
|
},
|
|
315
703
|
|
|
@@ -326,12 +714,14 @@ export let corePlugins = {
|
|
|
326
714
|
inset: createUtilityPlugin(
|
|
327
715
|
'inset',
|
|
328
716
|
[
|
|
329
|
-
['inset', ['
|
|
717
|
+
['inset', ['inset']],
|
|
330
718
|
[
|
|
331
719
|
['inset-x', ['left', 'right']],
|
|
332
720
|
['inset-y', ['top', 'bottom']],
|
|
333
721
|
],
|
|
334
722
|
[
|
|
723
|
+
['start', ['inset-inline-start']],
|
|
724
|
+
['end', ['inset-inline-end']],
|
|
335
725
|
['top', ['top']],
|
|
336
726
|
['right', ['right']],
|
|
337
727
|
['bottom', ['bottom']],
|
|
@@ -351,14 +741,24 @@ export let corePlugins = {
|
|
|
351
741
|
zIndex: createUtilityPlugin('zIndex', [['z', ['zIndex']]], { supportsNegativeValues: true }),
|
|
352
742
|
order: createUtilityPlugin('order', undefined, { supportsNegativeValues: true }),
|
|
353
743
|
gridColumn: createUtilityPlugin('gridColumn', [['col', ['gridColumn']]]),
|
|
354
|
-
gridColumnStart: createUtilityPlugin('gridColumnStart', [['col-start', ['gridColumnStart']]]
|
|
355
|
-
|
|
744
|
+
gridColumnStart: createUtilityPlugin('gridColumnStart', [['col-start', ['gridColumnStart']]], {
|
|
745
|
+
supportsNegativeValues: true,
|
|
746
|
+
}),
|
|
747
|
+
gridColumnEnd: createUtilityPlugin('gridColumnEnd', [['col-end', ['gridColumnEnd']]], {
|
|
748
|
+
supportsNegativeValues: true,
|
|
749
|
+
}),
|
|
356
750
|
gridRow: createUtilityPlugin('gridRow', [['row', ['gridRow']]]),
|
|
357
|
-
gridRowStart: createUtilityPlugin('gridRowStart', [['row-start', ['gridRowStart']]]
|
|
358
|
-
|
|
751
|
+
gridRowStart: createUtilityPlugin('gridRowStart', [['row-start', ['gridRowStart']]], {
|
|
752
|
+
supportsNegativeValues: true,
|
|
753
|
+
}),
|
|
754
|
+
gridRowEnd: createUtilityPlugin('gridRowEnd', [['row-end', ['gridRowEnd']]], {
|
|
755
|
+
supportsNegativeValues: true,
|
|
756
|
+
}),
|
|
359
757
|
|
|
360
758
|
float: ({ addUtilities }) => {
|
|
361
759
|
addUtilities({
|
|
760
|
+
'.float-start': { float: 'inline-start' },
|
|
761
|
+
'.float-end': { float: 'inline-end' },
|
|
362
762
|
'.float-right': { float: 'right' },
|
|
363
763
|
'.float-left': { float: 'left' },
|
|
364
764
|
'.float-none': { float: 'none' },
|
|
@@ -367,6 +767,8 @@ export let corePlugins = {
|
|
|
367
767
|
|
|
368
768
|
clear: ({ addUtilities }) => {
|
|
369
769
|
addUtilities({
|
|
770
|
+
'.clear-start': { clear: 'inline-start' },
|
|
771
|
+
'.clear-end': { clear: 'inline-end' },
|
|
370
772
|
'.clear-left': { clear: 'left' },
|
|
371
773
|
'.clear-right': { clear: 'right' },
|
|
372
774
|
'.clear-both': { clear: 'both' },
|
|
@@ -383,6 +785,8 @@ export let corePlugins = {
|
|
|
383
785
|
['my', ['margin-top', 'margin-bottom']],
|
|
384
786
|
],
|
|
385
787
|
[
|
|
788
|
+
['ms', ['margin-inline-start']],
|
|
789
|
+
['me', ['margin-inline-end']],
|
|
386
790
|
['mt', ['margin-top']],
|
|
387
791
|
['mr', ['margin-right']],
|
|
388
792
|
['mb', ['margin-bottom']],
|
|
@@ -399,6 +803,29 @@ export let corePlugins = {
|
|
|
399
803
|
})
|
|
400
804
|
},
|
|
401
805
|
|
|
806
|
+
lineClamp: ({ matchUtilities, addUtilities, theme }) => {
|
|
807
|
+
matchUtilities(
|
|
808
|
+
{
|
|
809
|
+
'line-clamp': (value) => ({
|
|
810
|
+
overflow: 'hidden',
|
|
811
|
+
display: '-webkit-box',
|
|
812
|
+
'-webkit-box-orient': 'vertical',
|
|
813
|
+
'-webkit-line-clamp': `${value}`,
|
|
814
|
+
}),
|
|
815
|
+
},
|
|
816
|
+
{ values: theme('lineClamp') }
|
|
817
|
+
)
|
|
818
|
+
|
|
819
|
+
addUtilities({
|
|
820
|
+
'.line-clamp-none': {
|
|
821
|
+
overflow: 'visible',
|
|
822
|
+
display: 'block',
|
|
823
|
+
'-webkit-box-orient': 'horizontal',
|
|
824
|
+
'-webkit-line-clamp': 'none',
|
|
825
|
+
},
|
|
826
|
+
})
|
|
827
|
+
},
|
|
828
|
+
|
|
402
829
|
display: ({ addUtilities }) => {
|
|
403
830
|
addUtilities({
|
|
404
831
|
'.block': { display: 'block' },
|
|
@@ -427,6 +854,8 @@ export let corePlugins = {
|
|
|
427
854
|
|
|
428
855
|
aspectRatio: createUtilityPlugin('aspectRatio', [['aspect', ['aspect-ratio']]]),
|
|
429
856
|
|
|
857
|
+
size: createUtilityPlugin('size', [['size', ['width', 'height']]]),
|
|
858
|
+
|
|
430
859
|
height: createUtilityPlugin('height', [['h', ['height']]]),
|
|
431
860
|
maxHeight: createUtilityPlugin('maxHeight', [['max-h', ['maxHeight']]]),
|
|
432
861
|
minHeight: createUtilityPlugin('minHeight', [['min-h', ['minHeight']]]),
|
|
@@ -453,6 +882,13 @@ export let corePlugins = {
|
|
|
453
882
|
})
|
|
454
883
|
},
|
|
455
884
|
|
|
885
|
+
captionSide: ({ addUtilities }) => {
|
|
886
|
+
addUtilities({
|
|
887
|
+
'.caption-top': { 'caption-side': 'top' },
|
|
888
|
+
'.caption-bottom': { 'caption-side': 'bottom' },
|
|
889
|
+
})
|
|
890
|
+
},
|
|
891
|
+
|
|
456
892
|
borderCollapse: ({ addUtilities }) => {
|
|
457
893
|
addUtilities({
|
|
458
894
|
'.border-collapse': { 'border-collapse': 'collapse' },
|
|
@@ -460,6 +896,41 @@ export let corePlugins = {
|
|
|
460
896
|
})
|
|
461
897
|
},
|
|
462
898
|
|
|
899
|
+
borderSpacing: ({ addDefaults, matchUtilities, theme }) => {
|
|
900
|
+
addDefaults('border-spacing', {
|
|
901
|
+
'--tw-border-spacing-x': 0,
|
|
902
|
+
'--tw-border-spacing-y': 0,
|
|
903
|
+
})
|
|
904
|
+
|
|
905
|
+
matchUtilities(
|
|
906
|
+
{
|
|
907
|
+
'border-spacing': (value) => {
|
|
908
|
+
return {
|
|
909
|
+
'--tw-border-spacing-x': value,
|
|
910
|
+
'--tw-border-spacing-y': value,
|
|
911
|
+
'@defaults border-spacing': {},
|
|
912
|
+
'border-spacing': 'var(--tw-border-spacing-x) var(--tw-border-spacing-y)',
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
'border-spacing-x': (value) => {
|
|
916
|
+
return {
|
|
917
|
+
'--tw-border-spacing-x': value,
|
|
918
|
+
'@defaults border-spacing': {},
|
|
919
|
+
'border-spacing': 'var(--tw-border-spacing-x) var(--tw-border-spacing-y)',
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
'border-spacing-y': (value) => {
|
|
923
|
+
return {
|
|
924
|
+
'--tw-border-spacing-y': value,
|
|
925
|
+
'@defaults border-spacing': {},
|
|
926
|
+
'border-spacing': 'var(--tw-border-spacing-x) var(--tw-border-spacing-y)',
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
},
|
|
930
|
+
{ values: theme('borderSpacing') }
|
|
931
|
+
)
|
|
932
|
+
},
|
|
933
|
+
|
|
463
934
|
transformOrigin: createUtilityPlugin('transformOrigin', [['origin', ['transformOrigin']]]),
|
|
464
935
|
translate: createUtilityPlugin(
|
|
465
936
|
'translate',
|
|
@@ -467,11 +938,11 @@ export let corePlugins = {
|
|
|
467
938
|
[
|
|
468
939
|
[
|
|
469
940
|
'translate-x',
|
|
470
|
-
[['@defaults transform', {}], '--tw-translate-x', ['transform',
|
|
941
|
+
[['@defaults transform', {}], '--tw-translate-x', ['transform', cssTransformValue]],
|
|
471
942
|
],
|
|
472
943
|
[
|
|
473
944
|
'translate-y',
|
|
474
|
-
[['@defaults transform', {}], '--tw-translate-y', ['transform',
|
|
945
|
+
[['@defaults transform', {}], '--tw-translate-y', ['transform', cssTransformValue]],
|
|
475
946
|
],
|
|
476
947
|
],
|
|
477
948
|
],
|
|
@@ -479,26 +950,15 @@ export let corePlugins = {
|
|
|
479
950
|
),
|
|
480
951
|
rotate: createUtilityPlugin(
|
|
481
952
|
'rotate',
|
|
482
|
-
[
|
|
483
|
-
[
|
|
484
|
-
'rotate',
|
|
485
|
-
[['@defaults transform', {}], '--tw-rotate', ['transform', 'var(--tw-transform)']],
|
|
486
|
-
],
|
|
487
|
-
],
|
|
953
|
+
[['rotate', [['@defaults transform', {}], '--tw-rotate', ['transform', cssTransformValue]]]],
|
|
488
954
|
{ supportsNegativeValues: true }
|
|
489
955
|
),
|
|
490
956
|
skew: createUtilityPlugin(
|
|
491
957
|
'skew',
|
|
492
958
|
[
|
|
493
959
|
[
|
|
494
|
-
[
|
|
495
|
-
|
|
496
|
-
[['@defaults transform', {}], '--tw-skew-x', ['transform', 'var(--tw-transform)']],
|
|
497
|
-
],
|
|
498
|
-
[
|
|
499
|
-
'skew-y',
|
|
500
|
-
[['@defaults transform', {}], '--tw-skew-y', ['transform', 'var(--tw-transform)']],
|
|
501
|
-
],
|
|
960
|
+
['skew-x', [['@defaults transform', {}], '--tw-skew-x', ['transform', cssTransformValue]]],
|
|
961
|
+
['skew-y', [['@defaults transform', {}], '--tw-skew-y', ['transform', cssTransformValue]]],
|
|
502
962
|
],
|
|
503
963
|
],
|
|
504
964
|
{ supportsNegativeValues: true }
|
|
@@ -512,73 +972,51 @@ export let corePlugins = {
|
|
|
512
972
|
['@defaults transform', {}],
|
|
513
973
|
'--tw-scale-x',
|
|
514
974
|
'--tw-scale-y',
|
|
515
|
-
['transform',
|
|
975
|
+
['transform', cssTransformValue],
|
|
516
976
|
],
|
|
517
977
|
],
|
|
518
978
|
[
|
|
519
979
|
[
|
|
520
980
|
'scale-x',
|
|
521
|
-
[['@defaults transform', {}], '--tw-scale-x', ['transform',
|
|
981
|
+
[['@defaults transform', {}], '--tw-scale-x', ['transform', cssTransformValue]],
|
|
522
982
|
],
|
|
523
983
|
[
|
|
524
984
|
'scale-y',
|
|
525
|
-
[['@defaults transform', {}], '--tw-scale-y', ['transform',
|
|
985
|
+
[['@defaults transform', {}], '--tw-scale-y', ['transform', cssTransformValue]],
|
|
526
986
|
],
|
|
527
987
|
],
|
|
528
988
|
],
|
|
529
989
|
{ supportsNegativeValues: true }
|
|
530
990
|
),
|
|
531
991
|
|
|
532
|
-
transform: ({
|
|
533
|
-
|
|
534
|
-
'
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
'rotate(var(--tw-rotate))',
|
|
546
|
-
'skewX(var(--tw-skew-x))',
|
|
547
|
-
'skewY(var(--tw-skew-y))',
|
|
548
|
-
'scaleX(var(--tw-scale-x))',
|
|
549
|
-
'scaleY(var(--tw-scale-y))',
|
|
550
|
-
].join(' '),
|
|
551
|
-
},
|
|
552
|
-
})
|
|
553
|
-
addUtilities({
|
|
554
|
-
'.transform': { '@defaults transform': {}, transform: 'var(--tw-transform)' },
|
|
992
|
+
transform: ({ addDefaults, addUtilities }) => {
|
|
993
|
+
addDefaults('transform', {
|
|
994
|
+
'--tw-translate-x': '0',
|
|
995
|
+
'--tw-translate-y': '0',
|
|
996
|
+
'--tw-rotate': '0',
|
|
997
|
+
'--tw-skew-x': '0',
|
|
998
|
+
'--tw-skew-y': '0',
|
|
999
|
+
'--tw-scale-x': '1',
|
|
1000
|
+
'--tw-scale-y': '1',
|
|
1001
|
+
})
|
|
1002
|
+
|
|
1003
|
+
addUtilities({
|
|
1004
|
+
'.transform': { '@defaults transform': {}, transform: cssTransformValue },
|
|
555
1005
|
'.transform-cpu': {
|
|
556
|
-
|
|
557
|
-
'translateX(var(--tw-translate-x))',
|
|
558
|
-
'translateY(var(--tw-translate-y))',
|
|
559
|
-
'rotate(var(--tw-rotate))',
|
|
560
|
-
'skewX(var(--tw-skew-x))',
|
|
561
|
-
'skewY(var(--tw-skew-y))',
|
|
562
|
-
'scaleX(var(--tw-scale-x))',
|
|
563
|
-
'scaleY(var(--tw-scale-y))',
|
|
564
|
-
].join(' '),
|
|
1006
|
+
transform: cssTransformValue,
|
|
565
1007
|
},
|
|
566
1008
|
'.transform-gpu': {
|
|
567
|
-
|
|
568
|
-
'
|
|
569
|
-
'
|
|
570
|
-
|
|
571
|
-
'skewY(var(--tw-skew-y))',
|
|
572
|
-
'scaleX(var(--tw-scale-x))',
|
|
573
|
-
'scaleY(var(--tw-scale-y))',
|
|
574
|
-
].join(' '),
|
|
1009
|
+
transform: cssTransformValue.replace(
|
|
1010
|
+
'translate(var(--tw-translate-x), var(--tw-translate-y))',
|
|
1011
|
+
'translate3d(var(--tw-translate-x), var(--tw-translate-y), 0)'
|
|
1012
|
+
),
|
|
575
1013
|
},
|
|
576
1014
|
'.transform-none': { transform: 'none' },
|
|
577
1015
|
})
|
|
578
1016
|
},
|
|
579
1017
|
|
|
580
|
-
animation: ({ matchUtilities, theme,
|
|
581
|
-
let prefixName = (name) => prefix
|
|
1018
|
+
animation: ({ matchUtilities, theme, config }) => {
|
|
1019
|
+
let prefixName = (name) => escapeClassName(config('prefix') + name)
|
|
582
1020
|
let keyframes = Object.fromEntries(
|
|
583
1021
|
Object.entries(theme('keyframes') ?? {}).map(([key, value]) => {
|
|
584
1022
|
return [key, { [`@keyframes ${prefixName(key)}`]: value }]
|
|
@@ -611,53 +1049,52 @@ export let corePlugins = {
|
|
|
611
1049
|
|
|
612
1050
|
cursor: createUtilityPlugin('cursor'),
|
|
613
1051
|
|
|
614
|
-
touchAction: ({
|
|
615
|
-
|
|
616
|
-
'
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
'--tw-pinch-zoom': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
620
|
-
'--tw-touch-action': 'var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)',
|
|
621
|
-
},
|
|
1052
|
+
touchAction: ({ addDefaults, addUtilities }) => {
|
|
1053
|
+
addDefaults('touch-action', {
|
|
1054
|
+
'--tw-pan-x': ' ',
|
|
1055
|
+
'--tw-pan-y': ' ',
|
|
1056
|
+
'--tw-pinch-zoom': ' ',
|
|
622
1057
|
})
|
|
623
1058
|
|
|
1059
|
+
let cssTouchActionValue = 'var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)'
|
|
1060
|
+
|
|
624
1061
|
addUtilities({
|
|
625
1062
|
'.touch-auto': { 'touch-action': 'auto' },
|
|
626
1063
|
'.touch-none': { 'touch-action': 'none' },
|
|
627
1064
|
'.touch-pan-x': {
|
|
628
1065
|
'@defaults touch-action': {},
|
|
629
1066
|
'--tw-pan-x': 'pan-x',
|
|
630
|
-
'touch-action':
|
|
1067
|
+
'touch-action': cssTouchActionValue,
|
|
631
1068
|
},
|
|
632
1069
|
'.touch-pan-left': {
|
|
633
1070
|
'@defaults touch-action': {},
|
|
634
1071
|
'--tw-pan-x': 'pan-left',
|
|
635
|
-
'touch-action':
|
|
1072
|
+
'touch-action': cssTouchActionValue,
|
|
636
1073
|
},
|
|
637
1074
|
'.touch-pan-right': {
|
|
638
1075
|
'@defaults touch-action': {},
|
|
639
1076
|
'--tw-pan-x': 'pan-right',
|
|
640
|
-
'touch-action':
|
|
1077
|
+
'touch-action': cssTouchActionValue,
|
|
641
1078
|
},
|
|
642
1079
|
'.touch-pan-y': {
|
|
643
1080
|
'@defaults touch-action': {},
|
|
644
1081
|
'--tw-pan-y': 'pan-y',
|
|
645
|
-
'touch-action':
|
|
1082
|
+
'touch-action': cssTouchActionValue,
|
|
646
1083
|
},
|
|
647
1084
|
'.touch-pan-up': {
|
|
648
1085
|
'@defaults touch-action': {},
|
|
649
1086
|
'--tw-pan-y': 'pan-up',
|
|
650
|
-
'touch-action':
|
|
1087
|
+
'touch-action': cssTouchActionValue,
|
|
651
1088
|
},
|
|
652
1089
|
'.touch-pan-down': {
|
|
653
1090
|
'@defaults touch-action': {},
|
|
654
1091
|
'--tw-pan-y': 'pan-down',
|
|
655
|
-
'touch-action':
|
|
1092
|
+
'touch-action': cssTouchActionValue,
|
|
656
1093
|
},
|
|
657
1094
|
'.touch-pinch-zoom': {
|
|
658
1095
|
'@defaults touch-action': {},
|
|
659
1096
|
'--tw-pinch-zoom': 'pinch-zoom',
|
|
660
|
-
'touch-action':
|
|
1097
|
+
'touch-action': cssTouchActionValue,
|
|
661
1098
|
},
|
|
662
1099
|
'.touch-manipulation': { 'touch-action': 'manipulation' },
|
|
663
1100
|
})
|
|
@@ -681,11 +1118,9 @@ export let corePlugins = {
|
|
|
681
1118
|
})
|
|
682
1119
|
},
|
|
683
1120
|
|
|
684
|
-
scrollSnapType: ({
|
|
685
|
-
|
|
686
|
-
'
|
|
687
|
-
'--tw-scroll-snap-strictness': 'proximity',
|
|
688
|
-
},
|
|
1121
|
+
scrollSnapType: ({ addDefaults, addUtilities }) => {
|
|
1122
|
+
addDefaults('scroll-snap-type', {
|
|
1123
|
+
'--tw-scroll-snap-strictness': 'proximity',
|
|
689
1124
|
})
|
|
690
1125
|
|
|
691
1126
|
addUtilities({
|
|
@@ -732,6 +1167,8 @@ export let corePlugins = {
|
|
|
732
1167
|
['scroll-my', ['scroll-margin-top', 'scroll-margin-bottom']],
|
|
733
1168
|
],
|
|
734
1169
|
[
|
|
1170
|
+
['scroll-ms', ['scroll-margin-inline-start']],
|
|
1171
|
+
['scroll-me', ['scroll-margin-inline-end']],
|
|
735
1172
|
['scroll-mt', ['scroll-margin-top']],
|
|
736
1173
|
['scroll-mr', ['scroll-margin-right']],
|
|
737
1174
|
['scroll-mb', ['scroll-margin-bottom']],
|
|
@@ -748,6 +1185,8 @@ export let corePlugins = {
|
|
|
748
1185
|
['scroll-py', ['scroll-padding-top', 'scroll-padding-bottom']],
|
|
749
1186
|
],
|
|
750
1187
|
[
|
|
1188
|
+
['scroll-ps', ['scroll-padding-inline-start']],
|
|
1189
|
+
['scroll-pe', ['scroll-padding-inline-end']],
|
|
751
1190
|
['scroll-pt', ['scroll-padding-top']],
|
|
752
1191
|
['scroll-pr', ['scroll-padding-right']],
|
|
753
1192
|
['scroll-pb', ['scroll-padding-bottom']],
|
|
@@ -761,12 +1200,13 @@ export let corePlugins = {
|
|
|
761
1200
|
'.list-outside': { 'list-style-position': 'outside' },
|
|
762
1201
|
})
|
|
763
1202
|
},
|
|
764
|
-
|
|
765
1203
|
listStyleType: createUtilityPlugin('listStyleType', [['list', ['listStyleType']]]),
|
|
1204
|
+
listStyleImage: createUtilityPlugin('listStyleImage', [['list-image', ['listStyleImage']]]),
|
|
766
1205
|
|
|
767
1206
|
appearance: ({ addUtilities }) => {
|
|
768
1207
|
addUtilities({
|
|
769
1208
|
'.appearance-none': { appearance: 'none' },
|
|
1209
|
+
'.appearance-auto': { appearance: 'auto' },
|
|
770
1210
|
})
|
|
771
1211
|
},
|
|
772
1212
|
|
|
@@ -813,6 +1253,7 @@ export let corePlugins = {
|
|
|
813
1253
|
addUtilities({
|
|
814
1254
|
'.grid-flow-row': { gridAutoFlow: 'row' },
|
|
815
1255
|
'.grid-flow-col': { gridAutoFlow: 'column' },
|
|
1256
|
+
'.grid-flow-dense': { gridAutoFlow: 'dense' },
|
|
816
1257
|
'.grid-flow-row-dense': { gridAutoFlow: 'row dense' },
|
|
817
1258
|
'.grid-flow-col-dense': { gridAutoFlow: 'column dense' },
|
|
818
1259
|
})
|
|
@@ -849,6 +1290,7 @@ export let corePlugins = {
|
|
|
849
1290
|
'.place-content-between': { 'place-content': 'space-between' },
|
|
850
1291
|
'.place-content-around': { 'place-content': 'space-around' },
|
|
851
1292
|
'.place-content-evenly': { 'place-content': 'space-evenly' },
|
|
1293
|
+
'.place-content-baseline': { 'place-content': 'baseline' },
|
|
852
1294
|
'.place-content-stretch': { 'place-content': 'stretch' },
|
|
853
1295
|
})
|
|
854
1296
|
},
|
|
@@ -858,18 +1300,22 @@ export let corePlugins = {
|
|
|
858
1300
|
'.place-items-start': { 'place-items': 'start' },
|
|
859
1301
|
'.place-items-end': { 'place-items': 'end' },
|
|
860
1302
|
'.place-items-center': { 'place-items': 'center' },
|
|
1303
|
+
'.place-items-baseline': { 'place-items': 'baseline' },
|
|
861
1304
|
'.place-items-stretch': { 'place-items': 'stretch' },
|
|
862
1305
|
})
|
|
863
1306
|
},
|
|
864
1307
|
|
|
865
1308
|
alignContent: ({ addUtilities }) => {
|
|
866
1309
|
addUtilities({
|
|
1310
|
+
'.content-normal': { 'align-content': 'normal' },
|
|
867
1311
|
'.content-center': { 'align-content': 'center' },
|
|
868
1312
|
'.content-start': { 'align-content': 'flex-start' },
|
|
869
1313
|
'.content-end': { 'align-content': 'flex-end' },
|
|
870
1314
|
'.content-between': { 'align-content': 'space-between' },
|
|
871
1315
|
'.content-around': { 'align-content': 'space-around' },
|
|
872
1316
|
'.content-evenly': { 'align-content': 'space-evenly' },
|
|
1317
|
+
'.content-baseline': { 'align-content': 'baseline' },
|
|
1318
|
+
'.content-stretch': { 'align-content': 'stretch' },
|
|
873
1319
|
})
|
|
874
1320
|
},
|
|
875
1321
|
|
|
@@ -885,12 +1331,14 @@ export let corePlugins = {
|
|
|
885
1331
|
|
|
886
1332
|
justifyContent: ({ addUtilities }) => {
|
|
887
1333
|
addUtilities({
|
|
1334
|
+
'.justify-normal': { 'justify-content': 'normal' },
|
|
888
1335
|
'.justify-start': { 'justify-content': 'flex-start' },
|
|
889
1336
|
'.justify-end': { 'justify-content': 'flex-end' },
|
|
890
1337
|
'.justify-center': { 'justify-content': 'center' },
|
|
891
1338
|
'.justify-between': { 'justify-content': 'space-between' },
|
|
892
1339
|
'.justify-around': { 'justify-content': 'space-around' },
|
|
893
1340
|
'.justify-evenly': { 'justify-content': 'space-evenly' },
|
|
1341
|
+
'.justify-stretch': { 'justify-content': 'stretch' },
|
|
894
1342
|
})
|
|
895
1343
|
},
|
|
896
1344
|
|
|
@@ -974,7 +1422,7 @@ export let corePlugins = {
|
|
|
974
1422
|
}
|
|
975
1423
|
},
|
|
976
1424
|
},
|
|
977
|
-
{ values: theme('divideWidth'), type: ['line-width', 'length'] }
|
|
1425
|
+
{ values: theme('divideWidth'), type: ['line-width', 'length', 'any'] }
|
|
978
1426
|
)
|
|
979
1427
|
|
|
980
1428
|
addUtilities({
|
|
@@ -1022,7 +1470,7 @@ export let corePlugins = {
|
|
|
1022
1470
|
},
|
|
1023
1471
|
{
|
|
1024
1472
|
values: (({ DEFAULT: _, ...colors }) => colors)(flattenColorPalette(theme('divideColor'))),
|
|
1025
|
-
type: 'color',
|
|
1473
|
+
type: ['color', 'any'],
|
|
1026
1474
|
}
|
|
1027
1475
|
)
|
|
1028
1476
|
},
|
|
@@ -1119,6 +1567,14 @@ export let corePlugins = {
|
|
|
1119
1567
|
})
|
|
1120
1568
|
},
|
|
1121
1569
|
|
|
1570
|
+
hyphens: ({ addUtilities }) => {
|
|
1571
|
+
addUtilities({
|
|
1572
|
+
'.hyphens-none': { hyphens: 'none' },
|
|
1573
|
+
'.hyphens-manual': { hyphens: 'manual' },
|
|
1574
|
+
'.hyphens-auto': { hyphens: 'auto' },
|
|
1575
|
+
})
|
|
1576
|
+
},
|
|
1577
|
+
|
|
1122
1578
|
whitespace: ({ addUtilities }) => {
|
|
1123
1579
|
addUtilities({
|
|
1124
1580
|
'.whitespace-normal': { 'white-space': 'normal' },
|
|
@@ -1126,6 +1582,16 @@ export let corePlugins = {
|
|
|
1126
1582
|
'.whitespace-pre': { 'white-space': 'pre' },
|
|
1127
1583
|
'.whitespace-pre-line': { 'white-space': 'pre-line' },
|
|
1128
1584
|
'.whitespace-pre-wrap': { 'white-space': 'pre-wrap' },
|
|
1585
|
+
'.whitespace-break-spaces': { 'white-space': 'break-spaces' },
|
|
1586
|
+
})
|
|
1587
|
+
},
|
|
1588
|
+
|
|
1589
|
+
textWrap: ({ addUtilities }) => {
|
|
1590
|
+
addUtilities({
|
|
1591
|
+
'.text-wrap': { 'text-wrap': 'wrap' },
|
|
1592
|
+
'.text-nowrap': { 'text-wrap': 'nowrap' },
|
|
1593
|
+
'.text-balance': { 'text-wrap': 'balance' },
|
|
1594
|
+
'.text-pretty': { 'text-wrap': 'pretty' },
|
|
1129
1595
|
})
|
|
1130
1596
|
},
|
|
1131
1597
|
|
|
@@ -1134,18 +1600,25 @@ export let corePlugins = {
|
|
|
1134
1600
|
'.break-normal': { 'overflow-wrap': 'normal', 'word-break': 'normal' },
|
|
1135
1601
|
'.break-words': { 'overflow-wrap': 'break-word' },
|
|
1136
1602
|
'.break-all': { 'word-break': 'break-all' },
|
|
1603
|
+
'.break-keep': { 'word-break': 'keep-all' },
|
|
1137
1604
|
})
|
|
1138
1605
|
},
|
|
1139
1606
|
|
|
1140
1607
|
borderRadius: createUtilityPlugin('borderRadius', [
|
|
1141
1608
|
['rounded', ['border-radius']],
|
|
1142
1609
|
[
|
|
1610
|
+
['rounded-s', ['border-start-start-radius', 'border-end-start-radius']],
|
|
1611
|
+
['rounded-e', ['border-start-end-radius', 'border-end-end-radius']],
|
|
1143
1612
|
['rounded-t', ['border-top-left-radius', 'border-top-right-radius']],
|
|
1144
1613
|
['rounded-r', ['border-top-right-radius', 'border-bottom-right-radius']],
|
|
1145
1614
|
['rounded-b', ['border-bottom-right-radius', 'border-bottom-left-radius']],
|
|
1146
1615
|
['rounded-l', ['border-top-left-radius', 'border-bottom-left-radius']],
|
|
1147
1616
|
],
|
|
1148
1617
|
[
|
|
1618
|
+
['rounded-ss', ['border-start-start-radius']],
|
|
1619
|
+
['rounded-se', ['border-start-end-radius']],
|
|
1620
|
+
['rounded-ee', ['border-end-end-radius']],
|
|
1621
|
+
['rounded-es', ['border-end-start-radius']],
|
|
1149
1622
|
['rounded-tl', ['border-top-left-radius']],
|
|
1150
1623
|
['rounded-tr', ['border-top-right-radius']],
|
|
1151
1624
|
['rounded-br', ['border-bottom-right-radius']],
|
|
@@ -1162,6 +1635,8 @@ export let corePlugins = {
|
|
|
1162
1635
|
['border-y', [['@defaults border-width', {}], 'border-top-width', 'border-bottom-width']],
|
|
1163
1636
|
],
|
|
1164
1637
|
[
|
|
1638
|
+
['border-s', [['@defaults border-width', {}], 'border-inline-start-width']],
|
|
1639
|
+
['border-e', [['@defaults border-width', {}], 'border-inline-end-width']],
|
|
1165
1640
|
['border-t', [['@defaults border-width', {}], 'border-top-width']],
|
|
1166
1641
|
['border-r', [['@defaults border-width', {}], 'border-right-width']],
|
|
1167
1642
|
['border-b', [['@defaults border-width', {}], 'border-bottom-width']],
|
|
@@ -1182,24 +1657,7 @@ export let corePlugins = {
|
|
|
1182
1657
|
})
|
|
1183
1658
|
},
|
|
1184
1659
|
|
|
1185
|
-
borderColor: ({
|
|
1186
|
-
if (!corePlugins('borderOpacity')) {
|
|
1187
|
-
let value = theme('borderColor.DEFAULT', 'currentColor')
|
|
1188
|
-
addBase({
|
|
1189
|
-
'@defaults border-width': {
|
|
1190
|
-
'border-color': toColorValue(value),
|
|
1191
|
-
},
|
|
1192
|
-
})
|
|
1193
|
-
} else {
|
|
1194
|
-
addBase({
|
|
1195
|
-
'@defaults border-width': withAlphaVariable({
|
|
1196
|
-
color: theme('borderColor.DEFAULT', 'currentColor'),
|
|
1197
|
-
property: 'border-color',
|
|
1198
|
-
variable: '--tw-border-opacity',
|
|
1199
|
-
}),
|
|
1200
|
-
})
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1660
|
+
borderColor: ({ matchUtilities, theme, corePlugins }) => {
|
|
1203
1661
|
matchUtilities(
|
|
1204
1662
|
{
|
|
1205
1663
|
border: (value) => {
|
|
@@ -1218,7 +1676,7 @@ export let corePlugins = {
|
|
|
1218
1676
|
},
|
|
1219
1677
|
{
|
|
1220
1678
|
values: (({ DEFAULT: _, ...colors }) => colors)(flattenColorPalette(theme('borderColor'))),
|
|
1221
|
-
type: ['color'],
|
|
1679
|
+
type: ['color', 'any'],
|
|
1222
1680
|
}
|
|
1223
1681
|
)
|
|
1224
1682
|
|
|
@@ -1255,12 +1713,38 @@ export let corePlugins = {
|
|
|
1255
1713
|
},
|
|
1256
1714
|
{
|
|
1257
1715
|
values: (({ DEFAULT: _, ...colors }) => colors)(flattenColorPalette(theme('borderColor'))),
|
|
1258
|
-
type: 'color',
|
|
1716
|
+
type: ['color', 'any'],
|
|
1259
1717
|
}
|
|
1260
1718
|
)
|
|
1261
1719
|
|
|
1262
1720
|
matchUtilities(
|
|
1263
1721
|
{
|
|
1722
|
+
'border-s': (value) => {
|
|
1723
|
+
if (!corePlugins('borderOpacity')) {
|
|
1724
|
+
return {
|
|
1725
|
+
'border-inline-start-color': toColorValue(value),
|
|
1726
|
+
}
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
return withAlphaVariable({
|
|
1730
|
+
color: value,
|
|
1731
|
+
property: 'border-inline-start-color',
|
|
1732
|
+
variable: '--tw-border-opacity',
|
|
1733
|
+
})
|
|
1734
|
+
},
|
|
1735
|
+
'border-e': (value) => {
|
|
1736
|
+
if (!corePlugins('borderOpacity')) {
|
|
1737
|
+
return {
|
|
1738
|
+
'border-inline-end-color': toColorValue(value),
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
return withAlphaVariable({
|
|
1743
|
+
color: value,
|
|
1744
|
+
property: 'border-inline-end-color',
|
|
1745
|
+
variable: '--tw-border-opacity',
|
|
1746
|
+
})
|
|
1747
|
+
},
|
|
1264
1748
|
'border-t': (value) => {
|
|
1265
1749
|
if (!corePlugins('borderOpacity')) {
|
|
1266
1750
|
return {
|
|
@@ -1316,7 +1800,7 @@ export let corePlugins = {
|
|
|
1316
1800
|
},
|
|
1317
1801
|
{
|
|
1318
1802
|
values: (({ DEFAULT: _, ...colors }) => colors)(flattenColorPalette(theme('borderColor'))),
|
|
1319
|
-
type: 'color',
|
|
1803
|
+
type: ['color', 'any'],
|
|
1320
1804
|
}
|
|
1321
1805
|
)
|
|
1322
1806
|
},
|
|
@@ -1342,7 +1826,7 @@ export let corePlugins = {
|
|
|
1342
1826
|
})
|
|
1343
1827
|
},
|
|
1344
1828
|
},
|
|
1345
|
-
{ values: flattenColorPalette(theme('backgroundColor')), type: 'color' }
|
|
1829
|
+
{ values: flattenColorPalette(theme('backgroundColor')), type: ['color', 'any'] }
|
|
1346
1830
|
)
|
|
1347
1831
|
},
|
|
1348
1832
|
|
|
@@ -1357,44 +1841,98 @@ export let corePlugins = {
|
|
|
1357
1841
|
return withAlphaValue(value, 0, 'rgb(255 255 255 / 0)')
|
|
1358
1842
|
}
|
|
1359
1843
|
|
|
1360
|
-
return function ({ matchUtilities, theme }) {
|
|
1844
|
+
return function ({ matchUtilities, theme, addDefaults }) {
|
|
1845
|
+
addDefaults('gradient-color-stops', {
|
|
1846
|
+
'--tw-gradient-from-position': ' ',
|
|
1847
|
+
'--tw-gradient-via-position': ' ',
|
|
1848
|
+
'--tw-gradient-to-position': ' ',
|
|
1849
|
+
})
|
|
1850
|
+
|
|
1361
1851
|
let options = {
|
|
1362
1852
|
values: flattenColorPalette(theme('gradientColorStops')),
|
|
1363
1853
|
type: ['color', 'any'],
|
|
1364
1854
|
}
|
|
1365
1855
|
|
|
1856
|
+
let positionOptions = {
|
|
1857
|
+
values: theme('gradientColorStopPositions'),
|
|
1858
|
+
type: ['length', 'percentage'],
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1366
1861
|
matchUtilities(
|
|
1367
1862
|
{
|
|
1368
1863
|
from: (value) => {
|
|
1369
1864
|
let transparentToValue = transparentTo(value)
|
|
1370
1865
|
|
|
1371
1866
|
return {
|
|
1372
|
-
'
|
|
1373
|
-
'--tw-gradient-
|
|
1867
|
+
'@defaults gradient-color-stops': {},
|
|
1868
|
+
'--tw-gradient-from': `${toColorValue(value)} var(--tw-gradient-from-position)`,
|
|
1869
|
+
'--tw-gradient-to': `${transparentToValue} var(--tw-gradient-to-position)`,
|
|
1870
|
+
'--tw-gradient-stops': `var(--tw-gradient-from), var(--tw-gradient-to)`,
|
|
1374
1871
|
}
|
|
1375
1872
|
},
|
|
1376
1873
|
},
|
|
1377
1874
|
options
|
|
1378
1875
|
)
|
|
1876
|
+
|
|
1877
|
+
matchUtilities(
|
|
1878
|
+
{
|
|
1879
|
+
from: (value) => {
|
|
1880
|
+
return {
|
|
1881
|
+
'--tw-gradient-from-position': value,
|
|
1882
|
+
}
|
|
1883
|
+
},
|
|
1884
|
+
},
|
|
1885
|
+
positionOptions
|
|
1886
|
+
)
|
|
1887
|
+
|
|
1379
1888
|
matchUtilities(
|
|
1380
1889
|
{
|
|
1381
1890
|
via: (value) => {
|
|
1382
1891
|
let transparentToValue = transparentTo(value)
|
|
1383
1892
|
|
|
1384
1893
|
return {
|
|
1894
|
+
'@defaults gradient-color-stops': {},
|
|
1895
|
+
'--tw-gradient-to': `${transparentToValue} var(--tw-gradient-to-position)`,
|
|
1385
1896
|
'--tw-gradient-stops': `var(--tw-gradient-from), ${toColorValue(
|
|
1386
|
-
value
|
|
1387
|
-
|
|
1388
|
-
)}, var(--tw-gradient-to, ${transparentToValue})`,
|
|
1897
|
+
value
|
|
1898
|
+
)} var(--tw-gradient-via-position), var(--tw-gradient-to)`,
|
|
1389
1899
|
}
|
|
1390
1900
|
},
|
|
1391
1901
|
},
|
|
1392
1902
|
options
|
|
1393
1903
|
)
|
|
1904
|
+
|
|
1394
1905
|
matchUtilities(
|
|
1395
|
-
{
|
|
1906
|
+
{
|
|
1907
|
+
via: (value) => {
|
|
1908
|
+
return {
|
|
1909
|
+
'--tw-gradient-via-position': value,
|
|
1910
|
+
}
|
|
1911
|
+
},
|
|
1912
|
+
},
|
|
1913
|
+
positionOptions
|
|
1914
|
+
)
|
|
1915
|
+
|
|
1916
|
+
matchUtilities(
|
|
1917
|
+
{
|
|
1918
|
+
to: (value) => ({
|
|
1919
|
+
'@defaults gradient-color-stops': {},
|
|
1920
|
+
'--tw-gradient-to': `${toColorValue(value)} var(--tw-gradient-to-position)`,
|
|
1921
|
+
}),
|
|
1922
|
+
},
|
|
1396
1923
|
options
|
|
1397
1924
|
)
|
|
1925
|
+
|
|
1926
|
+
matchUtilities(
|
|
1927
|
+
{
|
|
1928
|
+
to: (value) => {
|
|
1929
|
+
return {
|
|
1930
|
+
'--tw-gradient-to-position': value,
|
|
1931
|
+
}
|
|
1932
|
+
},
|
|
1933
|
+
},
|
|
1934
|
+
positionOptions
|
|
1935
|
+
)
|
|
1398
1936
|
}
|
|
1399
1937
|
})(),
|
|
1400
1938
|
|
|
@@ -1408,7 +1946,7 @@ export let corePlugins = {
|
|
|
1408
1946
|
},
|
|
1409
1947
|
|
|
1410
1948
|
backgroundSize: createUtilityPlugin('backgroundSize', [['bg', ['background-size']]], {
|
|
1411
|
-
type: ['lookup', 'length', 'percentage'],
|
|
1949
|
+
type: ['lookup', 'length', 'percentage', 'size'],
|
|
1412
1950
|
}),
|
|
1413
1951
|
|
|
1414
1952
|
backgroundAttachment: ({ addUtilities }) => {
|
|
@@ -1429,7 +1967,7 @@ export let corePlugins = {
|
|
|
1429
1967
|
},
|
|
1430
1968
|
|
|
1431
1969
|
backgroundPosition: createUtilityPlugin('backgroundPosition', [['bg', ['background-position']]], {
|
|
1432
|
-
type: ['lookup', 'position'],
|
|
1970
|
+
type: ['lookup', ['position', { preferOnConflict: true }]],
|
|
1433
1971
|
}),
|
|
1434
1972
|
|
|
1435
1973
|
backgroundRepeat: ({ addUtilities }) => {
|
|
@@ -1469,7 +2007,7 @@ export let corePlugins = {
|
|
|
1469
2007
|
return { stroke: toColorValue(value) }
|
|
1470
2008
|
},
|
|
1471
2009
|
},
|
|
1472
|
-
{ values: flattenColorPalette(theme('stroke')), type: ['color', 'url'] }
|
|
2010
|
+
{ values: flattenColorPalette(theme('stroke')), type: ['color', 'url', 'any'] }
|
|
1473
2011
|
)
|
|
1474
2012
|
},
|
|
1475
2013
|
|
|
@@ -1495,6 +2033,8 @@ export let corePlugins = {
|
|
|
1495
2033
|
['py', ['padding-top', 'padding-bottom']],
|
|
1496
2034
|
],
|
|
1497
2035
|
[
|
|
2036
|
+
['ps', ['padding-inline-start']],
|
|
2037
|
+
['pe', ['padding-inline-end']],
|
|
1498
2038
|
['pt', ['padding-top']],
|
|
1499
2039
|
['pr', ['padding-right']],
|
|
1500
2040
|
['pb', ['padding-bottom']],
|
|
@@ -1508,6 +2048,8 @@ export let corePlugins = {
|
|
|
1508
2048
|
'.text-center': { 'text-align': 'center' },
|
|
1509
2049
|
'.text-right': { 'text-align': 'right' },
|
|
1510
2050
|
'.text-justify': { 'text-align': 'justify' },
|
|
2051
|
+
'.text-start': { 'text-align': 'start' },
|
|
2052
|
+
'.text-end': { 'text-align': 'end' },
|
|
1511
2053
|
})
|
|
1512
2054
|
},
|
|
1513
2055
|
|
|
@@ -1530,16 +2072,46 @@ export let corePlugins = {
|
|
|
1530
2072
|
matchUtilities({ align: (value) => ({ 'vertical-align': value }) })
|
|
1531
2073
|
},
|
|
1532
2074
|
|
|
1533
|
-
fontFamily:
|
|
1534
|
-
|
|
1535
|
-
|
|
2075
|
+
fontFamily: ({ matchUtilities, theme }) => {
|
|
2076
|
+
matchUtilities(
|
|
2077
|
+
{
|
|
2078
|
+
font: (value) => {
|
|
2079
|
+
let [families, options = {}] =
|
|
2080
|
+
Array.isArray(value) && isPlainObject(value[1]) ? value : [value]
|
|
2081
|
+
let { fontFeatureSettings, fontVariationSettings } = options
|
|
2082
|
+
|
|
2083
|
+
return {
|
|
2084
|
+
'font-family': Array.isArray(families) ? families.join(', ') : families,
|
|
2085
|
+
...(fontFeatureSettings === undefined
|
|
2086
|
+
? {}
|
|
2087
|
+
: { 'font-feature-settings': fontFeatureSettings }),
|
|
2088
|
+
...(fontVariationSettings === undefined
|
|
2089
|
+
? {}
|
|
2090
|
+
: { 'font-variation-settings': fontVariationSettings }),
|
|
2091
|
+
}
|
|
2092
|
+
},
|
|
2093
|
+
},
|
|
2094
|
+
{
|
|
2095
|
+
values: theme('fontFamily'),
|
|
2096
|
+
type: ['lookup', 'generic-name', 'family-name'],
|
|
2097
|
+
}
|
|
2098
|
+
)
|
|
2099
|
+
},
|
|
1536
2100
|
|
|
1537
2101
|
fontSize: ({ matchUtilities, theme }) => {
|
|
1538
2102
|
matchUtilities(
|
|
1539
2103
|
{
|
|
1540
|
-
text: (value) => {
|
|
2104
|
+
text: (value, { modifier }) => {
|
|
1541
2105
|
let [fontSize, options] = Array.isArray(value) ? value : [value]
|
|
1542
|
-
|
|
2106
|
+
|
|
2107
|
+
if (modifier) {
|
|
2108
|
+
return {
|
|
2109
|
+
'font-size': fontSize,
|
|
2110
|
+
'line-height': modifier,
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
let { lineHeight, letterSpacing, fontWeight } = isPlainObject(options)
|
|
1543
2115
|
? options
|
|
1544
2116
|
: { lineHeight: options }
|
|
1545
2117
|
|
|
@@ -1547,18 +2119,20 @@ export let corePlugins = {
|
|
|
1547
2119
|
'font-size': fontSize,
|
|
1548
2120
|
...(lineHeight === undefined ? {} : { 'line-height': lineHeight }),
|
|
1549
2121
|
...(letterSpacing === undefined ? {} : { 'letter-spacing': letterSpacing }),
|
|
2122
|
+
...(fontWeight === undefined ? {} : { 'font-weight': fontWeight }),
|
|
1550
2123
|
}
|
|
1551
2124
|
},
|
|
1552
2125
|
},
|
|
1553
2126
|
{
|
|
1554
2127
|
values: theme('fontSize'),
|
|
2128
|
+
modifiers: theme('lineHeight'),
|
|
1555
2129
|
type: ['absolute-size', 'relative-size', 'length', 'percentage'],
|
|
1556
2130
|
}
|
|
1557
2131
|
)
|
|
1558
2132
|
},
|
|
1559
2133
|
|
|
1560
2134
|
fontWeight: createUtilityPlugin('fontWeight', [['font', ['fontWeight']]], {
|
|
1561
|
-
type: ['lookup', 'number'],
|
|
2135
|
+
type: ['lookup', 'number', 'any'],
|
|
1562
2136
|
}),
|
|
1563
2137
|
|
|
1564
2138
|
textTransform: ({ addUtilities }) => {
|
|
@@ -1577,57 +2151,59 @@ export let corePlugins = {
|
|
|
1577
2151
|
})
|
|
1578
2152
|
},
|
|
1579
2153
|
|
|
1580
|
-
fontVariantNumeric: ({ addUtilities }) => {
|
|
2154
|
+
fontVariantNumeric: ({ addDefaults, addUtilities }) => {
|
|
2155
|
+
let cssFontVariantNumericValue =
|
|
2156
|
+
'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
|
|
2157
|
+
|
|
2158
|
+
addDefaults('font-variant-numeric', {
|
|
2159
|
+
'--tw-ordinal': ' ',
|
|
2160
|
+
'--tw-slashed-zero': ' ',
|
|
2161
|
+
'--tw-numeric-figure': ' ',
|
|
2162
|
+
'--tw-numeric-spacing': ' ',
|
|
2163
|
+
'--tw-numeric-fraction': ' ',
|
|
2164
|
+
})
|
|
2165
|
+
|
|
1581
2166
|
addUtilities({
|
|
1582
|
-
'@defaults font-variant-numeric': {
|
|
1583
|
-
'--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1584
|
-
'--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1585
|
-
'--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1586
|
-
'--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1587
|
-
'--tw-numeric-fraction': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1588
|
-
'--tw-font-variant-numeric':
|
|
1589
|
-
'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)',
|
|
1590
|
-
},
|
|
1591
2167
|
'.normal-nums': { 'font-variant-numeric': 'normal' },
|
|
1592
2168
|
'.ordinal': {
|
|
1593
2169
|
'@defaults font-variant-numeric': {},
|
|
1594
2170
|
'--tw-ordinal': 'ordinal',
|
|
1595
|
-
'font-variant-numeric':
|
|
2171
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1596
2172
|
},
|
|
1597
2173
|
'.slashed-zero': {
|
|
1598
2174
|
'@defaults font-variant-numeric': {},
|
|
1599
2175
|
'--tw-slashed-zero': 'slashed-zero',
|
|
1600
|
-
'font-variant-numeric':
|
|
2176
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1601
2177
|
},
|
|
1602
2178
|
'.lining-nums': {
|
|
1603
2179
|
'@defaults font-variant-numeric': {},
|
|
1604
2180
|
'--tw-numeric-figure': 'lining-nums',
|
|
1605
|
-
'font-variant-numeric':
|
|
2181
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1606
2182
|
},
|
|
1607
2183
|
'.oldstyle-nums': {
|
|
1608
2184
|
'@defaults font-variant-numeric': {},
|
|
1609
2185
|
'--tw-numeric-figure': 'oldstyle-nums',
|
|
1610
|
-
'font-variant-numeric':
|
|
2186
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1611
2187
|
},
|
|
1612
2188
|
'.proportional-nums': {
|
|
1613
2189
|
'@defaults font-variant-numeric': {},
|
|
1614
2190
|
'--tw-numeric-spacing': 'proportional-nums',
|
|
1615
|
-
'font-variant-numeric':
|
|
2191
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1616
2192
|
},
|
|
1617
2193
|
'.tabular-nums': {
|
|
1618
2194
|
'@defaults font-variant-numeric': {},
|
|
1619
2195
|
'--tw-numeric-spacing': 'tabular-nums',
|
|
1620
|
-
'font-variant-numeric':
|
|
2196
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1621
2197
|
},
|
|
1622
2198
|
'.diagonal-fractions': {
|
|
1623
2199
|
'@defaults font-variant-numeric': {},
|
|
1624
2200
|
'--tw-numeric-fraction': 'diagonal-fractions',
|
|
1625
|
-
'font-variant-numeric':
|
|
2201
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1626
2202
|
},
|
|
1627
2203
|
'.stacked-fractions': {
|
|
1628
2204
|
'@defaults font-variant-numeric': {},
|
|
1629
2205
|
'--tw-numeric-fraction': 'stacked-fractions',
|
|
1630
|
-
'font-variant-numeric':
|
|
2206
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1631
2207
|
},
|
|
1632
2208
|
})
|
|
1633
2209
|
},
|
|
@@ -1652,7 +2228,7 @@ export let corePlugins = {
|
|
|
1652
2228
|
})
|
|
1653
2229
|
},
|
|
1654
2230
|
},
|
|
1655
|
-
{ values: flattenColorPalette(theme('textColor')), type: 'color' }
|
|
2231
|
+
{ values: flattenColorPalette(theme('textColor')), type: ['color', 'any'] }
|
|
1656
2232
|
)
|
|
1657
2233
|
},
|
|
1658
2234
|
|
|
@@ -1660,10 +2236,10 @@ export let corePlugins = {
|
|
|
1660
2236
|
|
|
1661
2237
|
textDecoration: ({ addUtilities }) => {
|
|
1662
2238
|
addUtilities({
|
|
1663
|
-
'.underline': { 'text-decoration': 'underline' },
|
|
1664
|
-
'.overline': { 'text-decoration': 'overline' },
|
|
1665
|
-
'.line-through': { 'text-decoration': 'line-through' },
|
|
1666
|
-
'.no-underline': { 'text-decoration': 'none' },
|
|
2239
|
+
'.underline': { 'text-decoration-line': 'underline' },
|
|
2240
|
+
'.overline': { 'text-decoration-line': 'overline' },
|
|
2241
|
+
'.line-through': { 'text-decoration-line': 'line-through' },
|
|
2242
|
+
'.no-underline': { 'text-decoration-line': 'none' },
|
|
1667
2243
|
})
|
|
1668
2244
|
},
|
|
1669
2245
|
|
|
@@ -1674,7 +2250,7 @@ export let corePlugins = {
|
|
|
1674
2250
|
return { 'text-decoration-color': toColorValue(value) }
|
|
1675
2251
|
},
|
|
1676
2252
|
},
|
|
1677
|
-
{ values: flattenColorPalette(theme('textDecorationColor')), type: ['color'] }
|
|
2253
|
+
{ values: flattenColorPalette(theme('textDecorationColor')), type: ['color', 'any'] }
|
|
1678
2254
|
)
|
|
1679
2255
|
},
|
|
1680
2256
|
|
|
@@ -1697,7 +2273,7 @@ export let corePlugins = {
|
|
|
1697
2273
|
textUnderlineOffset: createUtilityPlugin(
|
|
1698
2274
|
'textUnderlineOffset',
|
|
1699
2275
|
[['underline-offset', ['text-underline-offset']]],
|
|
1700
|
-
{ type: ['length', 'percentage'] }
|
|
2276
|
+
{ type: ['length', 'percentage', 'any'] }
|
|
1701
2277
|
),
|
|
1702
2278
|
|
|
1703
2279
|
fontSmoothing: ({ addUtilities }) => {
|
|
@@ -1812,6 +2388,8 @@ export let corePlugins = {
|
|
|
1812
2388
|
'.mix-blend-saturation': { 'mix-blend-mode': 'saturation' },
|
|
1813
2389
|
'.mix-blend-color': { 'mix-blend-mode': 'color' },
|
|
1814
2390
|
'.mix-blend-luminosity': { 'mix-blend-mode': 'luminosity' },
|
|
2391
|
+
'.mix-blend-plus-darker': { 'mix-blend-mode': 'plus-darker' },
|
|
2392
|
+
'.mix-blend-plus-lighter': { 'mix-blend-mode': 'plus-lighter' },
|
|
1815
2393
|
})
|
|
1816
2394
|
},
|
|
1817
2395
|
|
|
@@ -1823,14 +2401,12 @@ export let corePlugins = {
|
|
|
1823
2401
|
`var(--tw-shadow)`,
|
|
1824
2402
|
].join(', ')
|
|
1825
2403
|
|
|
1826
|
-
return function ({ matchUtilities,
|
|
1827
|
-
|
|
1828
|
-
'
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
'--tw-shadow-colored': '0 0 #0000',
|
|
1833
|
-
},
|
|
2404
|
+
return function ({ matchUtilities, addDefaults, theme }) {
|
|
2405
|
+
addDefaults('box-shadow', {
|
|
2406
|
+
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
2407
|
+
'--tw-ring-shadow': '0 0 #0000',
|
|
2408
|
+
'--tw-shadow': '0 0 #0000',
|
|
2409
|
+
'--tw-shadow-colored': '0 0 #0000',
|
|
1834
2410
|
})
|
|
1835
2411
|
|
|
1836
2412
|
matchUtilities(
|
|
@@ -1871,7 +2447,7 @@ export let corePlugins = {
|
|
|
1871
2447
|
}
|
|
1872
2448
|
},
|
|
1873
2449
|
},
|
|
1874
|
-
{ values: flattenColorPalette(theme('boxShadowColor')), type: ['color'] }
|
|
2450
|
+
{ values: flattenColorPalette(theme('boxShadowColor')), type: ['color', 'any'] }
|
|
1875
2451
|
)
|
|
1876
2452
|
},
|
|
1877
2453
|
|
|
@@ -1885,7 +2461,6 @@ export let corePlugins = {
|
|
|
1885
2461
|
'.outline-dashed': { 'outline-style': 'dashed' },
|
|
1886
2462
|
'.outline-dotted': { 'outline-style': 'dotted' },
|
|
1887
2463
|
'.outline-double': { 'outline-style': 'double' },
|
|
1888
|
-
'.outline-hidden': { 'outline-style': 'hidden' },
|
|
1889
2464
|
})
|
|
1890
2465
|
},
|
|
1891
2466
|
|
|
@@ -1894,7 +2469,8 @@ export let corePlugins = {
|
|
|
1894
2469
|
}),
|
|
1895
2470
|
|
|
1896
2471
|
outlineOffset: createUtilityPlugin('outlineOffset', [['outline-offset', ['outline-offset']]], {
|
|
1897
|
-
type: ['length', 'number', 'percentage'],
|
|
2472
|
+
type: ['length', 'number', 'percentage', 'any'],
|
|
2473
|
+
supportsNegativeValues: true,
|
|
1898
2474
|
}),
|
|
1899
2475
|
|
|
1900
2476
|
outlineColor: ({ matchUtilities, theme }) => {
|
|
@@ -1904,29 +2480,38 @@ export let corePlugins = {
|
|
|
1904
2480
|
return { 'outline-color': toColorValue(value) }
|
|
1905
2481
|
},
|
|
1906
2482
|
},
|
|
1907
|
-
{ values: flattenColorPalette(theme('outlineColor')), type: ['color'] }
|
|
2483
|
+
{ values: flattenColorPalette(theme('outlineColor')), type: ['color', 'any'] }
|
|
1908
2484
|
)
|
|
1909
2485
|
},
|
|
1910
2486
|
|
|
1911
|
-
ringWidth: ({ matchUtilities,
|
|
1912
|
-
let
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
`rgb(147 197 253 / ${ringOpacityDefault})`
|
|
1917
|
-
)
|
|
2487
|
+
ringWidth: ({ matchUtilities, addDefaults, addUtilities, theme, config }) => {
|
|
2488
|
+
let ringColorDefault = (() => {
|
|
2489
|
+
if (flagEnabled(config(), 'respectDefaultRingColorOpacity')) {
|
|
2490
|
+
return theme('ringColor.DEFAULT')
|
|
2491
|
+
}
|
|
1918
2492
|
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
'
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
2493
|
+
let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5')
|
|
2494
|
+
|
|
2495
|
+
if (!theme('ringColor')?.DEFAULT) {
|
|
2496
|
+
return `rgb(147 197 253 / ${ringOpacityDefault})`
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2499
|
+
return withAlphaValue(
|
|
2500
|
+
theme('ringColor')?.DEFAULT,
|
|
2501
|
+
ringOpacityDefault,
|
|
2502
|
+
`rgb(147 197 253 / ${ringOpacityDefault})`
|
|
2503
|
+
)
|
|
2504
|
+
})()
|
|
2505
|
+
|
|
2506
|
+
addDefaults('ring-width', {
|
|
2507
|
+
'--tw-ring-inset': ' ',
|
|
2508
|
+
'--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
|
|
2509
|
+
'--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
|
|
2510
|
+
'--tw-ring-color': ringColorDefault,
|
|
2511
|
+
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
2512
|
+
'--tw-ring-shadow': '0 0 #0000',
|
|
2513
|
+
'--tw-shadow': '0 0 #0000',
|
|
2514
|
+
'--tw-shadow-colored': '0 0 #0000',
|
|
1930
2515
|
})
|
|
1931
2516
|
|
|
1932
2517
|
matchUtilities(
|
|
@@ -1952,10 +2537,16 @@ export let corePlugins = {
|
|
|
1952
2537
|
})
|
|
1953
2538
|
},
|
|
1954
2539
|
|
|
1955
|
-
ringColor: ({ matchUtilities, theme }) => {
|
|
2540
|
+
ringColor: ({ matchUtilities, theme, corePlugins }) => {
|
|
1956
2541
|
matchUtilities(
|
|
1957
2542
|
{
|
|
1958
2543
|
ring: (value) => {
|
|
2544
|
+
if (!corePlugins('ringOpacity')) {
|
|
2545
|
+
return {
|
|
2546
|
+
'--tw-ring-color': toColorValue(value),
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
|
|
1959
2550
|
return withAlphaVariable({
|
|
1960
2551
|
color: value,
|
|
1961
2552
|
property: '--tw-ring-color',
|
|
@@ -1969,14 +2560,18 @@ export let corePlugins = {
|
|
|
1969
2560
|
([modifier]) => modifier !== 'DEFAULT'
|
|
1970
2561
|
)
|
|
1971
2562
|
),
|
|
1972
|
-
type: 'color',
|
|
2563
|
+
type: ['color', 'any'],
|
|
1973
2564
|
}
|
|
1974
2565
|
)
|
|
1975
2566
|
},
|
|
1976
2567
|
|
|
1977
|
-
ringOpacity:
|
|
1978
|
-
|
|
1979
|
-
|
|
2568
|
+
ringOpacity: (helpers) => {
|
|
2569
|
+
let { config } = helpers
|
|
2570
|
+
|
|
2571
|
+
return createUtilityPlugin('ringOpacity', [['ring-opacity', ['--tw-ring-opacity']]], {
|
|
2572
|
+
filterDefault: !flagEnabled(config(), 'respectDefaultRingColorOpacity'),
|
|
2573
|
+
})(helpers)
|
|
2574
|
+
},
|
|
1980
2575
|
ringOffsetWidth: createUtilityPlugin(
|
|
1981
2576
|
'ringOffsetWidth',
|
|
1982
2577
|
[['ring-offset', ['--tw-ring-offset-width']]],
|
|
@@ -1992,7 +2587,7 @@ export let corePlugins = {
|
|
|
1992
2587
|
}
|
|
1993
2588
|
},
|
|
1994
2589
|
},
|
|
1995
|
-
{ values: flattenColorPalette(theme('ringOffsetColor')), type: 'color' }
|
|
2590
|
+
{ values: flattenColorPalette(theme('ringOffsetColor')), type: ['color', 'any'] }
|
|
1996
2591
|
)
|
|
1997
2592
|
},
|
|
1998
2593
|
|
|
@@ -2001,9 +2596,9 @@ export let corePlugins = {
|
|
|
2001
2596
|
{
|
|
2002
2597
|
blur: (value) => {
|
|
2003
2598
|
return {
|
|
2004
|
-
'--tw-blur': `blur(${value})`,
|
|
2599
|
+
'--tw-blur': value.trim() === '' ? ' ' : `blur(${value})`,
|
|
2005
2600
|
'@defaults filter': {},
|
|
2006
|
-
filter:
|
|
2601
|
+
filter: cssFilterValue,
|
|
2007
2602
|
}
|
|
2008
2603
|
},
|
|
2009
2604
|
},
|
|
@@ -2018,7 +2613,7 @@ export let corePlugins = {
|
|
|
2018
2613
|
return {
|
|
2019
2614
|
'--tw-brightness': `brightness(${value})`,
|
|
2020
2615
|
'@defaults filter': {},
|
|
2021
|
-
filter:
|
|
2616
|
+
filter: cssFilterValue,
|
|
2022
2617
|
}
|
|
2023
2618
|
},
|
|
2024
2619
|
},
|
|
@@ -2033,7 +2628,7 @@ export let corePlugins = {
|
|
|
2033
2628
|
return {
|
|
2034
2629
|
'--tw-contrast': `contrast(${value})`,
|
|
2035
2630
|
'@defaults filter': {},
|
|
2036
|
-
filter:
|
|
2631
|
+
filter: cssFilterValue,
|
|
2037
2632
|
}
|
|
2038
2633
|
},
|
|
2039
2634
|
},
|
|
@@ -2050,7 +2645,7 @@ export let corePlugins = {
|
|
|
2050
2645
|
? value.map((v) => `drop-shadow(${v})`).join(' ')
|
|
2051
2646
|
: `drop-shadow(${value})`,
|
|
2052
2647
|
'@defaults filter': {},
|
|
2053
|
-
filter:
|
|
2648
|
+
filter: cssFilterValue,
|
|
2054
2649
|
}
|
|
2055
2650
|
},
|
|
2056
2651
|
},
|
|
@@ -2065,7 +2660,7 @@ export let corePlugins = {
|
|
|
2065
2660
|
return {
|
|
2066
2661
|
'--tw-grayscale': `grayscale(${value})`,
|
|
2067
2662
|
'@defaults filter': {},
|
|
2068
|
-
filter:
|
|
2663
|
+
filter: cssFilterValue,
|
|
2069
2664
|
}
|
|
2070
2665
|
},
|
|
2071
2666
|
},
|
|
@@ -2080,7 +2675,7 @@ export let corePlugins = {
|
|
|
2080
2675
|
return {
|
|
2081
2676
|
'--tw-hue-rotate': `hue-rotate(${value})`,
|
|
2082
2677
|
'@defaults filter': {},
|
|
2083
|
-
filter:
|
|
2678
|
+
filter: cssFilterValue,
|
|
2084
2679
|
}
|
|
2085
2680
|
},
|
|
2086
2681
|
},
|
|
@@ -2095,7 +2690,7 @@ export let corePlugins = {
|
|
|
2095
2690
|
return {
|
|
2096
2691
|
'--tw-invert': `invert(${value})`,
|
|
2097
2692
|
'@defaults filter': {},
|
|
2098
|
-
filter:
|
|
2693
|
+
filter: cssFilterValue,
|
|
2099
2694
|
}
|
|
2100
2695
|
},
|
|
2101
2696
|
},
|
|
@@ -2110,7 +2705,7 @@ export let corePlugins = {
|
|
|
2110
2705
|
return {
|
|
2111
2706
|
'--tw-saturate': `saturate(${value})`,
|
|
2112
2707
|
'@defaults filter': {},
|
|
2113
|
-
filter:
|
|
2708
|
+
filter: cssFilterValue,
|
|
2114
2709
|
}
|
|
2115
2710
|
},
|
|
2116
2711
|
},
|
|
@@ -2125,7 +2720,7 @@ export let corePlugins = {
|
|
|
2125
2720
|
return {
|
|
2126
2721
|
'--tw-sepia': `sepia(${value})`,
|
|
2127
2722
|
'@defaults filter': {},
|
|
2128
|
-
filter:
|
|
2723
|
+
filter: cssFilterValue,
|
|
2129
2724
|
}
|
|
2130
2725
|
},
|
|
2131
2726
|
},
|
|
@@ -2133,33 +2728,20 @@ export let corePlugins = {
|
|
|
2133
2728
|
)
|
|
2134
2729
|
},
|
|
2135
2730
|
|
|
2136
|
-
filter: ({
|
|
2137
|
-
|
|
2138
|
-
'
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
'var(--tw-brightness)',
|
|
2151
|
-
'var(--tw-contrast)',
|
|
2152
|
-
'var(--tw-grayscale)',
|
|
2153
|
-
'var(--tw-hue-rotate)',
|
|
2154
|
-
'var(--tw-invert)',
|
|
2155
|
-
'var(--tw-saturate)',
|
|
2156
|
-
'var(--tw-sepia)',
|
|
2157
|
-
'var(--tw-drop-shadow)',
|
|
2158
|
-
].join(' '),
|
|
2159
|
-
},
|
|
2160
|
-
})
|
|
2161
|
-
addUtilities({
|
|
2162
|
-
'.filter': { '@defaults filter': {}, filter: 'var(--tw-filter)' },
|
|
2731
|
+
filter: ({ addDefaults, addUtilities }) => {
|
|
2732
|
+
addDefaults('filter', {
|
|
2733
|
+
'--tw-blur': ' ',
|
|
2734
|
+
'--tw-brightness': ' ',
|
|
2735
|
+
'--tw-contrast': ' ',
|
|
2736
|
+
'--tw-grayscale': ' ',
|
|
2737
|
+
'--tw-hue-rotate': ' ',
|
|
2738
|
+
'--tw-invert': ' ',
|
|
2739
|
+
'--tw-saturate': ' ',
|
|
2740
|
+
'--tw-sepia': ' ',
|
|
2741
|
+
'--tw-drop-shadow': ' ',
|
|
2742
|
+
})
|
|
2743
|
+
addUtilities({
|
|
2744
|
+
'.filter': { '@defaults filter': {}, filter: cssFilterValue },
|
|
2163
2745
|
'.filter-none': { filter: 'none' },
|
|
2164
2746
|
})
|
|
2165
2747
|
},
|
|
@@ -2169,9 +2751,9 @@ export let corePlugins = {
|
|
|
2169
2751
|
{
|
|
2170
2752
|
'backdrop-blur': (value) => {
|
|
2171
2753
|
return {
|
|
2172
|
-
'--tw-backdrop-blur': `blur(${value})`,
|
|
2754
|
+
'--tw-backdrop-blur': value.trim() === '' ? ' ' : `blur(${value})`,
|
|
2173
2755
|
'@defaults backdrop-filter': {},
|
|
2174
|
-
'backdrop-filter':
|
|
2756
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2175
2757
|
}
|
|
2176
2758
|
},
|
|
2177
2759
|
},
|
|
@@ -2186,7 +2768,7 @@ export let corePlugins = {
|
|
|
2186
2768
|
return {
|
|
2187
2769
|
'--tw-backdrop-brightness': `brightness(${value})`,
|
|
2188
2770
|
'@defaults backdrop-filter': {},
|
|
2189
|
-
'backdrop-filter':
|
|
2771
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2190
2772
|
}
|
|
2191
2773
|
},
|
|
2192
2774
|
},
|
|
@@ -2201,7 +2783,7 @@ export let corePlugins = {
|
|
|
2201
2783
|
return {
|
|
2202
2784
|
'--tw-backdrop-contrast': `contrast(${value})`,
|
|
2203
2785
|
'@defaults backdrop-filter': {},
|
|
2204
|
-
'backdrop-filter':
|
|
2786
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2205
2787
|
}
|
|
2206
2788
|
},
|
|
2207
2789
|
},
|
|
@@ -2216,7 +2798,7 @@ export let corePlugins = {
|
|
|
2216
2798
|
return {
|
|
2217
2799
|
'--tw-backdrop-grayscale': `grayscale(${value})`,
|
|
2218
2800
|
'@defaults backdrop-filter': {},
|
|
2219
|
-
'backdrop-filter':
|
|
2801
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2220
2802
|
}
|
|
2221
2803
|
},
|
|
2222
2804
|
},
|
|
@@ -2231,7 +2813,7 @@ export let corePlugins = {
|
|
|
2231
2813
|
return {
|
|
2232
2814
|
'--tw-backdrop-hue-rotate': `hue-rotate(${value})`,
|
|
2233
2815
|
'@defaults backdrop-filter': {},
|
|
2234
|
-
'backdrop-filter':
|
|
2816
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2235
2817
|
}
|
|
2236
2818
|
},
|
|
2237
2819
|
},
|
|
@@ -2246,7 +2828,7 @@ export let corePlugins = {
|
|
|
2246
2828
|
return {
|
|
2247
2829
|
'--tw-backdrop-invert': `invert(${value})`,
|
|
2248
2830
|
'@defaults backdrop-filter': {},
|
|
2249
|
-
'backdrop-filter':
|
|
2831
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2250
2832
|
}
|
|
2251
2833
|
},
|
|
2252
2834
|
},
|
|
@@ -2261,7 +2843,7 @@ export let corePlugins = {
|
|
|
2261
2843
|
return {
|
|
2262
2844
|
'--tw-backdrop-opacity': `opacity(${value})`,
|
|
2263
2845
|
'@defaults backdrop-filter': {},
|
|
2264
|
-
'backdrop-filter':
|
|
2846
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2265
2847
|
}
|
|
2266
2848
|
},
|
|
2267
2849
|
},
|
|
@@ -2276,7 +2858,7 @@ export let corePlugins = {
|
|
|
2276
2858
|
return {
|
|
2277
2859
|
'--tw-backdrop-saturate': `saturate(${value})`,
|
|
2278
2860
|
'@defaults backdrop-filter': {},
|
|
2279
|
-
'backdrop-filter':
|
|
2861
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2280
2862
|
}
|
|
2281
2863
|
},
|
|
2282
2864
|
},
|
|
@@ -2291,7 +2873,7 @@ export let corePlugins = {
|
|
|
2291
2873
|
return {
|
|
2292
2874
|
'--tw-backdrop-sepia': `sepia(${value})`,
|
|
2293
2875
|
'@defaults backdrop-filter': {},
|
|
2294
|
-
'backdrop-filter':
|
|
2876
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2295
2877
|
}
|
|
2296
2878
|
},
|
|
2297
2879
|
},
|
|
@@ -2299,35 +2881,22 @@ export let corePlugins = {
|
|
|
2299
2881
|
)
|
|
2300
2882
|
},
|
|
2301
2883
|
|
|
2302
|
-
backdropFilter: ({
|
|
2303
|
-
|
|
2304
|
-
'
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
'--tw-backdrop-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2314
|
-
'--tw-backdrop-filter': [
|
|
2315
|
-
'var(--tw-backdrop-blur)',
|
|
2316
|
-
'var(--tw-backdrop-brightness)',
|
|
2317
|
-
'var(--tw-backdrop-contrast)',
|
|
2318
|
-
'var(--tw-backdrop-grayscale)',
|
|
2319
|
-
'var(--tw-backdrop-hue-rotate)',
|
|
2320
|
-
'var(--tw-backdrop-invert)',
|
|
2321
|
-
'var(--tw-backdrop-opacity)',
|
|
2322
|
-
'var(--tw-backdrop-saturate)',
|
|
2323
|
-
'var(--tw-backdrop-sepia)',
|
|
2324
|
-
].join(' '),
|
|
2325
|
-
},
|
|
2884
|
+
backdropFilter: ({ addDefaults, addUtilities }) => {
|
|
2885
|
+
addDefaults('backdrop-filter', {
|
|
2886
|
+
'--tw-backdrop-blur': ' ',
|
|
2887
|
+
'--tw-backdrop-brightness': ' ',
|
|
2888
|
+
'--tw-backdrop-contrast': ' ',
|
|
2889
|
+
'--tw-backdrop-grayscale': ' ',
|
|
2890
|
+
'--tw-backdrop-hue-rotate': ' ',
|
|
2891
|
+
'--tw-backdrop-invert': ' ',
|
|
2892
|
+
'--tw-backdrop-opacity': ' ',
|
|
2893
|
+
'--tw-backdrop-saturate': ' ',
|
|
2894
|
+
'--tw-backdrop-sepia': ' ',
|
|
2326
2895
|
})
|
|
2327
2896
|
addUtilities({
|
|
2328
2897
|
'.backdrop-filter': {
|
|
2329
2898
|
'@defaults backdrop-filter': {},
|
|
2330
|
-
'backdrop-filter':
|
|
2899
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2331
2900
|
},
|
|
2332
2901
|
'.backdrop-filter-none': { 'backdrop-filter': 'none' },
|
|
2333
2902
|
})
|
|
@@ -2367,7 +2936,55 @@ export let corePlugins = {
|
|
|
2367
2936
|
{ filterDefault: true }
|
|
2368
2937
|
),
|
|
2369
2938
|
willChange: createUtilityPlugin('willChange', [['will-change', ['will-change']]]),
|
|
2939
|
+
contain: ({ addDefaults, addUtilities }) => {
|
|
2940
|
+
let cssContainValue =
|
|
2941
|
+
'var(--tw-contain-size) var(--tw-contain-layout) var(--tw-contain-paint) var(--tw-contain-style)'
|
|
2942
|
+
|
|
2943
|
+
addDefaults('contain', {
|
|
2944
|
+
'--tw-contain-size': ' ',
|
|
2945
|
+
'--tw-contain-layout': ' ',
|
|
2946
|
+
'--tw-contain-paint': ' ',
|
|
2947
|
+
'--tw-contain-style': ' ',
|
|
2948
|
+
})
|
|
2949
|
+
|
|
2950
|
+
addUtilities({
|
|
2951
|
+
'.contain-none': { contain: 'none' },
|
|
2952
|
+
'.contain-content': { contain: 'content' },
|
|
2953
|
+
'.contain-strict': { contain: 'strict' },
|
|
2954
|
+
'.contain-size': {
|
|
2955
|
+
'@defaults contain': {},
|
|
2956
|
+
'--tw-contain-size': 'size',
|
|
2957
|
+
contain: cssContainValue,
|
|
2958
|
+
},
|
|
2959
|
+
'.contain-inline-size': {
|
|
2960
|
+
'@defaults contain': {},
|
|
2961
|
+
'--tw-contain-size': 'inline-size',
|
|
2962
|
+
contain: cssContainValue,
|
|
2963
|
+
},
|
|
2964
|
+
'.contain-layout': {
|
|
2965
|
+
'@defaults contain': {},
|
|
2966
|
+
'--tw-contain-layout': 'layout',
|
|
2967
|
+
contain: cssContainValue,
|
|
2968
|
+
},
|
|
2969
|
+
'.contain-paint': {
|
|
2970
|
+
'@defaults contain': {},
|
|
2971
|
+
'--tw-contain-paint': 'paint',
|
|
2972
|
+
contain: cssContainValue,
|
|
2973
|
+
},
|
|
2974
|
+
'.contain-style': {
|
|
2975
|
+
'@defaults contain': {},
|
|
2976
|
+
'--tw-contain-style': 'style',
|
|
2977
|
+
contain: cssContainValue,
|
|
2978
|
+
},
|
|
2979
|
+
})
|
|
2980
|
+
},
|
|
2370
2981
|
content: createUtilityPlugin('content', [
|
|
2371
2982
|
['content', ['--tw-content', ['content', 'var(--tw-content)']]],
|
|
2372
2983
|
]),
|
|
2984
|
+
forcedColorAdjust: ({ addUtilities }) => {
|
|
2985
|
+
addUtilities({
|
|
2986
|
+
'.forced-color-adjust-auto': { 'forced-color-adjust': 'auto' },
|
|
2987
|
+
'.forced-color-adjust-none': { 'forced-color-adjust': 'none' },
|
|
2988
|
+
})
|
|
2989
|
+
},
|
|
2373
2990
|
}
|