tailwindcss 0.0.0-insiders.aeaa2a3 → 0.0.0-insiders.b341813
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 +144 -2
- package/README.md +8 -4
- package/colors.js +2 -1
- package/defaultConfig.js +2 -1
- package/defaultTheme.js +2 -1
- package/lib/cli.js +33 -33
- package/lib/constants.js +1 -1
- package/lib/corePluginList.js +8 -1
- package/lib/corePlugins.js +405 -348
- package/lib/css/preflight.css +10 -4
- package/lib/featureFlags.js +6 -4
- package/lib/lib/collapseDuplicateDeclarations.js +29 -0
- package/lib/lib/defaultExtractor.js +41 -0
- package/lib/lib/detectNesting.js +17 -2
- package/lib/lib/evaluateTailwindFunctions.js +10 -6
- package/lib/lib/expandApplyAtRules.js +99 -10
- package/lib/lib/expandTailwindAtRules.js +27 -21
- package/lib/lib/generateRules.js +166 -19
- package/lib/lib/resolveDefaultsAtRules.js +25 -11
- package/lib/lib/setupContextUtils.js +110 -82
- package/lib/lib/sharedState.js +34 -2
- package/lib/lib/substituteScreenAtRules.js +7 -4
- package/lib/processTailwindFeatures.js +2 -0
- package/lib/util/buildMediaQuery.js +13 -24
- package/lib/util/color.js +23 -8
- package/lib/util/createUtilityPlugin.js +2 -2
- package/lib/util/dataTypes.js +38 -7
- package/lib/util/defaults.js +6 -0
- package/lib/util/formatVariantSelector.js +186 -0
- package/lib/util/isValidArbitraryValue.js +64 -0
- package/lib/util/log.js +4 -0
- package/lib/util/nameClass.js +1 -0
- package/lib/util/normalizeConfig.js +52 -12
- package/lib/util/normalizeScreens.js +61 -0
- package/lib/util/parseBoxShadowValue.js +77 -0
- package/lib/util/pluginUtils.js +21 -145
- package/lib/util/prefixSelector.js +1 -3
- package/lib/util/resolveConfig.js +21 -13
- package/lib/util/toPath.js +6 -1
- package/lib/util/transformThemeValue.js +23 -13
- package/package.json +16 -15
- package/peers/index.js +4525 -5531
- package/plugin.js +2 -1
- package/resolveConfig.js +2 -1
- package/src/cli.js +1 -1
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +372 -450
- package/src/css/preflight.css +10 -4
- package/src/featureFlags.js +5 -1
- package/src/lib/collapseDuplicateDeclarations.js +28 -0
- package/src/lib/defaultExtractor.js +47 -0
- package/src/lib/detectNesting.js +22 -3
- package/src/lib/evaluateTailwindFunctions.js +6 -3
- package/src/lib/expandApplyAtRules.js +101 -3
- package/src/lib/expandTailwindAtRules.js +25 -19
- package/src/lib/generateRules.js +178 -11
- package/src/lib/resolveDefaultsAtRules.js +28 -7
- package/src/lib/setupContextUtils.js +105 -69
- package/src/lib/sharedState.js +40 -1
- package/src/lib/substituteScreenAtRules.js +6 -3
- package/src/processTailwindFeatures.js +2 -0
- package/src/util/buildMediaQuery.js +14 -18
- package/src/util/color.js +20 -7
- package/src/util/dataTypes.js +43 -11
- package/src/util/defaults.js +6 -0
- package/src/util/formatVariantSelector.js +196 -0
- package/src/util/isValidArbitraryValue.js +61 -0
- package/src/util/log.js +4 -0
- package/src/util/nameClass.js +1 -1
- package/src/util/normalizeConfig.js +26 -1
- package/src/util/normalizeScreens.js +45 -0
- package/src/util/parseBoxShadowValue.js +71 -0
- package/src/util/pluginUtils.js +14 -137
- package/src/util/prefixSelector.js +1 -4
- package/src/util/resolveConfig.js +11 -1
- package/src/util/toPath.js +23 -1
- package/src/util/transformThemeValue.js +22 -7
- package/stubs/defaultConfig.stub.js +42 -16
package/lib/corePlugins.js
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports.
|
|
5
|
+
exports.corePlugins = exports.variantPlugins = void 0;
|
|
6
6
|
var _fs = _interopRequireDefault(require("fs"));
|
|
7
7
|
var path = _interopRequireWildcard(require("path"));
|
|
8
8
|
var _postcss = _interopRequireDefault(require("postcss"));
|
|
9
9
|
var _createUtilityPlugin = _interopRequireDefault(require("./util/createUtilityPlugin"));
|
|
10
10
|
var _buildMediaQuery = _interopRequireDefault(require("./util/buildMediaQuery"));
|
|
11
|
-
var _prefixSelector = _interopRequireDefault(require("./util/prefixSelector"));
|
|
12
11
|
var _parseAnimationValue = _interopRequireDefault(require("./util/parseAnimationValue"));
|
|
13
12
|
var _flattenColorPalette = _interopRequireDefault(require("./util/flattenColorPalette"));
|
|
14
13
|
var _withAlphaVariable = _interopRequireWildcard(require("./util/withAlphaVariable"));
|
|
15
14
|
var _toColorValue = _interopRequireDefault(require("./util/toColorValue"));
|
|
16
15
|
var _isPlainObject = _interopRequireDefault(require("./util/isPlainObject"));
|
|
17
16
|
var _transformThemeValue = _interopRequireDefault(require("./util/transformThemeValue"));
|
|
18
|
-
var _pluginUtils = require("./util/pluginUtils");
|
|
19
17
|
var _packageJson = require("../package.json");
|
|
20
18
|
var _log = _interopRequireDefault(require("./util/log"));
|
|
19
|
+
var _normalizeScreens = require("./util/normalizeScreens");
|
|
20
|
+
var _parseBoxShadowValue = require("./util/parseBoxShadowValue");
|
|
21
21
|
function _interopRequireDefault(obj) {
|
|
22
22
|
return obj && obj.__esModule ? obj : {
|
|
23
23
|
default: obj
|
|
@@ -47,54 +47,21 @@ function _interopRequireWildcard(obj) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
let variantPlugins = {
|
|
50
|
-
pseudoElementVariants: ({
|
|
51
|
-
addVariant('first-letter',
|
|
52
|
-
|
|
53
|
-
return withPseudo(`first-letter${config('separator')}${className}`, '::first-letter');
|
|
54
|
-
});
|
|
55
|
-
}));
|
|
56
|
-
addVariant('first-line', (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
57
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
58
|
-
return withPseudo(`first-line${config('separator')}${className}`, '::first-line');
|
|
59
|
-
});
|
|
60
|
-
}));
|
|
50
|
+
pseudoElementVariants: ({ addVariant })=>{
|
|
51
|
+
addVariant('first-letter', '&::first-letter');
|
|
52
|
+
addVariant('first-line', '&::first-line');
|
|
61
53
|
addVariant('marker', [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return `marker${config('separator')}${className}`;
|
|
65
|
-
});
|
|
66
|
-
return `${variantSelector} *::marker`;
|
|
67
|
-
}),
|
|
68
|
-
(0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
69
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
70
|
-
return withPseudo(`marker${config('separator')}${className}`, '::marker');
|
|
71
|
-
});
|
|
72
|
-
}),
|
|
54
|
+
'& *::marker',
|
|
55
|
+
'&::marker'
|
|
73
56
|
]);
|
|
74
57
|
addVariant('selection', [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return `selection${config('separator')}${className}`;
|
|
78
|
-
});
|
|
79
|
-
return `${variantSelector} *::selection`;
|
|
80
|
-
}),
|
|
81
|
-
(0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
82
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
83
|
-
return withPseudo(`selection${config('separator')}${className}`, '::selection');
|
|
84
|
-
});
|
|
85
|
-
}),
|
|
58
|
+
'& *::selection',
|
|
59
|
+
'&::selection'
|
|
86
60
|
]);
|
|
87
|
-
addVariant('file',
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}));
|
|
92
|
-
addVariant('before', (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
93
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
94
|
-
return withPseudo(`before${config('separator')}${className}`, '::before');
|
|
95
|
-
});
|
|
96
|
-
}, {
|
|
97
|
-
withRule: (rule)=>{
|
|
61
|
+
addVariant('file', '&::file-selector-button');
|
|
62
|
+
addVariant('placeholder', '&::placeholder');
|
|
63
|
+
addVariant('before', ({ container })=>{
|
|
64
|
+
container.walkRules((rule)=>{
|
|
98
65
|
let foundContent = false;
|
|
99
66
|
rule.walkDecls('content', ()=>{
|
|
100
67
|
foundContent = true;
|
|
@@ -102,17 +69,14 @@ let variantPlugins = {
|
|
|
102
69
|
if (!foundContent) {
|
|
103
70
|
rule.prepend(_postcss.default.decl({
|
|
104
71
|
prop: 'content',
|
|
105
|
-
value: '
|
|
72
|
+
value: 'var(--tw-content)'
|
|
106
73
|
}));
|
|
107
74
|
}
|
|
108
|
-
}
|
|
109
|
-
}));
|
|
110
|
-
addVariant('after', (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
111
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
112
|
-
return withPseudo(`after${config('separator')}${className}`, '::after');
|
|
113
75
|
});
|
|
114
|
-
|
|
115
|
-
|
|
76
|
+
return '&::before';
|
|
77
|
+
});
|
|
78
|
+
addVariant('after', ({ container })=>{
|
|
79
|
+
container.walkRules((rule)=>{
|
|
116
80
|
let foundContent = false;
|
|
117
81
|
rule.walkDecls('content', ()=>{
|
|
118
82
|
foundContent = true;
|
|
@@ -120,13 +84,14 @@ let variantPlugins = {
|
|
|
120
84
|
if (!foundContent) {
|
|
121
85
|
rule.prepend(_postcss.default.decl({
|
|
122
86
|
prop: 'content',
|
|
123
|
-
value: '
|
|
87
|
+
value: 'var(--tw-content)'
|
|
124
88
|
}));
|
|
125
89
|
}
|
|
126
|
-
}
|
|
127
|
-
|
|
90
|
+
});
|
|
91
|
+
return '&::after';
|
|
92
|
+
});
|
|
128
93
|
},
|
|
129
|
-
pseudoClassVariants: ({
|
|
94
|
+
pseudoClassVariants: ({ addVariant })=>{
|
|
130
95
|
let pseudoVariants = [
|
|
131
96
|
// Positional
|
|
132
97
|
[
|
|
@@ -180,94 +145,40 @@ let variantPlugins = {
|
|
|
180
145
|
'focus-visible',
|
|
181
146
|
'active',
|
|
182
147
|
'disabled',
|
|
183
|
-
]
|
|
184
|
-
for (let variant of pseudoVariants){
|
|
185
|
-
let [variantName, state] = Array.isArray(variant) ? variant : [
|
|
148
|
+
].map((variant)=>Array.isArray(variant) ? variant : [
|
|
186
149
|
variant,
|
|
187
150
|
`:${variant}`
|
|
188
|
-
]
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
} else if (state.startsWith('[')) {
|
|
193
|
-
return withAttr(`${variantName}${config('separator')}${className}`, state);
|
|
194
|
-
}
|
|
195
|
-
}));
|
|
151
|
+
]
|
|
152
|
+
);
|
|
153
|
+
for (let [variantName, state] of pseudoVariants){
|
|
154
|
+
addVariant(variantName, `&${state}`);
|
|
196
155
|
}
|
|
197
|
-
let
|
|
198
|
-
|
|
199
|
-
let [variantName, state] = Array.isArray(variant1) ? variant1 : [
|
|
200
|
-
variant1,
|
|
201
|
-
`:${variant1}`
|
|
202
|
-
];
|
|
203
|
-
let groupVariantName = `group-${variantName}`;
|
|
204
|
-
addVariant(groupVariantName, (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
205
|
-
let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
|
|
206
|
-
if (`.${className}` === groupMarker) return className;
|
|
207
|
-
return `${groupVariantName}${config('separator')}${className}`;
|
|
208
|
-
});
|
|
209
|
-
if (variantSelector === selector) {
|
|
210
|
-
return null;
|
|
211
|
-
}
|
|
212
|
-
return (0, _pluginUtils).applyStateToMarker(variantSelector, groupMarker, state, (marker, selector)=>`${marker} ${selector}`
|
|
213
|
-
);
|
|
214
|
-
}));
|
|
156
|
+
for (let [variantName1, state1] of pseudoVariants){
|
|
157
|
+
addVariant(`group-${variantName1}`, `:merge(.group)${state1} &`);
|
|
215
158
|
}
|
|
216
|
-
let
|
|
217
|
-
|
|
218
|
-
let [variantName, state] = Array.isArray(variant2) ? variant2 : [
|
|
219
|
-
variant2,
|
|
220
|
-
`:${variant2}`
|
|
221
|
-
];
|
|
222
|
-
let peerVariantName = `peer-${variantName}`;
|
|
223
|
-
addVariant(peerVariantName, (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
224
|
-
let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
|
|
225
|
-
if (`.${className}` === peerMarker) return className;
|
|
226
|
-
return `${peerVariantName}${config('separator')}${className}`;
|
|
227
|
-
});
|
|
228
|
-
if (variantSelector === selector) {
|
|
229
|
-
return null;
|
|
230
|
-
}
|
|
231
|
-
return (0, _pluginUtils).applyStateToMarker(variantSelector, peerMarker, state, (marker, selector)=>selector.trim().startsWith('~') ? `${marker}${selector}` : `${marker} ~ ${selector}`
|
|
232
|
-
);
|
|
233
|
-
}));
|
|
159
|
+
for (let [variantName2, state2] of pseudoVariants){
|
|
160
|
+
addVariant(`peer-${variantName2}`, `:merge(.peer)${state2} ~ &`);
|
|
234
161
|
}
|
|
235
162
|
},
|
|
236
|
-
directionVariants: ({
|
|
237
|
-
addVariant('ltr', (
|
|
163
|
+
directionVariants: ({ addVariant })=>{
|
|
164
|
+
addVariant('ltr', ()=>{
|
|
238
165
|
_log.default.warn('rtl-experimental', [
|
|
239
166
|
'The RTL features in Tailwind CSS are currently in preview.',
|
|
240
167
|
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
|
|
241
168
|
]);
|
|
242
|
-
return
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
addVariant('rtl', (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
169
|
+
return '[dir="ltr"] &';
|
|
170
|
+
});
|
|
171
|
+
addVariant('rtl', ()=>{
|
|
246
172
|
_log.default.warn('rtl-experimental', [
|
|
247
173
|
'The RTL features in Tailwind CSS are currently in preview.',
|
|
248
174
|
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
|
|
249
175
|
]);
|
|
250
|
-
return
|
|
251
|
-
|
|
252
|
-
}));
|
|
176
|
+
return '[dir="rtl"] &';
|
|
177
|
+
});
|
|
253
178
|
},
|
|
254
|
-
reducedMotionVariants: ({
|
|
255
|
-
addVariant('motion-safe', (
|
|
256
|
-
|
|
257
|
-
}, {
|
|
258
|
-
wrap: ()=>_postcss.default.atRule({
|
|
259
|
-
name: 'media',
|
|
260
|
-
params: '(prefers-reduced-motion: no-preference)'
|
|
261
|
-
})
|
|
262
|
-
}));
|
|
263
|
-
addVariant('motion-reduce', (0, _pluginUtils).transformLastClasses((className)=>{
|
|
264
|
-
return `motion-reduce${config('separator')}${className}`;
|
|
265
|
-
}, {
|
|
266
|
-
wrap: ()=>_postcss.default.atRule({
|
|
267
|
-
name: 'media',
|
|
268
|
-
params: '(prefers-reduced-motion: reduce)'
|
|
269
|
-
})
|
|
270
|
-
}));
|
|
179
|
+
reducedMotionVariants: ({ addVariant })=>{
|
|
180
|
+
addVariant('motion-safe', '@media (prefers-reduced-motion: no-preference)');
|
|
181
|
+
addVariant('motion-reduce', '@media (prefers-reduced-motion: reduce)');
|
|
271
182
|
},
|
|
272
183
|
darkVariants: ({ config , addVariant })=>{
|
|
273
184
|
let mode = config('darkMode', 'media');
|
|
@@ -279,40 +190,23 @@ let variantPlugins = {
|
|
|
279
190
|
]);
|
|
280
191
|
}
|
|
281
192
|
if (mode === 'class') {
|
|
282
|
-
addVariant('dark',
|
|
283
|
-
let variantSelector = (0, _pluginUtils).updateLastClasses(selector, (className)=>{
|
|
284
|
-
return `dark${config('separator')}${className}`;
|
|
285
|
-
});
|
|
286
|
-
if (variantSelector === selector) {
|
|
287
|
-
return null;
|
|
288
|
-
}
|
|
289
|
-
let darkSelector = (0, _prefixSelector).default(config('prefix'), `.dark`);
|
|
290
|
-
return `${darkSelector} ${variantSelector}`;
|
|
291
|
-
}));
|
|
193
|
+
addVariant('dark', '.dark &');
|
|
292
194
|
} else if (mode === 'media') {
|
|
293
|
-
addVariant('dark', (
|
|
294
|
-
return `dark${config('separator')}${className}`;
|
|
295
|
-
}, {
|
|
296
|
-
wrap: ()=>_postcss.default.atRule({
|
|
297
|
-
name: 'media',
|
|
298
|
-
params: '(prefers-color-scheme: dark)'
|
|
299
|
-
})
|
|
300
|
-
}));
|
|
195
|
+
addVariant('dark', '@media (prefers-color-scheme: dark)');
|
|
301
196
|
}
|
|
302
197
|
},
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
wrap: ()=>_postcss.default.atRule({
|
|
311
|
-
name: 'media',
|
|
312
|
-
params: query
|
|
313
|
-
})
|
|
314
|
-
}));
|
|
198
|
+
printVariant: ({ addVariant })=>{
|
|
199
|
+
addVariant('print', '@media print');
|
|
200
|
+
},
|
|
201
|
+
screenVariants: ({ theme , addVariant })=>{
|
|
202
|
+
for (let screen of (0, _normalizeScreens).normalizeScreens(theme('screens'))){
|
|
203
|
+
let query = (0, _buildMediaQuery).default(screen);
|
|
204
|
+
addVariant(screen.name, `@media ${query}`);
|
|
315
205
|
}
|
|
206
|
+
},
|
|
207
|
+
orientationVariants: ({ addVariant })=>{
|
|
208
|
+
addVariant('portrait', '@media (orientation: portrait)');
|
|
209
|
+
addVariant('landscape', '@media (orientation: landscape)');
|
|
316
210
|
}
|
|
317
211
|
};
|
|
318
212
|
exports.variantPlugins = variantPlugins;
|
|
@@ -327,27 +221,11 @@ let corePlugins = {
|
|
|
327
221
|
]);
|
|
328
222
|
},
|
|
329
223
|
container: (()=>{
|
|
330
|
-
function extractMinWidths(breakpoints) {
|
|
331
|
-
return
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
min: breakpoints
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
if (!Array.isArray(breakpoints)) {
|
|
339
|
-
breakpoints = [
|
|
340
|
-
breakpoints
|
|
341
|
-
];
|
|
342
|
-
}
|
|
343
|
-
return breakpoints.filter((breakpoint)=>{
|
|
344
|
-
var ref;
|
|
345
|
-
return (breakpoint === null || breakpoint === void 0 ? void 0 : (ref = breakpoint.hasOwnProperty) === null || ref === void 0 ? void 0 : ref.call(breakpoint, 'min')) || (breakpoint === null || breakpoint === void 0 ? void 0 : breakpoint.hasOwnProperty('min-width'));
|
|
346
|
-
}).map((breakpoint)=>{
|
|
347
|
-
var ref;
|
|
348
|
-
return (ref = breakpoint['min-width']) !== null && ref !== void 0 ? ref : breakpoint.min;
|
|
349
|
-
});
|
|
350
|
-
});
|
|
224
|
+
function extractMinWidths(breakpoints = []) {
|
|
225
|
+
return breakpoints.flatMap((breakpoint1)=>breakpoint1.values.map((breakpoint)=>breakpoint.min
|
|
226
|
+
)
|
|
227
|
+
).filter((v)=>v !== undefined
|
|
228
|
+
);
|
|
351
229
|
}
|
|
352
230
|
function mapMinWidthsToPadding(minWidths, screens, paddings) {
|
|
353
231
|
if (typeof paddings === 'undefined') {
|
|
@@ -371,25 +249,25 @@ let corePlugins = {
|
|
|
371
249
|
});
|
|
372
250
|
}
|
|
373
251
|
for (let minWidth of minWidths){
|
|
374
|
-
for (let
|
|
375
|
-
let
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
}
|
|
252
|
+
for (let screen of screens){
|
|
253
|
+
for (let { min } of screen.values){
|
|
254
|
+
if (min === minWidth) {
|
|
255
|
+
mapping.push({
|
|
256
|
+
minWidth,
|
|
257
|
+
padding: paddings[screen.name]
|
|
258
|
+
});
|
|
259
|
+
}
|
|
382
260
|
}
|
|
383
261
|
}
|
|
384
262
|
}
|
|
385
263
|
return mapping;
|
|
386
264
|
}
|
|
387
265
|
return function({ addComponents , theme }) {
|
|
388
|
-
let screens = theme('container.screens', theme('screens'));
|
|
266
|
+
let screens = (0, _normalizeScreens).normalizeScreens(theme('container.screens', theme('screens')));
|
|
389
267
|
let minWidths = extractMinWidths(screens);
|
|
390
268
|
let paddings = mapMinWidthsToPadding(minWidths, screens, theme('container.padding'));
|
|
391
269
|
let generatePaddingFor = (minWidth)=>{
|
|
392
|
-
let paddingConfig = paddings.find((padding)
|
|
270
|
+
let paddingConfig = paddings.find((padding)=>padding.minWidth === minWidth
|
|
393
271
|
);
|
|
394
272
|
if (!paddingConfig) {
|
|
395
273
|
return {
|
|
@@ -1033,27 +911,27 @@ let corePlugins = {
|
|
|
1033
911
|
],
|
|
1034
912
|
],
|
|
1035
913
|
],
|
|
1036
|
-
]
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
914
|
+
], {
|
|
915
|
+
supportsNegativeValues: true
|
|
916
|
+
}),
|
|
917
|
+
transform: ({ addDefaults , addUtilities })=>{
|
|
918
|
+
addDefaults('transform', {
|
|
919
|
+
'--tw-translate-x': '0',
|
|
920
|
+
'--tw-translate-y': '0',
|
|
921
|
+
'--tw-rotate': '0',
|
|
922
|
+
'--tw-skew-x': '0',
|
|
923
|
+
'--tw-skew-y': '0',
|
|
924
|
+
'--tw-scale-x': '1',
|
|
925
|
+
'--tw-scale-y': '1',
|
|
926
|
+
'--tw-transform': [
|
|
927
|
+
'translateX(var(--tw-translate-x))',
|
|
928
|
+
'translateY(var(--tw-translate-y))',
|
|
929
|
+
'rotate(var(--tw-rotate))',
|
|
930
|
+
'skewX(var(--tw-skew-x))',
|
|
931
|
+
'skewY(var(--tw-skew-y))',
|
|
932
|
+
'scaleX(var(--tw-scale-x))',
|
|
933
|
+
'scaleY(var(--tw-scale-y))',
|
|
934
|
+
].join(' ')
|
|
1057
935
|
});
|
|
1058
936
|
addUtilities({
|
|
1059
937
|
'.transform': {
|
|
@@ -1101,8 +979,8 @@ let corePlugins = {
|
|
|
1101
979
|
];
|
|
1102
980
|
}));
|
|
1103
981
|
matchUtilities({
|
|
1104
|
-
animate: (
|
|
1105
|
-
let animations = (0, _parseAnimationValue).default(
|
|
982
|
+
animate: (value1)=>{
|
|
983
|
+
let animations = (0, _parseAnimationValue).default(value1);
|
|
1106
984
|
return [
|
|
1107
985
|
...animations.flatMap((animation)=>keyframes[animation.name]
|
|
1108
986
|
),
|
|
@@ -1121,7 +999,13 @@ let corePlugins = {
|
|
|
1121
999
|
});
|
|
1122
1000
|
},
|
|
1123
1001
|
cursor: (0, _createUtilityPlugin).default('cursor'),
|
|
1124
|
-
touchAction: ({ addUtilities })=>{
|
|
1002
|
+
touchAction: ({ addDefaults , addUtilities })=>{
|
|
1003
|
+
addDefaults('touch-action', {
|
|
1004
|
+
'--tw-pan-x': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1005
|
+
'--tw-pan-y': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1006
|
+
'--tw-pinch-zoom': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1007
|
+
'--tw-touch-action': 'var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)'
|
|
1008
|
+
});
|
|
1125
1009
|
addUtilities({
|
|
1126
1010
|
'.touch-auto': {
|
|
1127
1011
|
'touch-action': 'auto'
|
|
@@ -1130,25 +1014,46 @@ let corePlugins = {
|
|
|
1130
1014
|
'touch-action': 'none'
|
|
1131
1015
|
},
|
|
1132
1016
|
'.touch-pan-x': {
|
|
1133
|
-
'touch-action':
|
|
1017
|
+
'@defaults touch-action': {
|
|
1018
|
+
},
|
|
1019
|
+
'--tw-pan-x': 'pan-x',
|
|
1020
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1134
1021
|
},
|
|
1135
1022
|
'.touch-pan-left': {
|
|
1136
|
-
'touch-action':
|
|
1023
|
+
'@defaults touch-action': {
|
|
1024
|
+
},
|
|
1025
|
+
'--tw-pan-x': 'pan-left',
|
|
1026
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1137
1027
|
},
|
|
1138
1028
|
'.touch-pan-right': {
|
|
1139
|
-
'touch-action':
|
|
1029
|
+
'@defaults touch-action': {
|
|
1030
|
+
},
|
|
1031
|
+
'--tw-pan-x': 'pan-right',
|
|
1032
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1140
1033
|
},
|
|
1141
1034
|
'.touch-pan-y': {
|
|
1142
|
-
'touch-action':
|
|
1035
|
+
'@defaults touch-action': {
|
|
1036
|
+
},
|
|
1037
|
+
'--tw-pan-y': 'pan-y',
|
|
1038
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1143
1039
|
},
|
|
1144
1040
|
'.touch-pan-up': {
|
|
1145
|
-
'touch-action':
|
|
1041
|
+
'@defaults touch-action': {
|
|
1042
|
+
},
|
|
1043
|
+
'--tw-pan-y': 'pan-up',
|
|
1044
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1146
1045
|
},
|
|
1147
1046
|
'.touch-pan-down': {
|
|
1148
|
-
'touch-action':
|
|
1047
|
+
'@defaults touch-action': {
|
|
1048
|
+
},
|
|
1049
|
+
'--tw-pan-y': 'pan-down',
|
|
1050
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1149
1051
|
},
|
|
1150
1052
|
'.touch-pinch-zoom': {
|
|
1151
|
-
'touch-action':
|
|
1053
|
+
'@defaults touch-action': {
|
|
1054
|
+
},
|
|
1055
|
+
'--tw-pinch-zoom': 'pinch-zoom',
|
|
1056
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1152
1057
|
},
|
|
1153
1058
|
'.touch-manipulation': {
|
|
1154
1059
|
'touch-action': 'manipulation'
|
|
@@ -1187,11 +1092,9 @@ let corePlugins = {
|
|
|
1187
1092
|
}
|
|
1188
1093
|
});
|
|
1189
1094
|
},
|
|
1190
|
-
scrollSnapType: ({
|
|
1191
|
-
|
|
1192
|
-
'
|
|
1193
|
-
'--tw-scroll-snap-strictness': 'proximity'
|
|
1194
|
-
}
|
|
1095
|
+
scrollSnapType: ({ addDefaults , addUtilities })=>{
|
|
1096
|
+
addDefaults('scroll-snap-type', {
|
|
1097
|
+
'--tw-scroll-snap-strictness': 'proximity'
|
|
1195
1098
|
});
|
|
1196
1099
|
addUtilities({
|
|
1197
1100
|
'.snap-none': {
|
|
@@ -1772,10 +1675,10 @@ let corePlugins = {
|
|
|
1772
1675
|
}
|
|
1773
1676
|
});
|
|
1774
1677
|
},
|
|
1775
|
-
divideColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
1678
|
+
divideColor: ({ matchUtilities , theme , corePlugins: corePlugins1 })=>{
|
|
1776
1679
|
matchUtilities({
|
|
1777
1680
|
divide: (value)=>{
|
|
1778
|
-
if (!
|
|
1681
|
+
if (!corePlugins1('divideOpacity')) {
|
|
1779
1682
|
return {
|
|
1780
1683
|
['& > :not([hidden]) ~ :not([hidden])']: {
|
|
1781
1684
|
'border-color': (0, _toColorValue).default(value)
|
|
@@ -2186,26 +2089,22 @@ let corePlugins = {
|
|
|
2186
2089
|
}
|
|
2187
2090
|
});
|
|
2188
2091
|
},
|
|
2189
|
-
borderColor: ({
|
|
2190
|
-
if (!
|
|
2092
|
+
borderColor: ({ addDefaults , matchUtilities , theme , corePlugins: corePlugins2 })=>{
|
|
2093
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2191
2094
|
let value = theme('borderColor.DEFAULT', 'currentColor');
|
|
2192
|
-
|
|
2193
|
-
'
|
|
2194
|
-
'border-color': (0, _toColorValue).default(value)
|
|
2195
|
-
}
|
|
2095
|
+
addDefaults('border-width', {
|
|
2096
|
+
'border-color': (0, _toColorValue).default(value)
|
|
2196
2097
|
});
|
|
2197
2098
|
} else {
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
})
|
|
2204
|
-
});
|
|
2099
|
+
addDefaults('border-width', (0, _withAlphaVariable).default({
|
|
2100
|
+
color: theme('borderColor.DEFAULT', 'currentColor'),
|
|
2101
|
+
property: 'border-color',
|
|
2102
|
+
variable: '--tw-border-opacity'
|
|
2103
|
+
}));
|
|
2205
2104
|
}
|
|
2206
2105
|
matchUtilities({
|
|
2207
2106
|
border: (value)=>{
|
|
2208
|
-
if (!
|
|
2107
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2209
2108
|
return {
|
|
2210
2109
|
'border-color': (0, _toColorValue).default(value)
|
|
2211
2110
|
};
|
|
@@ -2225,7 +2124,7 @@ let corePlugins = {
|
|
|
2225
2124
|
});
|
|
2226
2125
|
matchUtilities({
|
|
2227
2126
|
'border-x': (value)=>{
|
|
2228
|
-
if (!
|
|
2127
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2229
2128
|
return {
|
|
2230
2129
|
'border-left-color': (0, _toColorValue).default(value),
|
|
2231
2130
|
'border-right-color': (0, _toColorValue).default(value)
|
|
@@ -2241,7 +2140,7 @@ let corePlugins = {
|
|
|
2241
2140
|
});
|
|
2242
2141
|
},
|
|
2243
2142
|
'border-y': (value)=>{
|
|
2244
|
-
if (!
|
|
2143
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2245
2144
|
return {
|
|
2246
2145
|
'border-top-color': (0, _toColorValue).default(value),
|
|
2247
2146
|
'border-bottom-color': (0, _toColorValue).default(value)
|
|
@@ -2263,7 +2162,7 @@ let corePlugins = {
|
|
|
2263
2162
|
});
|
|
2264
2163
|
matchUtilities({
|
|
2265
2164
|
'border-t': (value)=>{
|
|
2266
|
-
if (!
|
|
2165
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2267
2166
|
return {
|
|
2268
2167
|
'border-top-color': (0, _toColorValue).default(value)
|
|
2269
2168
|
};
|
|
@@ -2275,7 +2174,7 @@ let corePlugins = {
|
|
|
2275
2174
|
});
|
|
2276
2175
|
},
|
|
2277
2176
|
'border-r': (value)=>{
|
|
2278
|
-
if (!
|
|
2177
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2279
2178
|
return {
|
|
2280
2179
|
'border-right-color': (0, _toColorValue).default(value)
|
|
2281
2180
|
};
|
|
@@ -2287,7 +2186,7 @@ let corePlugins = {
|
|
|
2287
2186
|
});
|
|
2288
2187
|
},
|
|
2289
2188
|
'border-b': (value)=>{
|
|
2290
|
-
if (!
|
|
2189
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2291
2190
|
return {
|
|
2292
2191
|
'border-bottom-color': (0, _toColorValue).default(value)
|
|
2293
2192
|
};
|
|
@@ -2299,7 +2198,7 @@ let corePlugins = {
|
|
|
2299
2198
|
});
|
|
2300
2199
|
},
|
|
2301
2200
|
'border-l': (value)=>{
|
|
2302
|
-
if (!
|
|
2201
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2303
2202
|
return {
|
|
2304
2203
|
'border-left-color': (0, _toColorValue).default(value)
|
|
2305
2204
|
};
|
|
@@ -2324,10 +2223,10 @@ let corePlugins = {
|
|
|
2324
2223
|
]
|
|
2325
2224
|
],
|
|
2326
2225
|
]),
|
|
2327
|
-
backgroundColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
2226
|
+
backgroundColor: ({ matchUtilities , theme , corePlugins: corePlugins3 })=>{
|
|
2328
2227
|
matchUtilities({
|
|
2329
2228
|
bg: (value)=>{
|
|
2330
|
-
if (!
|
|
2229
|
+
if (!corePlugins3('backgroundOpacity')) {
|
|
2331
2230
|
return {
|
|
2332
2231
|
'background-color': (0, _toColorValue).default(value)
|
|
2333
2232
|
};
|
|
@@ -2408,6 +2307,12 @@ let corePlugins = {
|
|
|
2408
2307
|
},
|
|
2409
2308
|
'.decoration-clone': {
|
|
2410
2309
|
'box-decoration-break': 'clone'
|
|
2310
|
+
},
|
|
2311
|
+
'.box-decoration-slice': {
|
|
2312
|
+
'box-decoration-break': 'slice'
|
|
2313
|
+
},
|
|
2314
|
+
'.box-decoration-clone': {
|
|
2315
|
+
'box-decoration-break': 'clone'
|
|
2411
2316
|
}
|
|
2412
2317
|
});
|
|
2413
2318
|
},
|
|
@@ -2768,40 +2673,64 @@ let corePlugins = {
|
|
|
2768
2673
|
},
|
|
2769
2674
|
fontVariantNumeric: ({ addUtilities })=>{
|
|
2770
2675
|
addUtilities({
|
|
2771
|
-
'
|
|
2676
|
+
'@defaults font-variant-numeric': {
|
|
2772
2677
|
'--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2773
2678
|
'--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2774
2679
|
'--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2775
2680
|
'--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2776
2681
|
'--tw-numeric-fraction': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2777
|
-
'font-variant-numeric': 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
|
|
2682
|
+
'--tw-font-variant-numeric': 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
|
|
2778
2683
|
},
|
|
2779
2684
|
'.normal-nums': {
|
|
2780
2685
|
'font-variant-numeric': 'normal'
|
|
2781
2686
|
},
|
|
2782
2687
|
'.ordinal': {
|
|
2783
|
-
'
|
|
2688
|
+
'@defaults font-variant-numeric': {
|
|
2689
|
+
},
|
|
2690
|
+
'--tw-ordinal': 'ordinal',
|
|
2691
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2784
2692
|
},
|
|
2785
2693
|
'.slashed-zero': {
|
|
2786
|
-
'
|
|
2694
|
+
'@defaults font-variant-numeric': {
|
|
2695
|
+
},
|
|
2696
|
+
'--tw-slashed-zero': 'slashed-zero',
|
|
2697
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2787
2698
|
},
|
|
2788
2699
|
'.lining-nums': {
|
|
2789
|
-
'
|
|
2700
|
+
'@defaults font-variant-numeric': {
|
|
2701
|
+
},
|
|
2702
|
+
'--tw-numeric-figure': 'lining-nums',
|
|
2703
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2790
2704
|
},
|
|
2791
2705
|
'.oldstyle-nums': {
|
|
2792
|
-
'
|
|
2706
|
+
'@defaults font-variant-numeric': {
|
|
2707
|
+
},
|
|
2708
|
+
'--tw-numeric-figure': 'oldstyle-nums',
|
|
2709
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2793
2710
|
},
|
|
2794
2711
|
'.proportional-nums': {
|
|
2795
|
-
'
|
|
2712
|
+
'@defaults font-variant-numeric': {
|
|
2713
|
+
},
|
|
2714
|
+
'--tw-numeric-spacing': 'proportional-nums',
|
|
2715
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2796
2716
|
},
|
|
2797
2717
|
'.tabular-nums': {
|
|
2798
|
-
'
|
|
2718
|
+
'@defaults font-variant-numeric': {
|
|
2719
|
+
},
|
|
2720
|
+
'--tw-numeric-spacing': 'tabular-nums',
|
|
2721
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2799
2722
|
},
|
|
2800
2723
|
'.diagonal-fractions': {
|
|
2801
|
-
'
|
|
2724
|
+
'@defaults font-variant-numeric': {
|
|
2725
|
+
},
|
|
2726
|
+
'--tw-numeric-fraction': 'diagonal-fractions',
|
|
2727
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2802
2728
|
},
|
|
2803
2729
|
'.stacked-fractions': {
|
|
2804
|
-
'
|
|
2730
|
+
'@defaults font-variant-numeric': {
|
|
2731
|
+
},
|
|
2732
|
+
'--tw-numeric-fraction': 'stacked-fractions',
|
|
2733
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2805
2734
|
}
|
|
2806
2735
|
});
|
|
2807
2736
|
},
|
|
@@ -2823,10 +2752,10 @@ let corePlugins = {
|
|
|
2823
2752
|
], {
|
|
2824
2753
|
supportsNegativeValues: true
|
|
2825
2754
|
}),
|
|
2826
|
-
textColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
2755
|
+
textColor: ({ matchUtilities , theme , corePlugins: corePlugins4 })=>{
|
|
2827
2756
|
matchUtilities({
|
|
2828
2757
|
text: (value)=>{
|
|
2829
|
-
if (!
|
|
2758
|
+
if (!corePlugins4('textOpacity')) {
|
|
2830
2759
|
return {
|
|
2831
2760
|
color: (0, _toColorValue).default(value)
|
|
2832
2761
|
};
|
|
@@ -2853,13 +2782,16 @@ let corePlugins = {
|
|
|
2853
2782
|
textDecoration: ({ addUtilities })=>{
|
|
2854
2783
|
addUtilities({
|
|
2855
2784
|
'.underline': {
|
|
2856
|
-
'text-decoration': 'underline'
|
|
2785
|
+
'text-decoration-line': 'underline'
|
|
2786
|
+
},
|
|
2787
|
+
'.overline': {
|
|
2788
|
+
'text-decoration-line': 'overline'
|
|
2857
2789
|
},
|
|
2858
2790
|
'.line-through': {
|
|
2859
|
-
'text-decoration': 'line-through'
|
|
2791
|
+
'text-decoration-line': 'line-through'
|
|
2860
2792
|
},
|
|
2861
2793
|
'.no-underline': {
|
|
2862
|
-
'text-decoration': 'none'
|
|
2794
|
+
'text-decoration-line': 'none'
|
|
2863
2795
|
}
|
|
2864
2796
|
});
|
|
2865
2797
|
},
|
|
@@ -2873,11 +2805,55 @@ let corePlugins = {
|
|
|
2873
2805
|
}, {
|
|
2874
2806
|
values: (0, _flattenColorPalette).default(theme('textDecorationColor')),
|
|
2875
2807
|
type: [
|
|
2876
|
-
'color'
|
|
2877
|
-
'any'
|
|
2808
|
+
'color'
|
|
2878
2809
|
]
|
|
2879
2810
|
});
|
|
2880
2811
|
},
|
|
2812
|
+
textDecorationStyle: ({ addUtilities })=>{
|
|
2813
|
+
addUtilities({
|
|
2814
|
+
'.decoration-solid': {
|
|
2815
|
+
'text-decoration-style': 'solid'
|
|
2816
|
+
},
|
|
2817
|
+
'.decoration-double': {
|
|
2818
|
+
'text-decoration-style': 'double'
|
|
2819
|
+
},
|
|
2820
|
+
'.decoration-dotted': {
|
|
2821
|
+
'text-decoration-style': 'dotted'
|
|
2822
|
+
},
|
|
2823
|
+
'.decoration-dashed': {
|
|
2824
|
+
'text-decoration-style': 'dashed'
|
|
2825
|
+
},
|
|
2826
|
+
'.decoration-wavy': {
|
|
2827
|
+
'text-decoration-style': 'wavy'
|
|
2828
|
+
}
|
|
2829
|
+
});
|
|
2830
|
+
},
|
|
2831
|
+
textDecorationThickness: (0, _createUtilityPlugin).default('textDecorationThickness', [
|
|
2832
|
+
[
|
|
2833
|
+
'decoration',
|
|
2834
|
+
[
|
|
2835
|
+
'text-decoration-thickness'
|
|
2836
|
+
]
|
|
2837
|
+
]
|
|
2838
|
+
], {
|
|
2839
|
+
type: [
|
|
2840
|
+
'length',
|
|
2841
|
+
'percentage'
|
|
2842
|
+
]
|
|
2843
|
+
}),
|
|
2844
|
+
textUnderlineOffset: (0, _createUtilityPlugin).default('textUnderlineOffset', [
|
|
2845
|
+
[
|
|
2846
|
+
'underline-offset',
|
|
2847
|
+
[
|
|
2848
|
+
'text-underline-offset'
|
|
2849
|
+
]
|
|
2850
|
+
]
|
|
2851
|
+
], {
|
|
2852
|
+
type: [
|
|
2853
|
+
'length',
|
|
2854
|
+
'percentage'
|
|
2855
|
+
]
|
|
2856
|
+
}),
|
|
2881
2857
|
fontSmoothing: ({ addUtilities })=>{
|
|
2882
2858
|
addUtilities({
|
|
2883
2859
|
'.antialiased': {
|
|
@@ -2890,10 +2866,10 @@ let corePlugins = {
|
|
|
2890
2866
|
}
|
|
2891
2867
|
});
|
|
2892
2868
|
},
|
|
2893
|
-
placeholderColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
2869
|
+
placeholderColor: ({ matchUtilities , theme , corePlugins: corePlugins5 })=>{
|
|
2894
2870
|
matchUtilities({
|
|
2895
2871
|
placeholder: (value)=>{
|
|
2896
|
-
if (!
|
|
2872
|
+
if (!corePlugins5('placeholderOpacity')) {
|
|
2897
2873
|
return {
|
|
2898
2874
|
'&::placeholder': {
|
|
2899
2875
|
color: (0, _toColorValue).default(value)
|
|
@@ -3078,58 +3054,132 @@ let corePlugins = {
|
|
|
3078
3054
|
`var(--tw-ring-shadow, 0 0 #0000)`,
|
|
3079
3055
|
`var(--tw-shadow)`,
|
|
3080
3056
|
].join(', ');
|
|
3081
|
-
return function({ matchUtilities ,
|
|
3082
|
-
|
|
3083
|
-
'
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
}
|
|
3057
|
+
return function({ matchUtilities , addDefaults , theme }) {
|
|
3058
|
+
addDefaults(' box-shadow', {
|
|
3059
|
+
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
3060
|
+
'--tw-ring-shadow': '0 0 #0000',
|
|
3061
|
+
'--tw-shadow': '0 0 #0000',
|
|
3062
|
+
'--tw-shadow-colored': '0 0 #0000'
|
|
3088
3063
|
});
|
|
3089
3064
|
matchUtilities({
|
|
3090
3065
|
shadow: (value)=>{
|
|
3091
3066
|
value = transformValue(value);
|
|
3067
|
+
let ast = (0, _parseBoxShadowValue).parseBoxShadowValue(value);
|
|
3068
|
+
for (let shadow of ast){
|
|
3069
|
+
// Don't override color if the whole shadow is a variable
|
|
3070
|
+
if (!shadow.valid) {
|
|
3071
|
+
continue;
|
|
3072
|
+
}
|
|
3073
|
+
shadow.color = 'var(--tw-shadow-color)';
|
|
3074
|
+
}
|
|
3092
3075
|
return {
|
|
3093
3076
|
'@defaults box-shadow': {
|
|
3094
3077
|
},
|
|
3095
3078
|
'--tw-shadow': value === 'none' ? '0 0 #0000' : value,
|
|
3079
|
+
'--tw-shadow-colored': value === 'none' ? '0 0 #0000' : (0, _parseBoxShadowValue).formatBoxShadowValue(ast),
|
|
3096
3080
|
'box-shadow': defaultBoxShadow
|
|
3097
3081
|
};
|
|
3098
3082
|
}
|
|
3099
3083
|
}, {
|
|
3100
|
-
values: theme('boxShadow')
|
|
3084
|
+
values: theme('boxShadow'),
|
|
3085
|
+
type: [
|
|
3086
|
+
'shadow'
|
|
3087
|
+
]
|
|
3101
3088
|
});
|
|
3102
3089
|
};
|
|
3103
3090
|
})(),
|
|
3104
|
-
|
|
3091
|
+
boxShadowColor: ({ matchUtilities , theme })=>{
|
|
3092
|
+
matchUtilities({
|
|
3093
|
+
shadow: (value)=>{
|
|
3094
|
+
return {
|
|
3095
|
+
'--tw-shadow-color': (0, _toColorValue).default(value),
|
|
3096
|
+
'--tw-shadow': 'var(--tw-shadow-colored)'
|
|
3097
|
+
};
|
|
3098
|
+
}
|
|
3099
|
+
}, {
|
|
3100
|
+
values: (0, _flattenColorPalette).default(theme('boxShadowColor')),
|
|
3101
|
+
type: [
|
|
3102
|
+
'color'
|
|
3103
|
+
]
|
|
3104
|
+
});
|
|
3105
|
+
},
|
|
3106
|
+
outlineStyle: ({ addUtilities })=>{
|
|
3107
|
+
addUtilities({
|
|
3108
|
+
'.outline-none': {
|
|
3109
|
+
outline: '2px solid transparent',
|
|
3110
|
+
'outline-offset': '2px'
|
|
3111
|
+
},
|
|
3112
|
+
'.outline': {
|
|
3113
|
+
'outline-style': 'solid'
|
|
3114
|
+
},
|
|
3115
|
+
'.outline-dashed': {
|
|
3116
|
+
'outline-style': 'dashed'
|
|
3117
|
+
},
|
|
3118
|
+
'.outline-dotted': {
|
|
3119
|
+
'outline-style': 'dotted'
|
|
3120
|
+
},
|
|
3121
|
+
'.outline-double': {
|
|
3122
|
+
'outline-style': 'double'
|
|
3123
|
+
},
|
|
3124
|
+
'.outline-hidden': {
|
|
3125
|
+
'outline-style': 'hidden'
|
|
3126
|
+
}
|
|
3127
|
+
});
|
|
3128
|
+
},
|
|
3129
|
+
outlineWidth: (0, _createUtilityPlugin).default('outlineWidth', [
|
|
3130
|
+
[
|
|
3131
|
+
'outline',
|
|
3132
|
+
[
|
|
3133
|
+
'outline-width'
|
|
3134
|
+
]
|
|
3135
|
+
]
|
|
3136
|
+
], {
|
|
3137
|
+
type: [
|
|
3138
|
+
'length',
|
|
3139
|
+
'number',
|
|
3140
|
+
'percentage'
|
|
3141
|
+
]
|
|
3142
|
+
}),
|
|
3143
|
+
outlineOffset: (0, _createUtilityPlugin).default('outlineOffset', [
|
|
3144
|
+
[
|
|
3145
|
+
'outline-offset',
|
|
3146
|
+
[
|
|
3147
|
+
'outline-offset'
|
|
3148
|
+
]
|
|
3149
|
+
]
|
|
3150
|
+
], {
|
|
3151
|
+
type: [
|
|
3152
|
+
'length',
|
|
3153
|
+
'number',
|
|
3154
|
+
'percentage'
|
|
3155
|
+
]
|
|
3156
|
+
}),
|
|
3157
|
+
outlineColor: ({ matchUtilities , theme })=>{
|
|
3105
3158
|
matchUtilities({
|
|
3106
3159
|
outline: (value)=>{
|
|
3107
|
-
value = Array.isArray(value) ? value : value.split(',');
|
|
3108
|
-
let [outline, outlineOffset = '0'] = Array.isArray(value) ? value : [
|
|
3109
|
-
value
|
|
3110
|
-
];
|
|
3111
3160
|
return {
|
|
3112
|
-
outline,
|
|
3113
|
-
'outline-offset': outlineOffset
|
|
3161
|
+
'outline-color': (0, _toColorValue).default(value)
|
|
3114
3162
|
};
|
|
3115
3163
|
}
|
|
3116
3164
|
}, {
|
|
3117
|
-
values: theme('
|
|
3165
|
+
values: (0, _flattenColorPalette).default(theme('outlineColor')),
|
|
3166
|
+
type: [
|
|
3167
|
+
'color'
|
|
3168
|
+
]
|
|
3118
3169
|
});
|
|
3119
3170
|
},
|
|
3120
|
-
ringWidth: ({ matchUtilities ,
|
|
3171
|
+
ringWidth: ({ matchUtilities , addDefaults , addUtilities , theme })=>{
|
|
3121
3172
|
let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5');
|
|
3122
3173
|
let ringColorDefault = (0, _withAlphaVariable).withAlphaValue(theme('ringColor.DEFAULT'), ringOpacityDefault, `rgb(147 197 253 / ${ringOpacityDefault})`);
|
|
3123
|
-
|
|
3124
|
-
'
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
}
|
|
3174
|
+
addDefaults('ring-width', {
|
|
3175
|
+
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3176
|
+
'--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
|
|
3177
|
+
'--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
|
|
3178
|
+
'--tw-ring-color': ringColorDefault,
|
|
3179
|
+
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
3180
|
+
'--tw-ring-shadow': '0 0 #0000',
|
|
3181
|
+
'--tw-shadow': '0 0 #0000',
|
|
3182
|
+
'--tw-shadow-colored': '0 0 #0000'
|
|
3133
3183
|
});
|
|
3134
3184
|
matchUtilities({
|
|
3135
3185
|
ring: (value)=>{
|
|
@@ -3332,30 +3382,28 @@ let corePlugins = {
|
|
|
3332
3382
|
values: theme('sepia')
|
|
3333
3383
|
});
|
|
3334
3384
|
},
|
|
3335
|
-
filter: ({
|
|
3336
|
-
|
|
3337
|
-
'
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
'--tw-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
].join(' ')
|
|
3358
|
-
}
|
|
3385
|
+
filter: ({ addDefaults , addUtilities })=>{
|
|
3386
|
+
addDefaults('filter', {
|
|
3387
|
+
'--tw-blur': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3388
|
+
'--tw-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3389
|
+
'--tw-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3390
|
+
'--tw-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3391
|
+
'--tw-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3392
|
+
'--tw-invert': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3393
|
+
'--tw-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3394
|
+
'--tw-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3395
|
+
'--tw-drop-shadow': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3396
|
+
'--tw-filter': [
|
|
3397
|
+
'var(--tw-blur)',
|
|
3398
|
+
'var(--tw-brightness)',
|
|
3399
|
+
'var(--tw-contrast)',
|
|
3400
|
+
'var(--tw-grayscale)',
|
|
3401
|
+
'var(--tw-hue-rotate)',
|
|
3402
|
+
'var(--tw-invert)',
|
|
3403
|
+
'var(--tw-saturate)',
|
|
3404
|
+
'var(--tw-sepia)',
|
|
3405
|
+
'var(--tw-drop-shadow)',
|
|
3406
|
+
].join(' ')
|
|
3359
3407
|
});
|
|
3360
3408
|
addUtilities({
|
|
3361
3409
|
'.filter': {
|
|
@@ -3495,30 +3543,28 @@ let corePlugins = {
|
|
|
3495
3543
|
values: theme('backdropSepia')
|
|
3496
3544
|
});
|
|
3497
3545
|
},
|
|
3498
|
-
backdropFilter: ({
|
|
3499
|
-
|
|
3500
|
-
'
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
'--tw-backdrop-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
].join(' ')
|
|
3521
|
-
}
|
|
3546
|
+
backdropFilter: ({ addDefaults , addUtilities })=>{
|
|
3547
|
+
addDefaults('backdrop-filter', {
|
|
3548
|
+
'--tw-backdrop-blur': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3549
|
+
'--tw-backdrop-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3550
|
+
'--tw-backdrop-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3551
|
+
'--tw-backdrop-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3552
|
+
'--tw-backdrop-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3553
|
+
'--tw-backdrop-invert': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3554
|
+
'--tw-backdrop-opacity': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3555
|
+
'--tw-backdrop-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3556
|
+
'--tw-backdrop-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
3557
|
+
'--tw-backdrop-filter': [
|
|
3558
|
+
'var(--tw-backdrop-blur)',
|
|
3559
|
+
'var(--tw-backdrop-brightness)',
|
|
3560
|
+
'var(--tw-backdrop-contrast)',
|
|
3561
|
+
'var(--tw-backdrop-grayscale)',
|
|
3562
|
+
'var(--tw-backdrop-hue-rotate)',
|
|
3563
|
+
'var(--tw-backdrop-invert)',
|
|
3564
|
+
'var(--tw-backdrop-opacity)',
|
|
3565
|
+
'var(--tw-backdrop-saturate)',
|
|
3566
|
+
'var(--tw-backdrop-sepia)',
|
|
3567
|
+
].join(' ')
|
|
3522
3568
|
});
|
|
3523
3569
|
addUtilities({
|
|
3524
3570
|
'.backdrop-filter': {
|
|
@@ -3585,6 +3631,17 @@ let corePlugins = {
|
|
|
3585
3631
|
]
|
|
3586
3632
|
]
|
|
3587
3633
|
]),
|
|
3588
|
-
content: (0, _createUtilityPlugin).default('content'
|
|
3634
|
+
content: (0, _createUtilityPlugin).default('content', [
|
|
3635
|
+
[
|
|
3636
|
+
'content',
|
|
3637
|
+
[
|
|
3638
|
+
'--tw-content',
|
|
3639
|
+
[
|
|
3640
|
+
'content',
|
|
3641
|
+
'var(--tw-content)'
|
|
3642
|
+
]
|
|
3643
|
+
]
|
|
3644
|
+
],
|
|
3645
|
+
])
|
|
3589
3646
|
};
|
|
3590
3647
|
exports.corePlugins = corePlugins;
|