tailwindcss 0.0.0-insiders.d2b53cd → 0.0.0-insiders.d2fdf9e
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 +364 -2
- package/LICENSE +1 -2
- package/README.md +8 -4
- package/colors.d.ts +3 -0
- package/colors.js +2 -1
- package/defaultConfig.d.ts +3 -0
- package/defaultConfig.js +2 -1
- package/defaultTheme.d.ts +3 -0
- package/defaultTheme.js +2 -1
- package/lib/cli-peer-dependencies.js +10 -5
- package/lib/cli.js +306 -203
- package/lib/constants.js +9 -9
- package/lib/corePluginList.js +10 -1
- package/lib/corePlugins.js +1835 -1760
- package/lib/css/preflight.css +19 -13
- package/lib/featureFlags.js +18 -15
- package/lib/index.js +17 -8
- package/lib/lib/cacheInvalidation.js +69 -0
- package/lib/lib/collapseAdjacentRules.js +30 -14
- package/lib/lib/collapseDuplicateDeclarations.js +80 -0
- package/lib/lib/defaultExtractor.js +187 -0
- package/lib/lib/detectNesting.js +17 -2
- package/lib/lib/evaluateTailwindFunctions.js +40 -24
- package/lib/lib/expandApplyAtRules.js +414 -157
- package/lib/lib/expandTailwindAtRules.js +145 -126
- package/lib/lib/generateRules.js +403 -103
- package/lib/lib/getModuleDependencies.js +14 -14
- package/lib/lib/normalizeTailwindDirectives.js +43 -35
- package/lib/lib/partitionApplyAtRules.js +53 -0
- package/lib/lib/regex.js +53 -0
- package/lib/lib/resolveDefaultsAtRules.js +83 -65
- package/lib/lib/setupContextUtils.js +315 -204
- package/lib/lib/setupTrackingContext.js +60 -56
- package/lib/lib/sharedState.js +38 -5
- package/lib/lib/substituteScreenAtRules.js +9 -6
- package/{nesting → lib/postcss-plugins/nesting}/README.md +2 -2
- package/lib/postcss-plugins/nesting/index.js +17 -0
- package/lib/postcss-plugins/nesting/plugin.js +85 -0
- package/lib/processTailwindFeatures.js +19 -9
- package/lib/public/colors.js +241 -241
- package/lib/public/resolve-config.js +5 -5
- package/lib/util/buildMediaQuery.js +13 -24
- package/lib/util/cloneDeep.js +1 -1
- package/lib/util/cloneNodes.js +12 -1
- package/lib/util/color.js +43 -32
- package/lib/util/createPlugin.js +1 -2
- package/lib/util/createUtilityPlugin.js +11 -15
- package/lib/util/dataTypes.js +114 -74
- package/lib/util/defaults.js +6 -0
- package/lib/util/escapeClassName.js +5 -5
- package/lib/util/escapeCommas.js +1 -1
- package/lib/util/flattenColorPalette.js +2 -4
- package/lib/util/formatVariantSelector.js +194 -0
- package/lib/util/getAllConfigs.js +13 -5
- package/lib/util/hashConfig.js +5 -5
- package/lib/util/isKeyframeRule.js +1 -1
- package/lib/util/isPlainObject.js +1 -1
- package/lib/util/isValidArbitraryValue.js +64 -0
- package/lib/util/log.js +11 -7
- package/lib/util/nameClass.js +7 -6
- package/lib/util/negateValue.js +4 -4
- package/lib/util/normalizeConfig.js +84 -45
- package/lib/util/normalizeScreens.js +59 -0
- package/lib/util/parseAnimationValue.js +56 -56
- package/lib/util/parseBoxShadowValue.js +76 -0
- package/lib/util/parseDependency.js +32 -32
- package/lib/util/parseObjectStyles.js +6 -6
- package/lib/util/pluginUtils.js +34 -165
- package/lib/util/prefixSelector.js +4 -7
- package/lib/util/resolveConfig.js +115 -66
- package/lib/util/resolveConfigPath.js +17 -18
- package/lib/util/responsive.js +6 -6
- package/lib/util/splitAtTopLevelOnly.js +72 -0
- package/lib/util/toColorValue.js +1 -2
- package/lib/util/toPath.js +6 -1
- package/lib/util/transformThemeValue.js +42 -34
- package/lib/util/validateConfig.js +21 -0
- package/lib/util/withAlphaVariable.js +19 -19
- package/nesting/index.js +2 -12
- package/package.json +39 -40
- package/peers/index.js +11511 -10819
- package/plugin.d.ts +11 -0
- package/plugin.js +2 -1
- package/resolveConfig.js +2 -1
- package/scripts/generate-types.js +52 -0
- package/src/cli-peer-dependencies.js +7 -1
- package/src/cli.js +164 -30
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +540 -535
- package/src/css/preflight.css +19 -13
- package/src/featureFlags.js +5 -5
- package/src/index.js +14 -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/defaultExtractor.js +192 -0
- package/src/lib/detectNesting.js +22 -3
- package/src/lib/evaluateTailwindFunctions.js +24 -7
- package/src/lib/expandApplyAtRules.js +442 -154
- package/src/lib/expandTailwindAtRules.js +79 -37
- package/src/lib/generateRules.js +400 -83
- package/src/lib/normalizeTailwindDirectives.js +7 -1
- package/src/lib/partitionApplyAtRules.js +52 -0
- package/src/lib/regex.js +74 -0
- package/src/lib/resolveDefaultsAtRules.js +35 -10
- package/src/lib/setupContextUtils.js +273 -112
- package/src/lib/setupTrackingContext.js +12 -7
- package/src/lib/sharedState.js +42 -4
- 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 +14 -2
- package/src/util/buildMediaQuery.js +14 -18
- package/src/util/cloneNodes.js +14 -1
- package/src/util/color.js +31 -14
- package/src/util/dataTypes.js +56 -16
- package/src/util/defaults.js +6 -0
- package/src/util/formatVariantSelector.js +213 -0
- package/src/util/getAllConfigs.js +7 -0
- package/src/util/isValidArbitraryValue.js +61 -0
- package/src/util/log.js +10 -6
- package/src/util/nameClass.js +1 -1
- package/src/util/normalizeConfig.js +32 -3
- package/src/util/normalizeScreens.js +45 -0
- package/src/util/parseBoxShadowValue.js +72 -0
- package/src/util/pluginUtils.js +15 -138
- package/src/util/prefixSelector.js +7 -8
- package/src/util/resolveConfig.js +97 -15
- package/src/util/splitAtTopLevelOnly.js +71 -0
- package/src/util/toPath.js +23 -1
- package/src/util/transformThemeValue.js +24 -7
- package/src/util/validateConfig.js +13 -0
- package/stubs/defaultConfig.stub.js +47 -17
- package/types/config.d.ts +325 -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/index.d.ts +1 -0
- package/types.d.ts +1 -0
- package/lib/lib/setupWatchingContext.js +0 -284
- package/nesting/plugin.js +0 -41
- package/src/lib/setupWatchingContext.js +0 -304
package/src/corePlugins.js
CHANGED
|
@@ -3,144 +3,101 @@ 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
|
|
6
|
+
import escapeClassName from './util/escapeClassName'
|
|
7
7
|
import parseAnimationValue from './util/parseAnimationValue'
|
|
8
8
|
import flattenColorPalette from './util/flattenColorPalette'
|
|
9
9
|
import withAlphaVariable, { withAlphaValue } from './util/withAlphaVariable'
|
|
10
10
|
import toColorValue from './util/toColorValue'
|
|
11
11
|
import isPlainObject from './util/isPlainObject'
|
|
12
12
|
import transformThemeValue from './util/transformThemeValue'
|
|
13
|
-
import {
|
|
14
|
-
applyStateToMarker,
|
|
15
|
-
updateLastClasses,
|
|
16
|
-
updateAllClasses,
|
|
17
|
-
transformAllSelectors,
|
|
18
|
-
transformAllClasses,
|
|
19
|
-
transformLastClasses,
|
|
20
|
-
} from './util/pluginUtils'
|
|
21
13
|
import { version as tailwindVersion } from '../package.json'
|
|
22
14
|
import log from './util/log'
|
|
15
|
+
import { normalizeScreens } from './util/normalizeScreens'
|
|
16
|
+
import { formatBoxShadowValue, parseBoxShadowValue } from './util/parseBoxShadowValue'
|
|
17
|
+
import { flagEnabled } from './featureFlags'
|
|
23
18
|
|
|
24
19
|
export let variantPlugins = {
|
|
25
|
-
pseudoElementVariants: ({
|
|
26
|
-
addVariant(
|
|
27
|
-
|
|
28
|
-
transformAllSelectors((selector) => {
|
|
29
|
-
return updateAllClasses(selector, (className, { withPseudo }) => {
|
|
30
|
-
return withPseudo(`first-letter${config('separator')}${className}`, '::first-letter')
|
|
31
|
-
})
|
|
32
|
-
})
|
|
33
|
-
)
|
|
20
|
+
pseudoElementVariants: ({ addVariant }) => {
|
|
21
|
+
addVariant('first-letter', '&::first-letter')
|
|
22
|
+
addVariant('first-line', '&::first-line')
|
|
34
23
|
|
|
35
|
-
addVariant(
|
|
36
|
-
|
|
37
|
-
transformAllSelectors((selector) => {
|
|
38
|
-
return updateAllClasses(selector, (className, { withPseudo }) => {
|
|
39
|
-
return withPseudo(`first-line${config('separator')}${className}`, '::first-line')
|
|
40
|
-
})
|
|
41
|
-
})
|
|
42
|
-
)
|
|
24
|
+
addVariant('marker', ['& *::marker', '&::marker'])
|
|
25
|
+
addVariant('selection', ['& *::selection', '&::selection'])
|
|
43
26
|
|
|
44
|
-
addVariant('
|
|
45
|
-
transformAllSelectors((selector) => {
|
|
46
|
-
let variantSelector = updateAllClasses(selector, (className) => {
|
|
47
|
-
return `marker${config('separator')}${className}`
|
|
48
|
-
})
|
|
27
|
+
addVariant('file', '&::file-selector-button')
|
|
49
28
|
|
|
50
|
-
|
|
51
|
-
}),
|
|
52
|
-
transformAllSelectors((selector) => {
|
|
53
|
-
return updateAllClasses(selector, (className, { withPseudo }) => {
|
|
54
|
-
return withPseudo(`marker${config('separator')}${className}`, '::marker')
|
|
55
|
-
})
|
|
56
|
-
}),
|
|
57
|
-
])
|
|
29
|
+
addVariant('placeholder', '&::placeholder')
|
|
58
30
|
|
|
59
|
-
addVariant('
|
|
60
|
-
transformAllSelectors((selector) => {
|
|
61
|
-
let variantSelector = updateAllClasses(selector, (className) => {
|
|
62
|
-
return `selection${config('separator')}${className}`
|
|
63
|
-
})
|
|
31
|
+
addVariant('backdrop', '&::backdrop')
|
|
64
32
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
33
|
+
addVariant('before', ({ container }) => {
|
|
34
|
+
container.walkRules((rule) => {
|
|
35
|
+
let foundContent = false
|
|
36
|
+
rule.walkDecls('content', () => {
|
|
37
|
+
foundContent = true
|
|
70
38
|
})
|
|
71
|
-
}),
|
|
72
|
-
])
|
|
73
39
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return updateAllClasses(selector, (className, { withPseudo }) => {
|
|
78
|
-
return withPseudo(`file${config('separator')}${className}`, '::file-selector-button')
|
|
79
|
-
})
|
|
40
|
+
if (!foundContent) {
|
|
41
|
+
rule.prepend(postcss.decl({ prop: 'content', value: 'var(--tw-content)' }))
|
|
42
|
+
}
|
|
80
43
|
})
|
|
81
|
-
)
|
|
82
44
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
transformAllSelectors(
|
|
86
|
-
(selector) => {
|
|
87
|
-
return updateAllClasses(selector, (className, { withPseudo }) => {
|
|
88
|
-
return withPseudo(`before${config('separator')}${className}`, '::before')
|
|
89
|
-
})
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
withRule: (rule) => {
|
|
93
|
-
let foundContent = false
|
|
94
|
-
rule.walkDecls('content', () => {
|
|
95
|
-
foundContent = true
|
|
96
|
-
})
|
|
97
|
-
if (!foundContent) {
|
|
98
|
-
rule.prepend(postcss.decl({ prop: 'content', value: '""' }))
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
}
|
|
102
|
-
)
|
|
103
|
-
)
|
|
45
|
+
return '&::before'
|
|
46
|
+
})
|
|
104
47
|
|
|
105
|
-
addVariant(
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
withRule: (rule) => {
|
|
115
|
-
let foundContent = false
|
|
116
|
-
rule.walkDecls('content', () => {
|
|
117
|
-
foundContent = true
|
|
118
|
-
})
|
|
119
|
-
if (!foundContent) {
|
|
120
|
-
rule.prepend(postcss.decl({ prop: 'content', value: '""' }))
|
|
121
|
-
}
|
|
122
|
-
},
|
|
48
|
+
addVariant('after', ({ container }) => {
|
|
49
|
+
container.walkRules((rule) => {
|
|
50
|
+
let foundContent = false
|
|
51
|
+
rule.walkDecls('content', () => {
|
|
52
|
+
foundContent = true
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
if (!foundContent) {
|
|
56
|
+
rule.prepend(postcss.decl({ prop: 'content', value: 'var(--tw-content)' }))
|
|
123
57
|
}
|
|
124
|
-
)
|
|
125
|
-
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
return '&::after'
|
|
61
|
+
})
|
|
126
62
|
},
|
|
127
63
|
|
|
128
|
-
pseudoClassVariants: ({
|
|
64
|
+
pseudoClassVariants: ({ addVariant, config }) => {
|
|
129
65
|
let pseudoVariants = [
|
|
130
66
|
// Positional
|
|
131
|
-
['first', '
|
|
132
|
-
['last', '
|
|
133
|
-
['only', '
|
|
134
|
-
['odd', '
|
|
135
|
-
['even', '
|
|
67
|
+
['first', '&:first-child'],
|
|
68
|
+
['last', '&:last-child'],
|
|
69
|
+
['only', '&:only-child'],
|
|
70
|
+
['odd', '&:nth-child(odd)'],
|
|
71
|
+
['even', '&:nth-child(even)'],
|
|
136
72
|
'first-of-type',
|
|
137
73
|
'last-of-type',
|
|
138
74
|
'only-of-type',
|
|
139
75
|
|
|
140
76
|
// State
|
|
141
|
-
|
|
77
|
+
[
|
|
78
|
+
'visited',
|
|
79
|
+
({ container }) => {
|
|
80
|
+
let toRemove = ['--tw-text-opacity', '--tw-border-opacity', '--tw-bg-opacity']
|
|
81
|
+
|
|
82
|
+
container.walkDecls((decl) => {
|
|
83
|
+
if (toRemove.includes(decl.prop)) {
|
|
84
|
+
decl.remove()
|
|
85
|
+
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
for (const varName of toRemove) {
|
|
90
|
+
if (decl.value.includes(`/ var(${varName})`)) {
|
|
91
|
+
decl.value = decl.value.replace(`/ var(${varName})`, '')
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
return '&:visited'
|
|
97
|
+
},
|
|
98
|
+
],
|
|
142
99
|
'target',
|
|
143
|
-
['open', '[open]'],
|
|
100
|
+
['open', '&[open]'],
|
|
144
101
|
|
|
145
102
|
// Forms
|
|
146
103
|
'default',
|
|
@@ -160,208 +117,144 @@ export let variantPlugins = {
|
|
|
160
117
|
|
|
161
118
|
// Interactive
|
|
162
119
|
'focus-within',
|
|
163
|
-
|
|
120
|
+
[
|
|
121
|
+
'hover',
|
|
122
|
+
!flagEnabled(config(), 'hoverOnlyWhenSupported')
|
|
123
|
+
? '&:hover'
|
|
124
|
+
: '@media (hover: hover) and (pointer: fine) { &:hover }',
|
|
125
|
+
],
|
|
164
126
|
'focus',
|
|
165
127
|
'focus-visible',
|
|
166
128
|
'active',
|
|
129
|
+
'enabled',
|
|
167
130
|
'disabled',
|
|
168
|
-
]
|
|
169
|
-
|
|
170
|
-
for (let variant of pseudoVariants) {
|
|
171
|
-
let [variantName, state] = Array.isArray(variant) ? variant : [variant, `:${variant}`]
|
|
172
|
-
|
|
173
|
-
addVariant(
|
|
174
|
-
variantName,
|
|
175
|
-
transformAllClasses((className, { withAttr, withPseudo }) => {
|
|
176
|
-
if (state.startsWith(':')) {
|
|
177
|
-
return withPseudo(`${variantName}${config('separator')}${className}`, state)
|
|
178
|
-
} else if (state.startsWith('[')) {
|
|
179
|
-
return withAttr(`${variantName}${config('separator')}${className}`, state)
|
|
180
|
-
}
|
|
181
|
-
})
|
|
182
|
-
)
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
let groupMarker = prefixSelector(config('prefix'), '.group')
|
|
186
|
-
for (let variant of pseudoVariants) {
|
|
187
|
-
let [variantName, state] = Array.isArray(variant) ? variant : [variant, `:${variant}`]
|
|
188
|
-
let groupVariantName = `group-${variantName}`
|
|
189
|
-
|
|
190
|
-
addVariant(
|
|
191
|
-
groupVariantName,
|
|
192
|
-
transformAllSelectors((selector) => {
|
|
193
|
-
let variantSelector = updateAllClasses(selector, (className) => {
|
|
194
|
-
if (`.${className}` === groupMarker) return className
|
|
195
|
-
return `${groupVariantName}${config('separator')}${className}`
|
|
196
|
-
})
|
|
131
|
+
].map((variant) => (Array.isArray(variant) ? variant : [variant, `&:${variant}`]))
|
|
197
132
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
133
|
+
for (let [variantName, state] of pseudoVariants) {
|
|
134
|
+
addVariant(variantName, (ctx) => {
|
|
135
|
+
let result = typeof state === 'function' ? state(ctx) : state
|
|
201
136
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
groupMarker,
|
|
205
|
-
state,
|
|
206
|
-
(marker, selector) => `${marker} ${selector}`
|
|
207
|
-
)
|
|
208
|
-
})
|
|
209
|
-
)
|
|
137
|
+
return result
|
|
138
|
+
})
|
|
210
139
|
}
|
|
211
140
|
|
|
212
|
-
let
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
let peerVariantName = `peer-${variantName}`
|
|
216
|
-
|
|
217
|
-
addVariant(
|
|
218
|
-
peerVariantName,
|
|
219
|
-
transformAllSelectors((selector) => {
|
|
220
|
-
let variantSelector = updateAllClasses(selector, (className) => {
|
|
221
|
-
if (`.${className}` === peerMarker) return className
|
|
222
|
-
return `${peerVariantName}${config('separator')}${className}`
|
|
223
|
-
})
|
|
224
|
-
|
|
225
|
-
if (variantSelector === selector) {
|
|
226
|
-
return null
|
|
227
|
-
}
|
|
141
|
+
for (let [variantName, state] of pseudoVariants) {
|
|
142
|
+
addVariant(`group-${variantName}`, (ctx) => {
|
|
143
|
+
let result = typeof state === 'function' ? state(ctx) : state
|
|
228
144
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
)
|
|
232
|
-
})
|
|
233
|
-
)
|
|
145
|
+
return result.replace(/&(\S+)/, ':merge(.group)$1 &')
|
|
146
|
+
})
|
|
234
147
|
}
|
|
235
|
-
},
|
|
236
148
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
transformAllSelectors((selector) => {
|
|
241
|
-
log.warn('rtl-experimental', [
|
|
242
|
-
'The RTL features in Tailwind CSS are currently in preview.',
|
|
243
|
-
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
|
|
244
|
-
])
|
|
245
|
-
return `[dir="ltr"] ${updateAllClasses(
|
|
246
|
-
selector,
|
|
247
|
-
(className) => `ltr${config('separator')}${className}`
|
|
248
|
-
)}`
|
|
249
|
-
})
|
|
250
|
-
)
|
|
149
|
+
for (let [variantName, state] of pseudoVariants) {
|
|
150
|
+
addVariant(`peer-${variantName}`, (ctx) => {
|
|
151
|
+
let result = typeof state === 'function' ? state(ctx) : state
|
|
251
152
|
|
|
252
|
-
|
|
253
|
-
'rtl',
|
|
254
|
-
transformAllSelectors((selector) => {
|
|
255
|
-
log.warn('rtl-experimental', [
|
|
256
|
-
'The RTL features in Tailwind CSS are currently in preview.',
|
|
257
|
-
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
|
|
258
|
-
])
|
|
259
|
-
return `[dir="rtl"] ${updateAllClasses(
|
|
260
|
-
selector,
|
|
261
|
-
(className) => `rtl${config('separator')}${className}`
|
|
262
|
-
)}`
|
|
153
|
+
return result.replace(/&(\S+)/, ':merge(.peer)$1 ~ &')
|
|
263
154
|
})
|
|
264
|
-
|
|
155
|
+
}
|
|
265
156
|
},
|
|
266
157
|
|
|
267
|
-
|
|
268
|
-
addVariant(
|
|
269
|
-
'
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
wrap: () =>
|
|
276
|
-
postcss.atRule({
|
|
277
|
-
name: 'media',
|
|
278
|
-
params: '(prefers-reduced-motion: no-preference)',
|
|
279
|
-
}),
|
|
280
|
-
}
|
|
281
|
-
)
|
|
282
|
-
)
|
|
158
|
+
directionVariants: ({ addVariant }) => {
|
|
159
|
+
addVariant('ltr', () => {
|
|
160
|
+
log.warn('rtl-experimental', [
|
|
161
|
+
'The RTL features in Tailwind CSS are currently in preview.',
|
|
162
|
+
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
|
|
163
|
+
])
|
|
283
164
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
)
|
|
165
|
+
return '[dir="ltr"] &'
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
addVariant('rtl', () => {
|
|
169
|
+
log.warn('rtl-experimental', [
|
|
170
|
+
'The RTL features in Tailwind CSS are currently in preview.',
|
|
171
|
+
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
|
|
172
|
+
])
|
|
173
|
+
|
|
174
|
+
return '[dir="rtl"] &'
|
|
175
|
+
})
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
reducedMotionVariants: ({ addVariant }) => {
|
|
179
|
+
addVariant('motion-safe', '@media (prefers-reduced-motion: no-preference)')
|
|
180
|
+
addVariant('motion-reduce', '@media (prefers-reduced-motion: reduce)')
|
|
299
181
|
},
|
|
300
182
|
|
|
301
183
|
darkVariants: ({ config, addVariant }) => {
|
|
302
|
-
let mode = config('darkMode', 'media')
|
|
184
|
+
let [mode, className = '.dark'] = [].concat(config('darkMode', 'media'))
|
|
185
|
+
|
|
303
186
|
if (mode === false) {
|
|
304
187
|
mode = 'media'
|
|
305
188
|
log.warn('darkmode-false', [
|
|
306
189
|
'The `darkMode` option in your Tailwind CSS configuration is set to `false`, which now behaves the same as `media`.',
|
|
307
190
|
'Change `darkMode` to `media` or remove it entirely.',
|
|
191
|
+
'https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration',
|
|
308
192
|
])
|
|
309
193
|
}
|
|
310
194
|
|
|
311
195
|
if (mode === 'class') {
|
|
312
|
-
addVariant(
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
})
|
|
196
|
+
addVariant('dark', `${className} &`)
|
|
197
|
+
} else if (mode === 'media') {
|
|
198
|
+
addVariant('dark', '@media (prefers-color-scheme: dark)')
|
|
199
|
+
}
|
|
200
|
+
},
|
|
318
201
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
202
|
+
printVariant: ({ addVariant }) => {
|
|
203
|
+
addVariant('print', '@media print')
|
|
204
|
+
},
|
|
322
205
|
|
|
323
|
-
|
|
206
|
+
screenVariants: ({ theme, addVariant }) => {
|
|
207
|
+
for (let screen of normalizeScreens(theme('screens'))) {
|
|
208
|
+
let query = buildMediaQuery(screen)
|
|
324
209
|
|
|
325
|
-
|
|
326
|
-
})
|
|
327
|
-
)
|
|
328
|
-
} else if (mode === 'media') {
|
|
329
|
-
addVariant(
|
|
330
|
-
'dark',
|
|
331
|
-
transformLastClasses(
|
|
332
|
-
(className) => {
|
|
333
|
-
return `dark${config('separator')}${className}`
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
wrap: () =>
|
|
337
|
-
postcss.atRule({
|
|
338
|
-
name: 'media',
|
|
339
|
-
params: '(prefers-color-scheme: dark)',
|
|
340
|
-
}),
|
|
341
|
-
}
|
|
342
|
-
)
|
|
343
|
-
)
|
|
210
|
+
addVariant(screen.name, `@media ${query}`)
|
|
344
211
|
}
|
|
345
212
|
},
|
|
346
213
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
214
|
+
orientationVariants: ({ addVariant }) => {
|
|
215
|
+
addVariant('portrait', '@media (orientation: portrait)')
|
|
216
|
+
addVariant('landscape', '@media (orientation: landscape)')
|
|
217
|
+
},
|
|
351
218
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
(className) => {
|
|
356
|
-
return `${screen}${config('separator')}${className}`
|
|
357
|
-
},
|
|
358
|
-
{ wrap: () => postcss.atRule({ name: 'media', params: query }) }
|
|
359
|
-
)
|
|
360
|
-
)
|
|
361
|
-
}
|
|
219
|
+
prefersContrastVariants: ({ addVariant }) => {
|
|
220
|
+
addVariant('contrast-more', '@media (prefers-contrast: more)')
|
|
221
|
+
addVariant('contrast-less', '@media (prefers-contrast: less)')
|
|
362
222
|
},
|
|
363
223
|
}
|
|
364
224
|
|
|
225
|
+
let cssTransformValue = [
|
|
226
|
+
'translate(var(--tw-translate-x), var(--tw-translate-y))',
|
|
227
|
+
'rotate(var(--tw-rotate))',
|
|
228
|
+
'skewX(var(--tw-skew-x))',
|
|
229
|
+
'skewY(var(--tw-skew-y))',
|
|
230
|
+
'scaleX(var(--tw-scale-x))',
|
|
231
|
+
'scaleY(var(--tw-scale-y))',
|
|
232
|
+
].join(' ')
|
|
233
|
+
|
|
234
|
+
let cssFilterValue = [
|
|
235
|
+
'var(--tw-blur)',
|
|
236
|
+
'var(--tw-brightness)',
|
|
237
|
+
'var(--tw-contrast)',
|
|
238
|
+
'var(--tw-grayscale)',
|
|
239
|
+
'var(--tw-hue-rotate)',
|
|
240
|
+
'var(--tw-invert)',
|
|
241
|
+
'var(--tw-saturate)',
|
|
242
|
+
'var(--tw-sepia)',
|
|
243
|
+
'var(--tw-drop-shadow)',
|
|
244
|
+
].join(' ')
|
|
245
|
+
|
|
246
|
+
let cssBackdropFilterValue = [
|
|
247
|
+
'var(--tw-backdrop-blur)',
|
|
248
|
+
'var(--tw-backdrop-brightness)',
|
|
249
|
+
'var(--tw-backdrop-contrast)',
|
|
250
|
+
'var(--tw-backdrop-grayscale)',
|
|
251
|
+
'var(--tw-backdrop-hue-rotate)',
|
|
252
|
+
'var(--tw-backdrop-invert)',
|
|
253
|
+
'var(--tw-backdrop-opacity)',
|
|
254
|
+
'var(--tw-backdrop-saturate)',
|
|
255
|
+
'var(--tw-backdrop-sepia)',
|
|
256
|
+
].join(' ')
|
|
257
|
+
|
|
365
258
|
export let corePlugins = {
|
|
366
259
|
preflight: ({ addBase }) => {
|
|
367
260
|
let preflightStyles = postcss.parse(
|
|
@@ -377,24 +270,10 @@ export let corePlugins = {
|
|
|
377
270
|
},
|
|
378
271
|
|
|
379
272
|
container: (() => {
|
|
380
|
-
function extractMinWidths(breakpoints) {
|
|
381
|
-
return
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
if (!Array.isArray(breakpoints)) {
|
|
387
|
-
breakpoints = [breakpoints]
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
return breakpoints
|
|
391
|
-
.filter((breakpoint) => {
|
|
392
|
-
return breakpoint?.hasOwnProperty?.('min') || breakpoint?.hasOwnProperty('min-width')
|
|
393
|
-
})
|
|
394
|
-
.map((breakpoint) => {
|
|
395
|
-
return breakpoint['min-width'] ?? breakpoint.min
|
|
396
|
-
})
|
|
397
|
-
})
|
|
273
|
+
function extractMinWidths(breakpoints = []) {
|
|
274
|
+
return breakpoints
|
|
275
|
+
.flatMap((breakpoint) => breakpoint.values.map((breakpoint) => breakpoint.min))
|
|
276
|
+
.filter((v) => v !== undefined)
|
|
398
277
|
}
|
|
399
278
|
|
|
400
279
|
function mapMinWidthsToPadding(minWidths, screens, paddings) {
|
|
@@ -423,16 +302,11 @@ export let corePlugins = {
|
|
|
423
302
|
}
|
|
424
303
|
|
|
425
304
|
for (let minWidth of minWidths) {
|
|
426
|
-
for (let
|
|
427
|
-
let
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
mapping.push({
|
|
432
|
-
screen,
|
|
433
|
-
minWidth,
|
|
434
|
-
padding: paddings[screen],
|
|
435
|
-
})
|
|
305
|
+
for (let screen of screens) {
|
|
306
|
+
for (let { min } of screen.values) {
|
|
307
|
+
if (min === minWidth) {
|
|
308
|
+
mapping.push({ minWidth, padding: paddings[screen.name] })
|
|
309
|
+
}
|
|
436
310
|
}
|
|
437
311
|
}
|
|
438
312
|
}
|
|
@@ -441,12 +315,12 @@ export let corePlugins = {
|
|
|
441
315
|
}
|
|
442
316
|
|
|
443
317
|
return function ({ addComponents, theme }) {
|
|
444
|
-
let screens = theme('container.screens', theme('screens'))
|
|
318
|
+
let screens = normalizeScreens(theme('container.screens', theme('screens')))
|
|
445
319
|
let minWidths = extractMinWidths(screens)
|
|
446
320
|
let paddings = mapMinWidthsToPadding(minWidths, screens, theme('container.padding'))
|
|
447
321
|
|
|
448
322
|
let generatePaddingFor = (minWidth) => {
|
|
449
|
-
let paddingConfig = paddings.find((padding) =>
|
|
323
|
+
let paddingConfig = paddings.find((padding) => padding.minWidth === minWidth)
|
|
450
324
|
|
|
451
325
|
if (!paddingConfig) {
|
|
452
326
|
return {}
|
|
@@ -669,6 +543,41 @@ export let corePlugins = {
|
|
|
669
543
|
})
|
|
670
544
|
},
|
|
671
545
|
|
|
546
|
+
borderSpacing: ({ addDefaults, matchUtilities, theme }) => {
|
|
547
|
+
addDefaults('border-spacing', {
|
|
548
|
+
'--tw-border-spacing-x': 0,
|
|
549
|
+
'--tw-border-spacing-y': 0,
|
|
550
|
+
})
|
|
551
|
+
|
|
552
|
+
matchUtilities(
|
|
553
|
+
{
|
|
554
|
+
'border-spacing': (value) => {
|
|
555
|
+
return {
|
|
556
|
+
'--tw-border-spacing-x': value,
|
|
557
|
+
'--tw-border-spacing-y': value,
|
|
558
|
+
'@defaults border-spacing': {},
|
|
559
|
+
'border-spacing': 'var(--tw-border-spacing-x) var(--tw-border-spacing-y)',
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
'border-spacing-x': (value) => {
|
|
563
|
+
return {
|
|
564
|
+
'--tw-border-spacing-x': value,
|
|
565
|
+
'@defaults border-spacing': {},
|
|
566
|
+
'border-spacing': 'var(--tw-border-spacing-x) var(--tw-border-spacing-y)',
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
'border-spacing-y': (value) => {
|
|
570
|
+
return {
|
|
571
|
+
'--tw-border-spacing-y': value,
|
|
572
|
+
'@defaults border-spacing': {},
|
|
573
|
+
'border-spacing': 'var(--tw-border-spacing-x) var(--tw-border-spacing-y)',
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
},
|
|
577
|
+
{ values: theme('borderSpacing') }
|
|
578
|
+
)
|
|
579
|
+
},
|
|
580
|
+
|
|
672
581
|
transformOrigin: createUtilityPlugin('transformOrigin', [['origin', ['transformOrigin']]]),
|
|
673
582
|
translate: createUtilityPlugin(
|
|
674
583
|
'translate',
|
|
@@ -676,11 +585,11 @@ export let corePlugins = {
|
|
|
676
585
|
[
|
|
677
586
|
[
|
|
678
587
|
'translate-x',
|
|
679
|
-
[['@defaults transform', {}], '--tw-translate-x', ['transform',
|
|
588
|
+
[['@defaults transform', {}], '--tw-translate-x', ['transform', cssTransformValue]],
|
|
680
589
|
],
|
|
681
590
|
[
|
|
682
591
|
'translate-y',
|
|
683
|
-
[['@defaults transform', {}], '--tw-translate-y', ['transform',
|
|
592
|
+
[['@defaults transform', {}], '--tw-translate-y', ['transform', cssTransformValue]],
|
|
684
593
|
],
|
|
685
594
|
],
|
|
686
595
|
],
|
|
@@ -688,102 +597,73 @@ export let corePlugins = {
|
|
|
688
597
|
),
|
|
689
598
|
rotate: createUtilityPlugin(
|
|
690
599
|
'rotate',
|
|
691
|
-
[
|
|
692
|
-
[
|
|
693
|
-
'rotate',
|
|
694
|
-
[['@defaults transform', {}], '--tw-rotate', ['transform', 'var(--tw-transform)']],
|
|
695
|
-
],
|
|
696
|
-
],
|
|
600
|
+
[['rotate', [['@defaults transform', {}], '--tw-rotate', ['transform', cssTransformValue]]]],
|
|
697
601
|
{ supportsNegativeValues: true }
|
|
698
602
|
),
|
|
699
603
|
skew: createUtilityPlugin(
|
|
700
604
|
'skew',
|
|
701
605
|
[
|
|
702
606
|
[
|
|
703
|
-
[
|
|
704
|
-
|
|
705
|
-
[['@defaults transform', {}], '--tw-skew-x', ['transform', 'var(--tw-transform)']],
|
|
706
|
-
],
|
|
707
|
-
[
|
|
708
|
-
'skew-y',
|
|
709
|
-
[['@defaults transform', {}], '--tw-skew-y', ['transform', 'var(--tw-transform)']],
|
|
710
|
-
],
|
|
607
|
+
['skew-x', [['@defaults transform', {}], '--tw-skew-x', ['transform', cssTransformValue]]],
|
|
608
|
+
['skew-y', [['@defaults transform', {}], '--tw-skew-y', ['transform', cssTransformValue]]],
|
|
711
609
|
],
|
|
712
610
|
],
|
|
713
611
|
{ supportsNegativeValues: true }
|
|
714
612
|
),
|
|
715
|
-
scale: createUtilityPlugin(
|
|
716
|
-
|
|
717
|
-
'scale',
|
|
718
|
-
[
|
|
719
|
-
['@defaults transform', {}],
|
|
720
|
-
'--tw-scale-x',
|
|
721
|
-
'--tw-scale-y',
|
|
722
|
-
['transform', 'var(--tw-transform)'],
|
|
723
|
-
],
|
|
724
|
-
],
|
|
613
|
+
scale: createUtilityPlugin(
|
|
614
|
+
'scale',
|
|
725
615
|
[
|
|
726
616
|
[
|
|
727
|
-
'scale
|
|
728
|
-
[
|
|
617
|
+
'scale',
|
|
618
|
+
[
|
|
619
|
+
['@defaults transform', {}],
|
|
620
|
+
'--tw-scale-x',
|
|
621
|
+
'--tw-scale-y',
|
|
622
|
+
['transform', cssTransformValue],
|
|
623
|
+
],
|
|
729
624
|
],
|
|
730
625
|
[
|
|
731
|
-
|
|
732
|
-
|
|
626
|
+
[
|
|
627
|
+
'scale-x',
|
|
628
|
+
[['@defaults transform', {}], '--tw-scale-x', ['transform', cssTransformValue]],
|
|
629
|
+
],
|
|
630
|
+
[
|
|
631
|
+
'scale-y',
|
|
632
|
+
[['@defaults transform', {}], '--tw-scale-y', ['transform', cssTransformValue]],
|
|
633
|
+
],
|
|
733
634
|
],
|
|
734
635
|
],
|
|
735
|
-
|
|
636
|
+
{ supportsNegativeValues: true }
|
|
637
|
+
),
|
|
638
|
+
|
|
639
|
+
transform: ({ addDefaults, addUtilities }) => {
|
|
640
|
+
addDefaults('transform', {
|
|
641
|
+
'--tw-translate-x': '0',
|
|
642
|
+
'--tw-translate-y': '0',
|
|
643
|
+
'--tw-rotate': '0',
|
|
644
|
+
'--tw-skew-x': '0',
|
|
645
|
+
'--tw-skew-y': '0',
|
|
646
|
+
'--tw-scale-x': '1',
|
|
647
|
+
'--tw-scale-y': '1',
|
|
648
|
+
})
|
|
736
649
|
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
'@defaults transform': {
|
|
740
|
-
'--tw-translate-x': '0',
|
|
741
|
-
'--tw-translate-y': '0',
|
|
742
|
-
'--tw-rotate': '0',
|
|
743
|
-
'--tw-skew-x': '0',
|
|
744
|
-
'--tw-skew-y': '0',
|
|
745
|
-
'--tw-scale-x': '1',
|
|
746
|
-
'--tw-scale-y': '1',
|
|
747
|
-
'--tw-transform': [
|
|
748
|
-
'translateX(var(--tw-translate-x))',
|
|
749
|
-
'translateY(var(--tw-translate-y))',
|
|
750
|
-
'rotate(var(--tw-rotate))',
|
|
751
|
-
'skewX(var(--tw-skew-x))',
|
|
752
|
-
'skewY(var(--tw-skew-y))',
|
|
753
|
-
'scaleX(var(--tw-scale-x))',
|
|
754
|
-
'scaleY(var(--tw-scale-y))',
|
|
755
|
-
].join(' '),
|
|
756
|
-
},
|
|
757
|
-
})
|
|
758
|
-
addUtilities({
|
|
759
|
-
'.transform': { '@defaults transform': {}, transform: 'var(--tw-transform)' },
|
|
650
|
+
addUtilities({
|
|
651
|
+
'.transform': { '@defaults transform': {}, transform: cssTransformValue },
|
|
760
652
|
'.transform-cpu': {
|
|
761
|
-
|
|
762
|
-
'translateX(var(--tw-translate-x))',
|
|
763
|
-
'translateY(var(--tw-translate-y))',
|
|
764
|
-
'rotate(var(--tw-rotate))',
|
|
765
|
-
'skewX(var(--tw-skew-x))',
|
|
766
|
-
'skewY(var(--tw-skew-y))',
|
|
767
|
-
'scaleX(var(--tw-scale-x))',
|
|
768
|
-
'scaleY(var(--tw-scale-y))',
|
|
769
|
-
].join(' '),
|
|
653
|
+
transform: cssTransformValue,
|
|
770
654
|
},
|
|
771
655
|
'.transform-gpu': {
|
|
772
|
-
|
|
773
|
-
'
|
|
774
|
-
'
|
|
775
|
-
|
|
776
|
-
'skewY(var(--tw-skew-y))',
|
|
777
|
-
'scaleX(var(--tw-scale-x))',
|
|
778
|
-
'scaleY(var(--tw-scale-y))',
|
|
779
|
-
].join(' '),
|
|
656
|
+
transform: cssTransformValue.replace(
|
|
657
|
+
'translate(var(--tw-translate-x), var(--tw-translate-y))',
|
|
658
|
+
'translate3d(var(--tw-translate-x), var(--tw-translate-y), 0)'
|
|
659
|
+
),
|
|
780
660
|
},
|
|
781
661
|
'.transform-none': { transform: 'none' },
|
|
782
662
|
})
|
|
783
663
|
},
|
|
784
664
|
|
|
785
|
-
animation: ({ matchUtilities, theme,
|
|
786
|
-
let prefixName = (name) => prefix(
|
|
665
|
+
animation: ({ matchUtilities, theme, config }) => {
|
|
666
|
+
let prefixName = (name) => `${config('prefix')}${escapeClassName(name)}`
|
|
787
667
|
let keyframes = Object.fromEntries(
|
|
788
668
|
Object.entries(theme('keyframes') ?? {}).map(([key, value]) => {
|
|
789
669
|
return [key, { [`@keyframes ${prefixName(key)}`]: value }]
|
|
@@ -816,17 +696,53 @@ export let corePlugins = {
|
|
|
816
696
|
|
|
817
697
|
cursor: createUtilityPlugin('cursor'),
|
|
818
698
|
|
|
819
|
-
touchAction: ({ addUtilities }) => {
|
|
699
|
+
touchAction: ({ addDefaults, addUtilities }) => {
|
|
700
|
+
addDefaults('touch-action', {
|
|
701
|
+
'--tw-pan-x': ' ',
|
|
702
|
+
'--tw-pan-y': ' ',
|
|
703
|
+
'--tw-pinch-zoom': ' ',
|
|
704
|
+
})
|
|
705
|
+
|
|
706
|
+
let cssTouchActionValue = 'var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)'
|
|
707
|
+
|
|
820
708
|
addUtilities({
|
|
821
709
|
'.touch-auto': { 'touch-action': 'auto' },
|
|
822
710
|
'.touch-none': { 'touch-action': 'none' },
|
|
823
|
-
'.touch-pan-x': {
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
'.touch-pan-
|
|
829
|
-
|
|
711
|
+
'.touch-pan-x': {
|
|
712
|
+
'@defaults touch-action': {},
|
|
713
|
+
'--tw-pan-x': 'pan-x',
|
|
714
|
+
'touch-action': cssTouchActionValue,
|
|
715
|
+
},
|
|
716
|
+
'.touch-pan-left': {
|
|
717
|
+
'@defaults touch-action': {},
|
|
718
|
+
'--tw-pan-x': 'pan-left',
|
|
719
|
+
'touch-action': cssTouchActionValue,
|
|
720
|
+
},
|
|
721
|
+
'.touch-pan-right': {
|
|
722
|
+
'@defaults touch-action': {},
|
|
723
|
+
'--tw-pan-x': 'pan-right',
|
|
724
|
+
'touch-action': cssTouchActionValue,
|
|
725
|
+
},
|
|
726
|
+
'.touch-pan-y': {
|
|
727
|
+
'@defaults touch-action': {},
|
|
728
|
+
'--tw-pan-y': 'pan-y',
|
|
729
|
+
'touch-action': cssTouchActionValue,
|
|
730
|
+
},
|
|
731
|
+
'.touch-pan-up': {
|
|
732
|
+
'@defaults touch-action': {},
|
|
733
|
+
'--tw-pan-y': 'pan-up',
|
|
734
|
+
'touch-action': cssTouchActionValue,
|
|
735
|
+
},
|
|
736
|
+
'.touch-pan-down': {
|
|
737
|
+
'@defaults touch-action': {},
|
|
738
|
+
'--tw-pan-y': 'pan-down',
|
|
739
|
+
'touch-action': cssTouchActionValue,
|
|
740
|
+
},
|
|
741
|
+
'.touch-pinch-zoom': {
|
|
742
|
+
'@defaults touch-action': {},
|
|
743
|
+
'--tw-pinch-zoom': 'pinch-zoom',
|
|
744
|
+
'touch-action': cssTouchActionValue,
|
|
745
|
+
},
|
|
830
746
|
'.touch-manipulation': { 'touch-action': 'manipulation' },
|
|
831
747
|
})
|
|
832
748
|
},
|
|
@@ -849,11 +765,9 @@ export let corePlugins = {
|
|
|
849
765
|
})
|
|
850
766
|
},
|
|
851
767
|
|
|
852
|
-
scrollSnapType: ({
|
|
853
|
-
|
|
854
|
-
'
|
|
855
|
-
'--tw-scroll-snap-strictness': 'proximity',
|
|
856
|
-
},
|
|
768
|
+
scrollSnapType: ({ addDefaults, addUtilities }) => {
|
|
769
|
+
addDefaults('scroll-snap-type', {
|
|
770
|
+
'--tw-scroll-snap-strictness': 'proximity',
|
|
857
771
|
})
|
|
858
772
|
|
|
859
773
|
addUtilities({
|
|
@@ -981,6 +895,7 @@ export let corePlugins = {
|
|
|
981
895
|
addUtilities({
|
|
982
896
|
'.grid-flow-row': { gridAutoFlow: 'row' },
|
|
983
897
|
'.grid-flow-col': { gridAutoFlow: 'column' },
|
|
898
|
+
'.grid-flow-dense': { gridAutoFlow: 'dense' },
|
|
984
899
|
'.grid-flow-row-dense': { gridAutoFlow: 'row dense' },
|
|
985
900
|
'.grid-flow-col-dense': { gridAutoFlow: 'column dense' },
|
|
986
901
|
})
|
|
@@ -1350,24 +1265,7 @@ export let corePlugins = {
|
|
|
1350
1265
|
})
|
|
1351
1266
|
},
|
|
1352
1267
|
|
|
1353
|
-
borderColor: ({
|
|
1354
|
-
if (!corePlugins('borderOpacity')) {
|
|
1355
|
-
let value = theme('borderColor.DEFAULT', 'currentColor')
|
|
1356
|
-
addBase({
|
|
1357
|
-
'@defaults border-width': {
|
|
1358
|
-
'border-color': toColorValue(value),
|
|
1359
|
-
},
|
|
1360
|
-
})
|
|
1361
|
-
} else {
|
|
1362
|
-
addBase({
|
|
1363
|
-
'@defaults border-width': withAlphaVariable({
|
|
1364
|
-
color: theme('borderColor.DEFAULT', 'currentColor'),
|
|
1365
|
-
property: 'border-color',
|
|
1366
|
-
variable: '--tw-border-opacity',
|
|
1367
|
-
}),
|
|
1368
|
-
})
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1268
|
+
borderColor: ({ matchUtilities, theme, corePlugins }) => {
|
|
1371
1269
|
matchUtilities(
|
|
1372
1270
|
{
|
|
1373
1271
|
border: (value) => {
|
|
@@ -1568,8 +1466,10 @@ export let corePlugins = {
|
|
|
1568
1466
|
|
|
1569
1467
|
boxDecorationBreak: ({ addUtilities }) => {
|
|
1570
1468
|
addUtilities({
|
|
1571
|
-
'.decoration-slice': { 'box-decoration-break': 'slice' },
|
|
1572
|
-
'.decoration-clone': { 'box-decoration-break': 'clone' },
|
|
1469
|
+
'.decoration-slice': { 'box-decoration-break': 'slice' }, // Deprecated
|
|
1470
|
+
'.decoration-clone': { 'box-decoration-break': 'clone' }, // Deprecated
|
|
1471
|
+
'.box-decoration-slice': { 'box-decoration-break': 'slice' },
|
|
1472
|
+
'.box-decoration-clone': { 'box-decoration-break': 'clone' },
|
|
1573
1473
|
})
|
|
1574
1474
|
},
|
|
1575
1475
|
|
|
@@ -1674,6 +1574,8 @@ export let corePlugins = {
|
|
|
1674
1574
|
'.text-center': { 'text-align': 'center' },
|
|
1675
1575
|
'.text-right': { 'text-align': 'right' },
|
|
1676
1576
|
'.text-justify': { 'text-align': 'justify' },
|
|
1577
|
+
'.text-start': { 'text-align': 'start' },
|
|
1578
|
+
'.text-end': { 'text-align': 'end' },
|
|
1677
1579
|
})
|
|
1678
1580
|
},
|
|
1679
1581
|
|
|
@@ -1743,27 +1645,60 @@ export let corePlugins = {
|
|
|
1743
1645
|
})
|
|
1744
1646
|
},
|
|
1745
1647
|
|
|
1746
|
-
fontVariantNumeric: ({ addUtilities }) => {
|
|
1648
|
+
fontVariantNumeric: ({ addDefaults, addUtilities }) => {
|
|
1649
|
+
let cssFontVariantNumericValue =
|
|
1650
|
+
'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
|
|
1651
|
+
|
|
1652
|
+
addDefaults('font-variant-numeric', {
|
|
1653
|
+
'--tw-ordinal': ' ',
|
|
1654
|
+
'--tw-slashed-zero': ' ',
|
|
1655
|
+
'--tw-numeric-figure': ' ',
|
|
1656
|
+
'--tw-numeric-spacing': ' ',
|
|
1657
|
+
'--tw-numeric-fraction': ' ',
|
|
1658
|
+
})
|
|
1659
|
+
|
|
1747
1660
|
addUtilities({
|
|
1748
|
-
'.ordinal, .slashed-zero, .lining-nums, .oldstyle-nums, .proportional-nums, .tabular-nums, .diagonal-fractions, .stacked-fractions':
|
|
1749
|
-
{
|
|
1750
|
-
'--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1751
|
-
'--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1752
|
-
'--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1753
|
-
'--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1754
|
-
'--tw-numeric-fraction': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1755
|
-
'font-variant-numeric':
|
|
1756
|
-
'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)',
|
|
1757
|
-
},
|
|
1758
1661
|
'.normal-nums': { 'font-variant-numeric': 'normal' },
|
|
1759
|
-
'.ordinal': {
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
'.
|
|
1765
|
-
|
|
1766
|
-
|
|
1662
|
+
'.ordinal': {
|
|
1663
|
+
'@defaults font-variant-numeric': {},
|
|
1664
|
+
'--tw-ordinal': 'ordinal',
|
|
1665
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1666
|
+
},
|
|
1667
|
+
'.slashed-zero': {
|
|
1668
|
+
'@defaults font-variant-numeric': {},
|
|
1669
|
+
'--tw-slashed-zero': 'slashed-zero',
|
|
1670
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1671
|
+
},
|
|
1672
|
+
'.lining-nums': {
|
|
1673
|
+
'@defaults font-variant-numeric': {},
|
|
1674
|
+
'--tw-numeric-figure': 'lining-nums',
|
|
1675
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1676
|
+
},
|
|
1677
|
+
'.oldstyle-nums': {
|
|
1678
|
+
'@defaults font-variant-numeric': {},
|
|
1679
|
+
'--tw-numeric-figure': 'oldstyle-nums',
|
|
1680
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1681
|
+
},
|
|
1682
|
+
'.proportional-nums': {
|
|
1683
|
+
'@defaults font-variant-numeric': {},
|
|
1684
|
+
'--tw-numeric-spacing': 'proportional-nums',
|
|
1685
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1686
|
+
},
|
|
1687
|
+
'.tabular-nums': {
|
|
1688
|
+
'@defaults font-variant-numeric': {},
|
|
1689
|
+
'--tw-numeric-spacing': 'tabular-nums',
|
|
1690
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1691
|
+
},
|
|
1692
|
+
'.diagonal-fractions': {
|
|
1693
|
+
'@defaults font-variant-numeric': {},
|
|
1694
|
+
'--tw-numeric-fraction': 'diagonal-fractions',
|
|
1695
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1696
|
+
},
|
|
1697
|
+
'.stacked-fractions': {
|
|
1698
|
+
'@defaults font-variant-numeric': {},
|
|
1699
|
+
'--tw-numeric-fraction': 'stacked-fractions',
|
|
1700
|
+
'font-variant-numeric': cssFontVariantNumericValue,
|
|
1701
|
+
},
|
|
1767
1702
|
})
|
|
1768
1703
|
},
|
|
1769
1704
|
|
|
@@ -1795,12 +1730,46 @@ export let corePlugins = {
|
|
|
1795
1730
|
|
|
1796
1731
|
textDecoration: ({ addUtilities }) => {
|
|
1797
1732
|
addUtilities({
|
|
1798
|
-
'.underline': { 'text-decoration': 'underline' },
|
|
1799
|
-
'.
|
|
1800
|
-
'.
|
|
1733
|
+
'.underline': { 'text-decoration-line': 'underline' },
|
|
1734
|
+
'.overline': { 'text-decoration-line': 'overline' },
|
|
1735
|
+
'.line-through': { 'text-decoration-line': 'line-through' },
|
|
1736
|
+
'.no-underline': { 'text-decoration-line': 'none' },
|
|
1801
1737
|
})
|
|
1802
1738
|
},
|
|
1803
1739
|
|
|
1740
|
+
textDecorationColor: ({ matchUtilities, theme }) => {
|
|
1741
|
+
matchUtilities(
|
|
1742
|
+
{
|
|
1743
|
+
decoration: (value) => {
|
|
1744
|
+
return { 'text-decoration-color': toColorValue(value) }
|
|
1745
|
+
},
|
|
1746
|
+
},
|
|
1747
|
+
{ values: flattenColorPalette(theme('textDecorationColor')), type: ['color'] }
|
|
1748
|
+
)
|
|
1749
|
+
},
|
|
1750
|
+
|
|
1751
|
+
textDecorationStyle: ({ addUtilities }) => {
|
|
1752
|
+
addUtilities({
|
|
1753
|
+
'.decoration-solid': { 'text-decoration-style': 'solid' },
|
|
1754
|
+
'.decoration-double': { 'text-decoration-style': 'double' },
|
|
1755
|
+
'.decoration-dotted': { 'text-decoration-style': 'dotted' },
|
|
1756
|
+
'.decoration-dashed': { 'text-decoration-style': 'dashed' },
|
|
1757
|
+
'.decoration-wavy': { 'text-decoration-style': 'wavy' },
|
|
1758
|
+
})
|
|
1759
|
+
},
|
|
1760
|
+
|
|
1761
|
+
textDecorationThickness: createUtilityPlugin(
|
|
1762
|
+
'textDecorationThickness',
|
|
1763
|
+
[['decoration', ['text-decoration-thickness']]],
|
|
1764
|
+
{ type: ['length', 'percentage'] }
|
|
1765
|
+
),
|
|
1766
|
+
|
|
1767
|
+
textUnderlineOffset: createUtilityPlugin(
|
|
1768
|
+
'textUnderlineOffset',
|
|
1769
|
+
[['underline-offset', ['text-underline-offset']]],
|
|
1770
|
+
{ type: ['length', 'percentage'] }
|
|
1771
|
+
),
|
|
1772
|
+
|
|
1804
1773
|
fontSmoothing: ({ addUtilities }) => {
|
|
1805
1774
|
addUtilities({
|
|
1806
1775
|
'.antialiased': {
|
|
@@ -1913,6 +1882,7 @@ export let corePlugins = {
|
|
|
1913
1882
|
'.mix-blend-saturation': { 'mix-blend-mode': 'saturation' },
|
|
1914
1883
|
'.mix-blend-color': { 'mix-blend-mode': 'color' },
|
|
1915
1884
|
'.mix-blend-luminosity': { 'mix-blend-mode': 'luminosity' },
|
|
1885
|
+
'.mix-blend-plus-lighter': { 'mix-blend-mode': 'plus-lighter' },
|
|
1916
1886
|
})
|
|
1917
1887
|
},
|
|
1918
1888
|
|
|
@@ -1924,13 +1894,12 @@ export let corePlugins = {
|
|
|
1924
1894
|
`var(--tw-shadow)`,
|
|
1925
1895
|
].join(', ')
|
|
1926
1896
|
|
|
1927
|
-
return function ({ matchUtilities,
|
|
1928
|
-
|
|
1929
|
-
'
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
},
|
|
1897
|
+
return function ({ matchUtilities, addDefaults, theme }) {
|
|
1898
|
+
addDefaults(' box-shadow', {
|
|
1899
|
+
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
1900
|
+
'--tw-ring-shadow': '0 0 #0000',
|
|
1901
|
+
'--tw-shadow': '0 0 #0000',
|
|
1902
|
+
'--tw-shadow-colored': '0 0 #0000',
|
|
1934
1903
|
})
|
|
1935
1904
|
|
|
1936
1905
|
matchUtilities(
|
|
@@ -1938,50 +1907,100 @@ export let corePlugins = {
|
|
|
1938
1907
|
shadow: (value) => {
|
|
1939
1908
|
value = transformValue(value)
|
|
1940
1909
|
|
|
1910
|
+
let ast = parseBoxShadowValue(value)
|
|
1911
|
+
for (let shadow of ast) {
|
|
1912
|
+
// Don't override color if the whole shadow is a variable
|
|
1913
|
+
if (!shadow.valid) {
|
|
1914
|
+
continue
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
shadow.color = 'var(--tw-shadow-color)'
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1941
1920
|
return {
|
|
1942
1921
|
'@defaults box-shadow': {},
|
|
1943
1922
|
'--tw-shadow': value === 'none' ? '0 0 #0000' : value,
|
|
1923
|
+
'--tw-shadow-colored': value === 'none' ? '0 0 #0000' : formatBoxShadowValue(ast),
|
|
1944
1924
|
'box-shadow': defaultBoxShadow,
|
|
1945
1925
|
}
|
|
1946
1926
|
},
|
|
1947
1927
|
},
|
|
1948
|
-
{ values: theme('boxShadow') }
|
|
1928
|
+
{ values: theme('boxShadow'), type: ['shadow'] }
|
|
1949
1929
|
)
|
|
1950
1930
|
}
|
|
1951
1931
|
})(),
|
|
1952
1932
|
|
|
1953
|
-
|
|
1933
|
+
boxShadowColor: ({ matchUtilities, theme }) => {
|
|
1954
1934
|
matchUtilities(
|
|
1955
1935
|
{
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1936
|
+
shadow: (value) => {
|
|
1937
|
+
return {
|
|
1938
|
+
'--tw-shadow-color': toColorValue(value),
|
|
1939
|
+
'--tw-shadow': 'var(--tw-shadow-colored)',
|
|
1940
|
+
}
|
|
1961
1941
|
},
|
|
1962
1942
|
},
|
|
1963
|
-
{ values: theme('
|
|
1943
|
+
{ values: flattenColorPalette(theme('boxShadowColor')), type: ['color'] }
|
|
1964
1944
|
)
|
|
1965
1945
|
},
|
|
1966
1946
|
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1947
|
+
outlineStyle: ({ addUtilities }) => {
|
|
1948
|
+
addUtilities({
|
|
1949
|
+
'.outline-none': {
|
|
1950
|
+
outline: '2px solid transparent',
|
|
1951
|
+
'outline-offset': '2px',
|
|
1952
|
+
},
|
|
1953
|
+
'.outline': { 'outline-style': 'solid' },
|
|
1954
|
+
'.outline-dashed': { 'outline-style': 'dashed' },
|
|
1955
|
+
'.outline-dotted': { 'outline-style': 'dotted' },
|
|
1956
|
+
'.outline-double': { 'outline-style': 'double' },
|
|
1957
|
+
'.outline-hidden': { 'outline-style': 'hidden' },
|
|
1958
|
+
})
|
|
1959
|
+
},
|
|
1974
1960
|
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1961
|
+
outlineWidth: createUtilityPlugin('outlineWidth', [['outline', ['outline-width']]], {
|
|
1962
|
+
type: ['length', 'number', 'percentage'],
|
|
1963
|
+
}),
|
|
1964
|
+
|
|
1965
|
+
outlineOffset: createUtilityPlugin('outlineOffset', [['outline-offset', ['outline-offset']]], {
|
|
1966
|
+
type: ['length', 'number', 'percentage'],
|
|
1967
|
+
}),
|
|
1968
|
+
|
|
1969
|
+
outlineColor: ({ matchUtilities, theme }) => {
|
|
1970
|
+
matchUtilities(
|
|
1971
|
+
{
|
|
1972
|
+
outline: (value) => {
|
|
1973
|
+
return { 'outline-color': toColorValue(value) }
|
|
1974
|
+
},
|
|
1984
1975
|
},
|
|
1976
|
+
{ values: flattenColorPalette(theme('outlineColor')), type: ['color'] }
|
|
1977
|
+
)
|
|
1978
|
+
},
|
|
1979
|
+
|
|
1980
|
+
ringWidth: ({ matchUtilities, addDefaults, addUtilities, theme, config }) => {
|
|
1981
|
+
let ringColorDefault = (() => {
|
|
1982
|
+
if (flagEnabled(config(), 'respectDefaultRingColorOpacity')) {
|
|
1983
|
+
return theme('ringColor.DEFAULT')
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5')
|
|
1987
|
+
|
|
1988
|
+
return withAlphaValue(
|
|
1989
|
+
theme('ringColor')?.DEFAULT,
|
|
1990
|
+
ringOpacityDefault,
|
|
1991
|
+
`rgb(147 197 253 / ${ringOpacityDefault})`
|
|
1992
|
+
)
|
|
1993
|
+
})()
|
|
1994
|
+
|
|
1995
|
+
addDefaults('ring-width', {
|
|
1996
|
+
'--tw-ring-inset': ' ',
|
|
1997
|
+
'--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
|
|
1998
|
+
'--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
|
|
1999
|
+
'--tw-ring-color': ringColorDefault,
|
|
2000
|
+
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
2001
|
+
'--tw-ring-shadow': '0 0 #0000',
|
|
2002
|
+
'--tw-shadow': '0 0 #0000',
|
|
2003
|
+
'--tw-shadow-colored': '0 0 #0000',
|
|
1985
2004
|
})
|
|
1986
2005
|
|
|
1987
2006
|
matchUtilities(
|
|
@@ -2007,10 +2026,16 @@ export let corePlugins = {
|
|
|
2007
2026
|
})
|
|
2008
2027
|
},
|
|
2009
2028
|
|
|
2010
|
-
ringColor: ({ matchUtilities, theme }) => {
|
|
2029
|
+
ringColor: ({ matchUtilities, theme, corePlugins }) => {
|
|
2011
2030
|
matchUtilities(
|
|
2012
2031
|
{
|
|
2013
2032
|
ring: (value) => {
|
|
2033
|
+
if (!corePlugins('ringOpacity')) {
|
|
2034
|
+
return {
|
|
2035
|
+
'--tw-ring-color': toColorValue(value),
|
|
2036
|
+
}
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2014
2039
|
return withAlphaVariable({
|
|
2015
2040
|
color: value,
|
|
2016
2041
|
property: '--tw-ring-color',
|
|
@@ -2029,9 +2054,13 @@ export let corePlugins = {
|
|
|
2029
2054
|
)
|
|
2030
2055
|
},
|
|
2031
2056
|
|
|
2032
|
-
ringOpacity:
|
|
2033
|
-
|
|
2034
|
-
|
|
2057
|
+
ringOpacity: (helpers) => {
|
|
2058
|
+
let { config } = helpers
|
|
2059
|
+
|
|
2060
|
+
return createUtilityPlugin('ringOpacity', [['ring-opacity', ['--tw-ring-opacity']]], {
|
|
2061
|
+
filterDefault: !flagEnabled(config(), 'respectDefaultRingColorOpacity'),
|
|
2062
|
+
})(helpers)
|
|
2063
|
+
},
|
|
2035
2064
|
ringOffsetWidth: createUtilityPlugin(
|
|
2036
2065
|
'ringOffsetWidth',
|
|
2037
2066
|
[['ring-offset', ['--tw-ring-offset-width']]],
|
|
@@ -2058,7 +2087,7 @@ export let corePlugins = {
|
|
|
2058
2087
|
return {
|
|
2059
2088
|
'--tw-blur': `blur(${value})`,
|
|
2060
2089
|
'@defaults filter': {},
|
|
2061
|
-
filter:
|
|
2090
|
+
filter: cssFilterValue,
|
|
2062
2091
|
}
|
|
2063
2092
|
},
|
|
2064
2093
|
},
|
|
@@ -2073,7 +2102,7 @@ export let corePlugins = {
|
|
|
2073
2102
|
return {
|
|
2074
2103
|
'--tw-brightness': `brightness(${value})`,
|
|
2075
2104
|
'@defaults filter': {},
|
|
2076
|
-
filter:
|
|
2105
|
+
filter: cssFilterValue,
|
|
2077
2106
|
}
|
|
2078
2107
|
},
|
|
2079
2108
|
},
|
|
@@ -2088,7 +2117,7 @@ export let corePlugins = {
|
|
|
2088
2117
|
return {
|
|
2089
2118
|
'--tw-contrast': `contrast(${value})`,
|
|
2090
2119
|
'@defaults filter': {},
|
|
2091
|
-
filter:
|
|
2120
|
+
filter: cssFilterValue,
|
|
2092
2121
|
}
|
|
2093
2122
|
},
|
|
2094
2123
|
},
|
|
@@ -2105,7 +2134,7 @@ export let corePlugins = {
|
|
|
2105
2134
|
? value.map((v) => `drop-shadow(${v})`).join(' ')
|
|
2106
2135
|
: `drop-shadow(${value})`,
|
|
2107
2136
|
'@defaults filter': {},
|
|
2108
|
-
filter:
|
|
2137
|
+
filter: cssFilterValue,
|
|
2109
2138
|
}
|
|
2110
2139
|
},
|
|
2111
2140
|
},
|
|
@@ -2120,7 +2149,7 @@ export let corePlugins = {
|
|
|
2120
2149
|
return {
|
|
2121
2150
|
'--tw-grayscale': `grayscale(${value})`,
|
|
2122
2151
|
'@defaults filter': {},
|
|
2123
|
-
filter:
|
|
2152
|
+
filter: cssFilterValue,
|
|
2124
2153
|
}
|
|
2125
2154
|
},
|
|
2126
2155
|
},
|
|
@@ -2135,7 +2164,7 @@ export let corePlugins = {
|
|
|
2135
2164
|
return {
|
|
2136
2165
|
'--tw-hue-rotate': `hue-rotate(${value})`,
|
|
2137
2166
|
'@defaults filter': {},
|
|
2138
|
-
filter:
|
|
2167
|
+
filter: cssFilterValue,
|
|
2139
2168
|
}
|
|
2140
2169
|
},
|
|
2141
2170
|
},
|
|
@@ -2150,7 +2179,7 @@ export let corePlugins = {
|
|
|
2150
2179
|
return {
|
|
2151
2180
|
'--tw-invert': `invert(${value})`,
|
|
2152
2181
|
'@defaults filter': {},
|
|
2153
|
-
filter:
|
|
2182
|
+
filter: cssFilterValue,
|
|
2154
2183
|
}
|
|
2155
2184
|
},
|
|
2156
2185
|
},
|
|
@@ -2165,7 +2194,7 @@ export let corePlugins = {
|
|
|
2165
2194
|
return {
|
|
2166
2195
|
'--tw-saturate': `saturate(${value})`,
|
|
2167
2196
|
'@defaults filter': {},
|
|
2168
|
-
filter:
|
|
2197
|
+
filter: cssFilterValue,
|
|
2169
2198
|
}
|
|
2170
2199
|
},
|
|
2171
2200
|
},
|
|
@@ -2180,7 +2209,7 @@ export let corePlugins = {
|
|
|
2180
2209
|
return {
|
|
2181
2210
|
'--tw-sepia': `sepia(${value})`,
|
|
2182
2211
|
'@defaults filter': {},
|
|
2183
|
-
filter:
|
|
2212
|
+
filter: cssFilterValue,
|
|
2184
2213
|
}
|
|
2185
2214
|
},
|
|
2186
2215
|
},
|
|
@@ -2188,33 +2217,20 @@ export let corePlugins = {
|
|
|
2188
2217
|
)
|
|
2189
2218
|
},
|
|
2190
2219
|
|
|
2191
|
-
filter: ({
|
|
2192
|
-
|
|
2193
|
-
'
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
'var(--tw-brightness)',
|
|
2206
|
-
'var(--tw-contrast)',
|
|
2207
|
-
'var(--tw-grayscale)',
|
|
2208
|
-
'var(--tw-hue-rotate)',
|
|
2209
|
-
'var(--tw-invert)',
|
|
2210
|
-
'var(--tw-saturate)',
|
|
2211
|
-
'var(--tw-sepia)',
|
|
2212
|
-
'var(--tw-drop-shadow)',
|
|
2213
|
-
].join(' '),
|
|
2214
|
-
},
|
|
2215
|
-
})
|
|
2216
|
-
addUtilities({
|
|
2217
|
-
'.filter': { '@defaults filter': {}, filter: 'var(--tw-filter)' },
|
|
2220
|
+
filter: ({ addDefaults, addUtilities }) => {
|
|
2221
|
+
addDefaults('filter', {
|
|
2222
|
+
'--tw-blur': ' ',
|
|
2223
|
+
'--tw-brightness': ' ',
|
|
2224
|
+
'--tw-contrast': ' ',
|
|
2225
|
+
'--tw-grayscale': ' ',
|
|
2226
|
+
'--tw-hue-rotate': ' ',
|
|
2227
|
+
'--tw-invert': ' ',
|
|
2228
|
+
'--tw-saturate': ' ',
|
|
2229
|
+
'--tw-sepia': ' ',
|
|
2230
|
+
'--tw-drop-shadow': ' ',
|
|
2231
|
+
})
|
|
2232
|
+
addUtilities({
|
|
2233
|
+
'.filter': { '@defaults filter': {}, filter: cssFilterValue },
|
|
2218
2234
|
'.filter-none': { filter: 'none' },
|
|
2219
2235
|
})
|
|
2220
2236
|
},
|
|
@@ -2226,7 +2242,7 @@ export let corePlugins = {
|
|
|
2226
2242
|
return {
|
|
2227
2243
|
'--tw-backdrop-blur': `blur(${value})`,
|
|
2228
2244
|
'@defaults backdrop-filter': {},
|
|
2229
|
-
'backdrop-filter':
|
|
2245
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2230
2246
|
}
|
|
2231
2247
|
},
|
|
2232
2248
|
},
|
|
@@ -2241,7 +2257,7 @@ export let corePlugins = {
|
|
|
2241
2257
|
return {
|
|
2242
2258
|
'--tw-backdrop-brightness': `brightness(${value})`,
|
|
2243
2259
|
'@defaults backdrop-filter': {},
|
|
2244
|
-
'backdrop-filter':
|
|
2260
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2245
2261
|
}
|
|
2246
2262
|
},
|
|
2247
2263
|
},
|
|
@@ -2256,7 +2272,7 @@ export let corePlugins = {
|
|
|
2256
2272
|
return {
|
|
2257
2273
|
'--tw-backdrop-contrast': `contrast(${value})`,
|
|
2258
2274
|
'@defaults backdrop-filter': {},
|
|
2259
|
-
'backdrop-filter':
|
|
2275
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2260
2276
|
}
|
|
2261
2277
|
},
|
|
2262
2278
|
},
|
|
@@ -2271,7 +2287,7 @@ export let corePlugins = {
|
|
|
2271
2287
|
return {
|
|
2272
2288
|
'--tw-backdrop-grayscale': `grayscale(${value})`,
|
|
2273
2289
|
'@defaults backdrop-filter': {},
|
|
2274
|
-
'backdrop-filter':
|
|
2290
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2275
2291
|
}
|
|
2276
2292
|
},
|
|
2277
2293
|
},
|
|
@@ -2286,7 +2302,7 @@ export let corePlugins = {
|
|
|
2286
2302
|
return {
|
|
2287
2303
|
'--tw-backdrop-hue-rotate': `hue-rotate(${value})`,
|
|
2288
2304
|
'@defaults backdrop-filter': {},
|
|
2289
|
-
'backdrop-filter':
|
|
2305
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2290
2306
|
}
|
|
2291
2307
|
},
|
|
2292
2308
|
},
|
|
@@ -2301,7 +2317,7 @@ export let corePlugins = {
|
|
|
2301
2317
|
return {
|
|
2302
2318
|
'--tw-backdrop-invert': `invert(${value})`,
|
|
2303
2319
|
'@defaults backdrop-filter': {},
|
|
2304
|
-
'backdrop-filter':
|
|
2320
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2305
2321
|
}
|
|
2306
2322
|
},
|
|
2307
2323
|
},
|
|
@@ -2316,7 +2332,7 @@ export let corePlugins = {
|
|
|
2316
2332
|
return {
|
|
2317
2333
|
'--tw-backdrop-opacity': `opacity(${value})`,
|
|
2318
2334
|
'@defaults backdrop-filter': {},
|
|
2319
|
-
'backdrop-filter':
|
|
2335
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2320
2336
|
}
|
|
2321
2337
|
},
|
|
2322
2338
|
},
|
|
@@ -2331,7 +2347,7 @@ export let corePlugins = {
|
|
|
2331
2347
|
return {
|
|
2332
2348
|
'--tw-backdrop-saturate': `saturate(${value})`,
|
|
2333
2349
|
'@defaults backdrop-filter': {},
|
|
2334
|
-
'backdrop-filter':
|
|
2350
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2335
2351
|
}
|
|
2336
2352
|
},
|
|
2337
2353
|
},
|
|
@@ -2346,7 +2362,7 @@ export let corePlugins = {
|
|
|
2346
2362
|
return {
|
|
2347
2363
|
'--tw-backdrop-sepia': `sepia(${value})`,
|
|
2348
2364
|
'@defaults backdrop-filter': {},
|
|
2349
|
-
'backdrop-filter':
|
|
2365
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2350
2366
|
}
|
|
2351
2367
|
},
|
|
2352
2368
|
},
|
|
@@ -2354,35 +2370,22 @@ export let corePlugins = {
|
|
|
2354
2370
|
)
|
|
2355
2371
|
},
|
|
2356
2372
|
|
|
2357
|
-
backdropFilter: ({
|
|
2358
|
-
|
|
2359
|
-
'
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
'--tw-backdrop-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2369
|
-
'--tw-backdrop-filter': [
|
|
2370
|
-
'var(--tw-backdrop-blur)',
|
|
2371
|
-
'var(--tw-backdrop-brightness)',
|
|
2372
|
-
'var(--tw-backdrop-contrast)',
|
|
2373
|
-
'var(--tw-backdrop-grayscale)',
|
|
2374
|
-
'var(--tw-backdrop-hue-rotate)',
|
|
2375
|
-
'var(--tw-backdrop-invert)',
|
|
2376
|
-
'var(--tw-backdrop-opacity)',
|
|
2377
|
-
'var(--tw-backdrop-saturate)',
|
|
2378
|
-
'var(--tw-backdrop-sepia)',
|
|
2379
|
-
].join(' '),
|
|
2380
|
-
},
|
|
2373
|
+
backdropFilter: ({ addDefaults, addUtilities }) => {
|
|
2374
|
+
addDefaults('backdrop-filter', {
|
|
2375
|
+
'--tw-backdrop-blur': ' ',
|
|
2376
|
+
'--tw-backdrop-brightness': ' ',
|
|
2377
|
+
'--tw-backdrop-contrast': ' ',
|
|
2378
|
+
'--tw-backdrop-grayscale': ' ',
|
|
2379
|
+
'--tw-backdrop-hue-rotate': ' ',
|
|
2380
|
+
'--tw-backdrop-invert': ' ',
|
|
2381
|
+
'--tw-backdrop-opacity': ' ',
|
|
2382
|
+
'--tw-backdrop-saturate': ' ',
|
|
2383
|
+
'--tw-backdrop-sepia': ' ',
|
|
2381
2384
|
})
|
|
2382
2385
|
addUtilities({
|
|
2383
2386
|
'.backdrop-filter': {
|
|
2384
2387
|
'@defaults backdrop-filter': {},
|
|
2385
|
-
'backdrop-filter':
|
|
2388
|
+
'backdrop-filter': cssBackdropFilterValue,
|
|
2386
2389
|
},
|
|
2387
2390
|
'.backdrop-filter-none': { 'backdrop-filter': 'none' },
|
|
2388
2391
|
})
|
|
@@ -2422,5 +2425,7 @@ export let corePlugins = {
|
|
|
2422
2425
|
{ filterDefault: true }
|
|
2423
2426
|
),
|
|
2424
2427
|
willChange: createUtilityPlugin('willChange', [['will-change', ['will-change']]]),
|
|
2425
|
-
content: createUtilityPlugin('content'
|
|
2428
|
+
content: createUtilityPlugin('content', [
|
|
2429
|
+
['content', ['--tw-content', ['content', 'var(--tw-content)']]],
|
|
2430
|
+
]),
|
|
2426
2431
|
}
|