tailwindcss 3.0.0-alpha.1 → 3.0.2
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/colors.js +2 -1
- package/defaultConfig.js +2 -1
- package/defaultTheme.js +2 -1
- package/lib/cli.js +39 -35
- package/lib/constants.js +1 -1
- package/lib/corePluginList.js +10 -1
- package/lib/corePlugins.js +393 -259
- package/lib/css/preflight.css +14 -1
- package/lib/featureFlags.js +12 -7
- package/lib/lib/collapseDuplicateDeclarations.js +29 -0
- package/lib/lib/detectNesting.js +17 -2
- package/lib/lib/evaluateTailwindFunctions.js +9 -5
- package/lib/lib/expandApplyAtRules.js +26 -9
- package/lib/lib/expandTailwindAtRules.js +4 -1
- package/lib/lib/generateRules.js +151 -19
- package/lib/lib/resolveDefaultsAtRules.js +67 -56
- package/lib/lib/setupContextUtils.js +80 -80
- package/lib/lib/setupWatchingContext.js +5 -1
- package/lib/lib/sharedState.js +2 -2
- package/lib/lib/substituteScreenAtRules.js +7 -4
- package/lib/processTailwindFeatures.js +4 -0
- package/lib/util/buildMediaQuery.js +13 -24
- package/lib/util/createUtilityPlugin.js +5 -5
- package/lib/util/dataTypes.js +38 -7
- package/lib/util/formatVariantSelector.js +186 -0
- package/lib/util/isValidArbitraryValue.js +64 -0
- package/lib/util/nameClass.js +2 -1
- package/lib/util/negateValue.js +3 -1
- package/lib/util/normalizeConfig.js +22 -8
- package/lib/util/normalizeScreens.js +61 -0
- package/lib/util/parseBoxShadowValue.js +77 -0
- package/lib/util/pluginUtils.js +62 -158
- package/lib/util/prefixSelector.js +1 -3
- package/lib/util/resolveConfig.js +17 -13
- package/lib/util/transformThemeValue.js +23 -13
- package/package.json +15 -15
- package/peers/index.js +4456 -5450
- package/plugin.js +2 -1
- package/resolveConfig.js +2 -1
- package/src/.DS_Store +0 -0
- package/src/cli.js +9 -2
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +392 -404
- package/src/css/preflight.css +14 -1
- package/src/featureFlags.js +14 -4
- package/src/lib/collapseDuplicateDeclarations.js +28 -0
- package/src/lib/detectNesting.js +22 -3
- package/src/lib/evaluateTailwindFunctions.js +5 -2
- package/src/lib/expandApplyAtRules.js +29 -2
- package/src/lib/expandTailwindAtRules.js +5 -2
- package/src/lib/generateRules.js +155 -11
- package/src/lib/resolveDefaultsAtRules.js +67 -50
- package/src/lib/setupContextUtils.js +77 -67
- package/src/lib/setupWatchingContext.js +7 -0
- package/src/lib/sharedState.js +1 -1
- package/src/lib/substituteScreenAtRules.js +6 -3
- package/src/processTailwindFeatures.js +5 -0
- package/src/util/buildMediaQuery.js +14 -18
- package/src/util/createUtilityPlugin.js +2 -2
- package/src/util/dataTypes.js +43 -11
- package/src/util/formatVariantSelector.js +196 -0
- package/src/util/isValidArbitraryValue.js +61 -0
- package/src/util/nameClass.js +2 -2
- package/src/util/negateValue.js +4 -2
- package/src/util/normalizeConfig.js +17 -1
- package/src/util/normalizeScreens.js +45 -0
- package/src/util/parseBoxShadowValue.js +71 -0
- package/src/util/pluginUtils.js +50 -146
- package/src/util/prefixSelector.js +1 -4
- package/src/util/resolveConfig.js +7 -1
- package/src/util/transformThemeValue.js +22 -7
- package/stubs/defaultConfig.stub.js +118 -58
- package/CHANGELOG.md +0 -1759
package/lib/corePlugins.js
CHANGED
|
@@ -2,21 +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
|
+
var path = _interopRequireWildcard(require("path"));
|
|
7
8
|
var _postcss = _interopRequireDefault(require("postcss"));
|
|
8
9
|
var _createUtilityPlugin = _interopRequireDefault(require("./util/createUtilityPlugin"));
|
|
9
10
|
var _buildMediaQuery = _interopRequireDefault(require("./util/buildMediaQuery"));
|
|
10
|
-
var _prefixSelector = _interopRequireDefault(require("./util/prefixSelector"));
|
|
11
11
|
var _parseAnimationValue = _interopRequireDefault(require("./util/parseAnimationValue"));
|
|
12
12
|
var _flattenColorPalette = _interopRequireDefault(require("./util/flattenColorPalette"));
|
|
13
13
|
var _withAlphaVariable = _interopRequireWildcard(require("./util/withAlphaVariable"));
|
|
14
14
|
var _toColorValue = _interopRequireDefault(require("./util/toColorValue"));
|
|
15
15
|
var _isPlainObject = _interopRequireDefault(require("./util/isPlainObject"));
|
|
16
16
|
var _transformThemeValue = _interopRequireDefault(require("./util/transformThemeValue"));
|
|
17
|
-
var _pluginUtils = require("./util/pluginUtils");
|
|
18
17
|
var _packageJson = require("../package.json");
|
|
19
18
|
var _log = _interopRequireDefault(require("./util/log"));
|
|
19
|
+
var _normalizeScreens = require("./util/normalizeScreens");
|
|
20
|
+
var _parseBoxShadowValue = require("./util/parseBoxShadowValue");
|
|
20
21
|
function _interopRequireDefault(obj) {
|
|
21
22
|
return obj && obj.__esModule ? obj : {
|
|
22
23
|
default: obj
|
|
@@ -46,54 +47,21 @@ function _interopRequireWildcard(obj) {
|
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
let variantPlugins = {
|
|
49
|
-
pseudoElementVariants: ({
|
|
50
|
-
addVariant('first-letter',
|
|
51
|
-
|
|
52
|
-
return withPseudo(`first-letter${config('separator')}${className}`, '::first-letter');
|
|
53
|
-
});
|
|
54
|
-
}));
|
|
55
|
-
addVariant('first-line', (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
56
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
57
|
-
return withPseudo(`first-line${config('separator')}${className}`, '::first-line');
|
|
58
|
-
});
|
|
59
|
-
}));
|
|
50
|
+
pseudoElementVariants: ({ addVariant })=>{
|
|
51
|
+
addVariant('first-letter', '&::first-letter');
|
|
52
|
+
addVariant('first-line', '&::first-line');
|
|
60
53
|
addVariant('marker', [
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return `marker${config('separator')}${className}`;
|
|
64
|
-
});
|
|
65
|
-
return `${variantSelector} *::marker`;
|
|
66
|
-
}),
|
|
67
|
-
(0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
68
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
69
|
-
return withPseudo(`marker${config('separator')}${className}`, '::marker');
|
|
70
|
-
});
|
|
71
|
-
}),
|
|
54
|
+
'& *::marker',
|
|
55
|
+
'&::marker'
|
|
72
56
|
]);
|
|
73
57
|
addVariant('selection', [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return `selection${config('separator')}${className}`;
|
|
77
|
-
});
|
|
78
|
-
return `${variantSelector} *::selection`;
|
|
79
|
-
}),
|
|
80
|
-
(0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
81
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
82
|
-
return withPseudo(`selection${config('separator')}${className}`, '::selection');
|
|
83
|
-
});
|
|
84
|
-
}),
|
|
58
|
+
'& *::selection',
|
|
59
|
+
'&::selection'
|
|
85
60
|
]);
|
|
86
|
-
addVariant('file',
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}));
|
|
91
|
-
addVariant('before', (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
92
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
93
|
-
return withPseudo(`before${config('separator')}${className}`, '::before');
|
|
94
|
-
});
|
|
95
|
-
}, {
|
|
96
|
-
withRule: (rule)=>{
|
|
61
|
+
addVariant('file', '&::file-selector-button');
|
|
62
|
+
addVariant('placeholder', '&::placeholder');
|
|
63
|
+
addVariant('before', ({ container })=>{
|
|
64
|
+
container.walkRules((rule)=>{
|
|
97
65
|
let foundContent = false;
|
|
98
66
|
rule.walkDecls('content', ()=>{
|
|
99
67
|
foundContent = true;
|
|
@@ -101,17 +69,14 @@ let variantPlugins = {
|
|
|
101
69
|
if (!foundContent) {
|
|
102
70
|
rule.prepend(_postcss.default.decl({
|
|
103
71
|
prop: 'content',
|
|
104
|
-
value: '
|
|
72
|
+
value: 'var(--tw-content)'
|
|
105
73
|
}));
|
|
106
74
|
}
|
|
107
|
-
}
|
|
108
|
-
}));
|
|
109
|
-
addVariant('after', (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
110
|
-
return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
|
|
111
|
-
return withPseudo(`after${config('separator')}${className}`, '::after');
|
|
112
75
|
});
|
|
113
|
-
|
|
114
|
-
|
|
76
|
+
return '&::before';
|
|
77
|
+
});
|
|
78
|
+
addVariant('after', ({ container })=>{
|
|
79
|
+
container.walkRules((rule)=>{
|
|
115
80
|
let foundContent = false;
|
|
116
81
|
rule.walkDecls('content', ()=>{
|
|
117
82
|
foundContent = true;
|
|
@@ -119,13 +84,14 @@ let variantPlugins = {
|
|
|
119
84
|
if (!foundContent) {
|
|
120
85
|
rule.prepend(_postcss.default.decl({
|
|
121
86
|
prop: 'content',
|
|
122
|
-
value: '
|
|
87
|
+
value: 'var(--tw-content)'
|
|
123
88
|
}));
|
|
124
89
|
}
|
|
125
|
-
}
|
|
126
|
-
|
|
90
|
+
});
|
|
91
|
+
return '&::after';
|
|
92
|
+
});
|
|
127
93
|
},
|
|
128
|
-
pseudoClassVariants: ({
|
|
94
|
+
pseudoClassVariants: ({ addVariant })=>{
|
|
129
95
|
let pseudoVariants = [
|
|
130
96
|
// Positional
|
|
131
97
|
[
|
|
@@ -179,94 +145,40 @@ let variantPlugins = {
|
|
|
179
145
|
'focus-visible',
|
|
180
146
|
'active',
|
|
181
147
|
'disabled',
|
|
182
|
-
]
|
|
183
|
-
for (let variant of pseudoVariants){
|
|
184
|
-
let [variantName, state] = Array.isArray(variant) ? variant : [
|
|
148
|
+
].map((variant)=>Array.isArray(variant) ? variant : [
|
|
185
149
|
variant,
|
|
186
150
|
`:${variant}`
|
|
187
|
-
]
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
} else if (state.startsWith('[')) {
|
|
192
|
-
return withAttr(`${variantName}${config('separator')}${className}`, state);
|
|
193
|
-
}
|
|
194
|
-
}));
|
|
151
|
+
]
|
|
152
|
+
);
|
|
153
|
+
for (let [variantName, state] of pseudoVariants){
|
|
154
|
+
addVariant(variantName, `&${state}`);
|
|
195
155
|
}
|
|
196
|
-
let
|
|
197
|
-
|
|
198
|
-
let [variantName, state] = Array.isArray(variant1) ? variant1 : [
|
|
199
|
-
variant1,
|
|
200
|
-
`:${variant1}`
|
|
201
|
-
];
|
|
202
|
-
let groupVariantName = `group-${variantName}`;
|
|
203
|
-
addVariant(groupVariantName, (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
204
|
-
let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
|
|
205
|
-
if (`.${className}` === groupMarker) return className;
|
|
206
|
-
return `${groupVariantName}${config('separator')}${className}`;
|
|
207
|
-
});
|
|
208
|
-
if (variantSelector === selector) {
|
|
209
|
-
return null;
|
|
210
|
-
}
|
|
211
|
-
return (0, _pluginUtils).applyStateToMarker(variantSelector, groupMarker, state, (marker, selector)=>`${marker} ${selector}`
|
|
212
|
-
);
|
|
213
|
-
}));
|
|
156
|
+
for (let [variantName1, state1] of pseudoVariants){
|
|
157
|
+
addVariant(`group-${variantName1}`, `:merge(.group)${state1} &`);
|
|
214
158
|
}
|
|
215
|
-
let
|
|
216
|
-
|
|
217
|
-
let [variantName, state] = Array.isArray(variant2) ? variant2 : [
|
|
218
|
-
variant2,
|
|
219
|
-
`:${variant2}`
|
|
220
|
-
];
|
|
221
|
-
let peerVariantName = `peer-${variantName}`;
|
|
222
|
-
addVariant(peerVariantName, (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
223
|
-
let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
|
|
224
|
-
if (`.${className}` === peerMarker) return className;
|
|
225
|
-
return `${peerVariantName}${config('separator')}${className}`;
|
|
226
|
-
});
|
|
227
|
-
if (variantSelector === selector) {
|
|
228
|
-
return null;
|
|
229
|
-
}
|
|
230
|
-
return (0, _pluginUtils).applyStateToMarker(variantSelector, peerMarker, state, (marker, selector)=>selector.trim().startsWith('~') ? `${marker}${selector}` : `${marker} ~ ${selector}`
|
|
231
|
-
);
|
|
232
|
-
}));
|
|
159
|
+
for (let [variantName2, state2] of pseudoVariants){
|
|
160
|
+
addVariant(`peer-${variantName2}`, `:merge(.peer)${state2} ~ &`);
|
|
233
161
|
}
|
|
234
162
|
},
|
|
235
|
-
directionVariants: ({
|
|
236
|
-
addVariant('ltr', (
|
|
163
|
+
directionVariants: ({ addVariant })=>{
|
|
164
|
+
addVariant('ltr', ()=>{
|
|
237
165
|
_log.default.warn('rtl-experimental', [
|
|
238
166
|
'The RTL features in Tailwind CSS are currently in preview.',
|
|
239
167
|
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
|
|
240
168
|
]);
|
|
241
|
-
return
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
addVariant('rtl', (0, _pluginUtils).transformAllSelectors((selector)=>{
|
|
169
|
+
return '[dir="ltr"] &';
|
|
170
|
+
});
|
|
171
|
+
addVariant('rtl', ()=>{
|
|
245
172
|
_log.default.warn('rtl-experimental', [
|
|
246
173
|
'The RTL features in Tailwind CSS are currently in preview.',
|
|
247
174
|
'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
|
|
248
175
|
]);
|
|
249
|
-
return
|
|
250
|
-
|
|
251
|
-
}));
|
|
176
|
+
return '[dir="rtl"] &';
|
|
177
|
+
});
|
|
252
178
|
},
|
|
253
|
-
reducedMotionVariants: ({
|
|
254
|
-
addVariant('motion-safe', (
|
|
255
|
-
|
|
256
|
-
}, {
|
|
257
|
-
wrap: ()=>_postcss.default.atRule({
|
|
258
|
-
name: 'media',
|
|
259
|
-
params: '(prefers-reduced-motion: no-preference)'
|
|
260
|
-
})
|
|
261
|
-
}));
|
|
262
|
-
addVariant('motion-reduce', (0, _pluginUtils).transformLastClasses((className)=>{
|
|
263
|
-
return `motion-reduce${config('separator')}${className}`;
|
|
264
|
-
}, {
|
|
265
|
-
wrap: ()=>_postcss.default.atRule({
|
|
266
|
-
name: 'media',
|
|
267
|
-
params: '(prefers-reduced-motion: reduce)'
|
|
268
|
-
})
|
|
269
|
-
}));
|
|
179
|
+
reducedMotionVariants: ({ addVariant })=>{
|
|
180
|
+
addVariant('motion-safe', '@media (prefers-reduced-motion: no-preference)');
|
|
181
|
+
addVariant('motion-reduce', '@media (prefers-reduced-motion: reduce)');
|
|
270
182
|
},
|
|
271
183
|
darkVariants: ({ config , addVariant })=>{
|
|
272
184
|
let mode = config('darkMode', 'media');
|
|
@@ -278,46 +190,29 @@ let variantPlugins = {
|
|
|
278
190
|
]);
|
|
279
191
|
}
|
|
280
192
|
if (mode === 'class') {
|
|
281
|
-
addVariant('dark',
|
|
282
|
-
let variantSelector = (0, _pluginUtils).updateLastClasses(selector, (className)=>{
|
|
283
|
-
return `dark${config('separator')}${className}`;
|
|
284
|
-
});
|
|
285
|
-
if (variantSelector === selector) {
|
|
286
|
-
return null;
|
|
287
|
-
}
|
|
288
|
-
let darkSelector = (0, _prefixSelector).default(config('prefix'), `.dark`);
|
|
289
|
-
return `${darkSelector} ${variantSelector}`;
|
|
290
|
-
}));
|
|
193
|
+
addVariant('dark', '.dark &');
|
|
291
194
|
} else if (mode === 'media') {
|
|
292
|
-
addVariant('dark', (
|
|
293
|
-
return `dark${config('separator')}${className}`;
|
|
294
|
-
}, {
|
|
295
|
-
wrap: ()=>_postcss.default.atRule({
|
|
296
|
-
name: 'media',
|
|
297
|
-
params: '(prefers-color-scheme: dark)'
|
|
298
|
-
})
|
|
299
|
-
}));
|
|
195
|
+
addVariant('dark', '@media (prefers-color-scheme: dark)');
|
|
300
196
|
}
|
|
301
197
|
},
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
wrap: ()=>_postcss.default.atRule({
|
|
310
|
-
name: 'media',
|
|
311
|
-
params: query
|
|
312
|
-
})
|
|
313
|
-
}));
|
|
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}`);
|
|
314
205
|
}
|
|
206
|
+
},
|
|
207
|
+
orientationVariants: ({ addVariant })=>{
|
|
208
|
+
addVariant('portrait', '@media (orientation: portrait)');
|
|
209
|
+
addVariant('landscape', '@media (orientation: landscape)');
|
|
315
210
|
}
|
|
316
211
|
};
|
|
317
212
|
exports.variantPlugins = variantPlugins;
|
|
318
213
|
let corePlugins = {
|
|
319
214
|
preflight: ({ addBase })=>{
|
|
320
|
-
let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(
|
|
215
|
+
let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(path.join(__dirname, './css/preflight.css'), 'utf8'));
|
|
321
216
|
addBase([
|
|
322
217
|
_postcss.default.comment({
|
|
323
218
|
text: `! tailwindcss v${_packageJson.version} | MIT License | https://tailwindcss.com`
|
|
@@ -326,27 +221,11 @@ let corePlugins = {
|
|
|
326
221
|
]);
|
|
327
222
|
},
|
|
328
223
|
container: (()=>{
|
|
329
|
-
function extractMinWidths(breakpoints) {
|
|
330
|
-
return
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
min: breakpoints
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
if (!Array.isArray(breakpoints)) {
|
|
338
|
-
breakpoints = [
|
|
339
|
-
breakpoints
|
|
340
|
-
];
|
|
341
|
-
}
|
|
342
|
-
return breakpoints.filter((breakpoint)=>{
|
|
343
|
-
var ref;
|
|
344
|
-
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'));
|
|
345
|
-
}).map((breakpoint)=>{
|
|
346
|
-
var ref;
|
|
347
|
-
return (ref = breakpoint['min-width']) !== null && ref !== void 0 ? ref : breakpoint.min;
|
|
348
|
-
});
|
|
349
|
-
});
|
|
224
|
+
function extractMinWidths(breakpoints = []) {
|
|
225
|
+
return breakpoints.flatMap((breakpoint1)=>breakpoint1.values.map((breakpoint)=>breakpoint.min
|
|
226
|
+
)
|
|
227
|
+
).filter((v)=>v !== undefined
|
|
228
|
+
);
|
|
350
229
|
}
|
|
351
230
|
function mapMinWidthsToPadding(minWidths, screens, paddings) {
|
|
352
231
|
if (typeof paddings === 'undefined') {
|
|
@@ -370,25 +249,25 @@ let corePlugins = {
|
|
|
370
249
|
});
|
|
371
250
|
}
|
|
372
251
|
for (let minWidth of minWidths){
|
|
373
|
-
for (let
|
|
374
|
-
let
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
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
|
+
}
|
|
381
260
|
}
|
|
382
261
|
}
|
|
383
262
|
}
|
|
384
263
|
return mapping;
|
|
385
264
|
}
|
|
386
265
|
return function({ addComponents , theme }) {
|
|
387
|
-
let screens = theme('container.screens', theme('screens'));
|
|
266
|
+
let screens = (0, _normalizeScreens).normalizeScreens(theme('container.screens', theme('screens')));
|
|
388
267
|
let minWidths = extractMinWidths(screens);
|
|
389
268
|
let paddings = mapMinWidthsToPadding(minWidths, screens, theme('container.padding'));
|
|
390
269
|
let generatePaddingFor = (minWidth)=>{
|
|
391
|
-
let paddingConfig = paddings.find((padding)
|
|
270
|
+
let paddingConfig = paddings.find((padding)=>padding.minWidth === minWidth
|
|
392
271
|
);
|
|
393
272
|
if (!paddingConfig) {
|
|
394
273
|
return {
|
|
@@ -539,7 +418,9 @@ let corePlugins = {
|
|
|
539
418
|
]
|
|
540
419
|
],
|
|
541
420
|
],
|
|
542
|
-
]
|
|
421
|
+
], {
|
|
422
|
+
supportsNegativeValues: true
|
|
423
|
+
}),
|
|
543
424
|
isolation: ({ addUtilities })=>{
|
|
544
425
|
addUtilities({
|
|
545
426
|
'.isolate': {
|
|
@@ -557,8 +438,12 @@ let corePlugins = {
|
|
|
557
438
|
'zIndex'
|
|
558
439
|
]
|
|
559
440
|
]
|
|
560
|
-
]
|
|
561
|
-
|
|
441
|
+
], {
|
|
442
|
+
supportsNegativeValues: true
|
|
443
|
+
}),
|
|
444
|
+
order: (0, _createUtilityPlugin).default('order', undefined, {
|
|
445
|
+
supportsNegativeValues: true
|
|
446
|
+
}),
|
|
562
447
|
gridColumn: (0, _createUtilityPlugin).default('gridColumn', [
|
|
563
448
|
[
|
|
564
449
|
'col',
|
|
@@ -685,7 +570,9 @@ let corePlugins = {
|
|
|
685
570
|
]
|
|
686
571
|
],
|
|
687
572
|
],
|
|
688
|
-
]
|
|
573
|
+
], {
|
|
574
|
+
supportsNegativeValues: true
|
|
575
|
+
}),
|
|
689
576
|
boxSizing: ({ addUtilities })=>{
|
|
690
577
|
addUtilities({
|
|
691
578
|
'.box-border': {
|
|
@@ -826,7 +713,13 @@ let corePlugins = {
|
|
|
826
713
|
[
|
|
827
714
|
'flex-shrink'
|
|
828
715
|
]
|
|
829
|
-
]
|
|
716
|
+
],
|
|
717
|
+
[
|
|
718
|
+
'shrink',
|
|
719
|
+
[
|
|
720
|
+
'flex-shrink'
|
|
721
|
+
]
|
|
722
|
+
],
|
|
830
723
|
]),
|
|
831
724
|
flexGrow: (0, _createUtilityPlugin).default('flexGrow', [
|
|
832
725
|
[
|
|
@@ -834,6 +727,20 @@ let corePlugins = {
|
|
|
834
727
|
[
|
|
835
728
|
'flex-grow'
|
|
836
729
|
]
|
|
730
|
+
],
|
|
731
|
+
[
|
|
732
|
+
'grow',
|
|
733
|
+
[
|
|
734
|
+
'flex-grow'
|
|
735
|
+
]
|
|
736
|
+
],
|
|
737
|
+
]),
|
|
738
|
+
flexBasis: (0, _createUtilityPlugin).default('flexBasis', [
|
|
739
|
+
[
|
|
740
|
+
'basis',
|
|
741
|
+
[
|
|
742
|
+
'flex-basis'
|
|
743
|
+
]
|
|
837
744
|
]
|
|
838
745
|
]),
|
|
839
746
|
tableLayout: ({ addUtilities })=>{
|
|
@@ -897,7 +804,9 @@ let corePlugins = {
|
|
|
897
804
|
],
|
|
898
805
|
],
|
|
899
806
|
],
|
|
900
|
-
]
|
|
807
|
+
], {
|
|
808
|
+
supportsNegativeValues: true
|
|
809
|
+
}),
|
|
901
810
|
rotate: (0, _createUtilityPlugin).default('rotate', [
|
|
902
811
|
[
|
|
903
812
|
'rotate',
|
|
@@ -912,9 +821,11 @@ let corePlugins = {
|
|
|
912
821
|
'transform',
|
|
913
822
|
'var(--tw-transform)'
|
|
914
823
|
]
|
|
915
|
-
]
|
|
824
|
+
],
|
|
916
825
|
],
|
|
917
|
-
]
|
|
826
|
+
], {
|
|
827
|
+
supportsNegativeValues: true
|
|
828
|
+
}),
|
|
918
829
|
skew: (0, _createUtilityPlugin).default('skew', [
|
|
919
830
|
[
|
|
920
831
|
[
|
|
@@ -948,7 +859,9 @@ let corePlugins = {
|
|
|
948
859
|
],
|
|
949
860
|
],
|
|
950
861
|
],
|
|
951
|
-
]
|
|
862
|
+
], {
|
|
863
|
+
supportsNegativeValues: true
|
|
864
|
+
}),
|
|
952
865
|
scale: (0, _createUtilityPlugin).default('scale', [
|
|
953
866
|
[
|
|
954
867
|
'scale',
|
|
@@ -998,7 +911,9 @@ let corePlugins = {
|
|
|
998
911
|
],
|
|
999
912
|
],
|
|
1000
913
|
],
|
|
1001
|
-
]
|
|
914
|
+
], {
|
|
915
|
+
supportsNegativeValues: true
|
|
916
|
+
}),
|
|
1002
917
|
transform: ({ addBase , addUtilities })=>{
|
|
1003
918
|
addBase({
|
|
1004
919
|
'@defaults transform': {
|
|
@@ -1066,8 +981,8 @@ let corePlugins = {
|
|
|
1066
981
|
];
|
|
1067
982
|
}));
|
|
1068
983
|
matchUtilities({
|
|
1069
|
-
animate: (
|
|
1070
|
-
let animations = (0, _parseAnimationValue).default(
|
|
984
|
+
animate: (value1)=>{
|
|
985
|
+
let animations = (0, _parseAnimationValue).default(value1);
|
|
1071
986
|
return [
|
|
1072
987
|
...animations.flatMap((animation)=>keyframes[animation.name]
|
|
1073
988
|
),
|
|
@@ -1086,7 +1001,15 @@ let corePlugins = {
|
|
|
1086
1001
|
});
|
|
1087
1002
|
},
|
|
1088
1003
|
cursor: (0, _createUtilityPlugin).default('cursor'),
|
|
1089
|
-
touchAction: ({ addUtilities })=>{
|
|
1004
|
+
touchAction: ({ addBase , addUtilities })=>{
|
|
1005
|
+
addBase({
|
|
1006
|
+
'@defaults touch-action': {
|
|
1007
|
+
'--tw-pan-x': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1008
|
+
'--tw-pan-y': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1009
|
+
'--tw-pinch-zoom': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
1010
|
+
'--tw-touch-action': 'var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)'
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
1090
1013
|
addUtilities({
|
|
1091
1014
|
'.touch-auto': {
|
|
1092
1015
|
'touch-action': 'auto'
|
|
@@ -1095,25 +1018,46 @@ let corePlugins = {
|
|
|
1095
1018
|
'touch-action': 'none'
|
|
1096
1019
|
},
|
|
1097
1020
|
'.touch-pan-x': {
|
|
1098
|
-
'touch-action':
|
|
1021
|
+
'@defaults touch-action': {
|
|
1022
|
+
},
|
|
1023
|
+
'--tw-pan-x': 'pan-x',
|
|
1024
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1099
1025
|
},
|
|
1100
1026
|
'.touch-pan-left': {
|
|
1101
|
-
'touch-action':
|
|
1027
|
+
'@defaults touch-action': {
|
|
1028
|
+
},
|
|
1029
|
+
'--tw-pan-x': 'pan-left',
|
|
1030
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1102
1031
|
},
|
|
1103
1032
|
'.touch-pan-right': {
|
|
1104
|
-
'touch-action':
|
|
1033
|
+
'@defaults touch-action': {
|
|
1034
|
+
},
|
|
1035
|
+
'--tw-pan-x': 'pan-right',
|
|
1036
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1105
1037
|
},
|
|
1106
1038
|
'.touch-pan-y': {
|
|
1107
|
-
'touch-action':
|
|
1039
|
+
'@defaults touch-action': {
|
|
1040
|
+
},
|
|
1041
|
+
'--tw-pan-y': 'pan-y',
|
|
1042
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1108
1043
|
},
|
|
1109
1044
|
'.touch-pan-up': {
|
|
1110
|
-
'touch-action':
|
|
1045
|
+
'@defaults touch-action': {
|
|
1046
|
+
},
|
|
1047
|
+
'--tw-pan-y': 'pan-up',
|
|
1048
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1111
1049
|
},
|
|
1112
1050
|
'.touch-pan-down': {
|
|
1113
|
-
'touch-action':
|
|
1051
|
+
'@defaults touch-action': {
|
|
1052
|
+
},
|
|
1053
|
+
'--tw-pan-y': 'pan-down',
|
|
1054
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1114
1055
|
},
|
|
1115
1056
|
'.touch-pinch-zoom': {
|
|
1116
|
-
'touch-action':
|
|
1057
|
+
'@defaults touch-action': {
|
|
1058
|
+
},
|
|
1059
|
+
'--tw-pinch-zoom': 'pinch-zoom',
|
|
1060
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1117
1061
|
},
|
|
1118
1062
|
'.touch-manipulation': {
|
|
1119
1063
|
'touch-action': 'manipulation'
|
|
@@ -1260,7 +1204,9 @@ let corePlugins = {
|
|
|
1260
1204
|
]
|
|
1261
1205
|
],
|
|
1262
1206
|
],
|
|
1263
|
-
]
|
|
1207
|
+
], {
|
|
1208
|
+
supportsNegativeValues: true
|
|
1209
|
+
}),
|
|
1264
1210
|
scrollPadding: (0, _createUtilityPlugin).default('scrollPadding', [
|
|
1265
1211
|
[
|
|
1266
1212
|
'scroll-p',
|
|
@@ -1658,7 +1604,8 @@ let corePlugins = {
|
|
|
1658
1604
|
};
|
|
1659
1605
|
}
|
|
1660
1606
|
}, {
|
|
1661
|
-
values: theme('space')
|
|
1607
|
+
values: theme('space'),
|
|
1608
|
+
supportsNegativeValues: true
|
|
1662
1609
|
});
|
|
1663
1610
|
addUtilities({
|
|
1664
1611
|
'.space-y-reverse > :not([hidden]) ~ :not([hidden])': {
|
|
@@ -1734,10 +1681,10 @@ let corePlugins = {
|
|
|
1734
1681
|
}
|
|
1735
1682
|
});
|
|
1736
1683
|
},
|
|
1737
|
-
divideColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
1684
|
+
divideColor: ({ matchUtilities , theme , corePlugins: corePlugins1 })=>{
|
|
1738
1685
|
matchUtilities({
|
|
1739
1686
|
divide: (value)=>{
|
|
1740
|
-
if (!
|
|
1687
|
+
if (!corePlugins1('divideOpacity')) {
|
|
1741
1688
|
return {
|
|
1742
1689
|
['& > :not([hidden]) ~ :not([hidden])']: {
|
|
1743
1690
|
'border-color': (0, _toColorValue).default(value)
|
|
@@ -2148,8 +2095,8 @@ let corePlugins = {
|
|
|
2148
2095
|
}
|
|
2149
2096
|
});
|
|
2150
2097
|
},
|
|
2151
|
-
borderColor: ({ addBase , matchUtilities , theme , corePlugins })=>{
|
|
2152
|
-
if (!
|
|
2098
|
+
borderColor: ({ addBase , matchUtilities , theme , corePlugins: corePlugins2 })=>{
|
|
2099
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2153
2100
|
let value = theme('borderColor.DEFAULT', 'currentColor');
|
|
2154
2101
|
addBase({
|
|
2155
2102
|
'@defaults border-width': {
|
|
@@ -2167,7 +2114,7 @@ let corePlugins = {
|
|
|
2167
2114
|
}
|
|
2168
2115
|
matchUtilities({
|
|
2169
2116
|
border: (value)=>{
|
|
2170
|
-
if (!
|
|
2117
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2171
2118
|
return {
|
|
2172
2119
|
'border-color': (0, _toColorValue).default(value)
|
|
2173
2120
|
};
|
|
@@ -2187,7 +2134,7 @@ let corePlugins = {
|
|
|
2187
2134
|
});
|
|
2188
2135
|
matchUtilities({
|
|
2189
2136
|
'border-x': (value)=>{
|
|
2190
|
-
if (!
|
|
2137
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2191
2138
|
return {
|
|
2192
2139
|
'border-left-color': (0, _toColorValue).default(value),
|
|
2193
2140
|
'border-right-color': (0, _toColorValue).default(value)
|
|
@@ -2203,7 +2150,7 @@ let corePlugins = {
|
|
|
2203
2150
|
});
|
|
2204
2151
|
},
|
|
2205
2152
|
'border-y': (value)=>{
|
|
2206
|
-
if (!
|
|
2153
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2207
2154
|
return {
|
|
2208
2155
|
'border-top-color': (0, _toColorValue).default(value),
|
|
2209
2156
|
'border-bottom-color': (0, _toColorValue).default(value)
|
|
@@ -2225,7 +2172,7 @@ let corePlugins = {
|
|
|
2225
2172
|
});
|
|
2226
2173
|
matchUtilities({
|
|
2227
2174
|
'border-t': (value)=>{
|
|
2228
|
-
if (!
|
|
2175
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2229
2176
|
return {
|
|
2230
2177
|
'border-top-color': (0, _toColorValue).default(value)
|
|
2231
2178
|
};
|
|
@@ -2237,7 +2184,7 @@ let corePlugins = {
|
|
|
2237
2184
|
});
|
|
2238
2185
|
},
|
|
2239
2186
|
'border-r': (value)=>{
|
|
2240
|
-
if (!
|
|
2187
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2241
2188
|
return {
|
|
2242
2189
|
'border-right-color': (0, _toColorValue).default(value)
|
|
2243
2190
|
};
|
|
@@ -2249,7 +2196,7 @@ let corePlugins = {
|
|
|
2249
2196
|
});
|
|
2250
2197
|
},
|
|
2251
2198
|
'border-b': (value)=>{
|
|
2252
|
-
if (!
|
|
2199
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2253
2200
|
return {
|
|
2254
2201
|
'border-bottom-color': (0, _toColorValue).default(value)
|
|
2255
2202
|
};
|
|
@@ -2261,7 +2208,7 @@ let corePlugins = {
|
|
|
2261
2208
|
});
|
|
2262
2209
|
},
|
|
2263
2210
|
'border-l': (value)=>{
|
|
2264
|
-
if (!
|
|
2211
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2265
2212
|
return {
|
|
2266
2213
|
'border-left-color': (0, _toColorValue).default(value)
|
|
2267
2214
|
};
|
|
@@ -2286,10 +2233,10 @@ let corePlugins = {
|
|
|
2286
2233
|
]
|
|
2287
2234
|
],
|
|
2288
2235
|
]),
|
|
2289
|
-
backgroundColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
2236
|
+
backgroundColor: ({ matchUtilities , theme , corePlugins: corePlugins3 })=>{
|
|
2290
2237
|
matchUtilities({
|
|
2291
2238
|
bg: (value)=>{
|
|
2292
|
-
if (!
|
|
2239
|
+
if (!corePlugins3('backgroundOpacity')) {
|
|
2293
2240
|
return {
|
|
2294
2241
|
'background-color': (0, _toColorValue).default(value)
|
|
2295
2242
|
};
|
|
@@ -2370,6 +2317,12 @@ let corePlugins = {
|
|
|
2370
2317
|
},
|
|
2371
2318
|
'.decoration-clone': {
|
|
2372
2319
|
'box-decoration-break': 'clone'
|
|
2320
|
+
},
|
|
2321
|
+
'.box-decoration-slice': {
|
|
2322
|
+
'box-decoration-break': 'slice'
|
|
2323
|
+
},
|
|
2324
|
+
'.box-decoration-clone': {
|
|
2325
|
+
'box-decoration-break': 'clone'
|
|
2373
2326
|
}
|
|
2374
2327
|
});
|
|
2375
2328
|
},
|
|
@@ -2608,7 +2561,9 @@ let corePlugins = {
|
|
|
2608
2561
|
'text-indent'
|
|
2609
2562
|
]
|
|
2610
2563
|
]
|
|
2611
|
-
]
|
|
2564
|
+
], {
|
|
2565
|
+
supportsNegativeValues: true
|
|
2566
|
+
}),
|
|
2612
2567
|
verticalAlign: ({ addUtilities , matchUtilities })=>{
|
|
2613
2568
|
addUtilities({
|
|
2614
2569
|
'.align-baseline': {
|
|
@@ -2728,40 +2683,64 @@ let corePlugins = {
|
|
|
2728
2683
|
},
|
|
2729
2684
|
fontVariantNumeric: ({ addUtilities })=>{
|
|
2730
2685
|
addUtilities({
|
|
2731
|
-
'
|
|
2686
|
+
'@defaults font-variant-numeric': {
|
|
2732
2687
|
'--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2733
2688
|
'--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2734
2689
|
'--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2735
2690
|
'--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2736
2691
|
'--tw-numeric-fraction': 'var(--tw-empty,/*!*/ /*!*/)',
|
|
2737
|
-
'font-variant-numeric': 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
|
|
2692
|
+
'--tw-font-variant-numeric': 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
|
|
2738
2693
|
},
|
|
2739
2694
|
'.normal-nums': {
|
|
2740
2695
|
'font-variant-numeric': 'normal'
|
|
2741
2696
|
},
|
|
2742
2697
|
'.ordinal': {
|
|
2743
|
-
'
|
|
2698
|
+
'@defaults font-variant-numeric': {
|
|
2699
|
+
},
|
|
2700
|
+
'--tw-ordinal': 'ordinal',
|
|
2701
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2744
2702
|
},
|
|
2745
2703
|
'.slashed-zero': {
|
|
2746
|
-
'
|
|
2704
|
+
'@defaults font-variant-numeric': {
|
|
2705
|
+
},
|
|
2706
|
+
'--tw-slashed-zero': 'slashed-zero',
|
|
2707
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2747
2708
|
},
|
|
2748
2709
|
'.lining-nums': {
|
|
2749
|
-
'
|
|
2710
|
+
'@defaults font-variant-numeric': {
|
|
2711
|
+
},
|
|
2712
|
+
'--tw-numeric-figure': 'lining-nums',
|
|
2713
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2750
2714
|
},
|
|
2751
2715
|
'.oldstyle-nums': {
|
|
2752
|
-
'
|
|
2716
|
+
'@defaults font-variant-numeric': {
|
|
2717
|
+
},
|
|
2718
|
+
'--tw-numeric-figure': 'oldstyle-nums',
|
|
2719
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2753
2720
|
},
|
|
2754
2721
|
'.proportional-nums': {
|
|
2755
|
-
'
|
|
2722
|
+
'@defaults font-variant-numeric': {
|
|
2723
|
+
},
|
|
2724
|
+
'--tw-numeric-spacing': 'proportional-nums',
|
|
2725
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2756
2726
|
},
|
|
2757
2727
|
'.tabular-nums': {
|
|
2758
|
-
'
|
|
2728
|
+
'@defaults font-variant-numeric': {
|
|
2729
|
+
},
|
|
2730
|
+
'--tw-numeric-spacing': 'tabular-nums',
|
|
2731
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2759
2732
|
},
|
|
2760
2733
|
'.diagonal-fractions': {
|
|
2761
|
-
'
|
|
2734
|
+
'@defaults font-variant-numeric': {
|
|
2735
|
+
},
|
|
2736
|
+
'--tw-numeric-fraction': 'diagonal-fractions',
|
|
2737
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2762
2738
|
},
|
|
2763
2739
|
'.stacked-fractions': {
|
|
2764
|
-
'
|
|
2740
|
+
'@defaults font-variant-numeric': {
|
|
2741
|
+
},
|
|
2742
|
+
'--tw-numeric-fraction': 'stacked-fractions',
|
|
2743
|
+
'font-variant-numeric': 'var(--tw-font-variant-numeric)'
|
|
2765
2744
|
}
|
|
2766
2745
|
});
|
|
2767
2746
|
},
|
|
@@ -2780,11 +2759,13 @@ let corePlugins = {
|
|
|
2780
2759
|
'letterSpacing'
|
|
2781
2760
|
]
|
|
2782
2761
|
]
|
|
2783
|
-
]
|
|
2784
|
-
|
|
2762
|
+
], {
|
|
2763
|
+
supportsNegativeValues: true
|
|
2764
|
+
}),
|
|
2765
|
+
textColor: ({ matchUtilities , theme , corePlugins: corePlugins4 })=>{
|
|
2785
2766
|
matchUtilities({
|
|
2786
2767
|
text: (value)=>{
|
|
2787
|
-
if (!
|
|
2768
|
+
if (!corePlugins4('textOpacity')) {
|
|
2788
2769
|
return {
|
|
2789
2770
|
color: (0, _toColorValue).default(value)
|
|
2790
2771
|
};
|
|
@@ -2813,6 +2794,9 @@ let corePlugins = {
|
|
|
2813
2794
|
'.underline': {
|
|
2814
2795
|
'text-decoration': 'underline'
|
|
2815
2796
|
},
|
|
2797
|
+
'.overline': {
|
|
2798
|
+
'text-decoration': 'overline'
|
|
2799
|
+
},
|
|
2816
2800
|
'.line-through': {
|
|
2817
2801
|
'text-decoration': 'line-through'
|
|
2818
2802
|
},
|
|
@@ -2821,6 +2805,65 @@ let corePlugins = {
|
|
|
2821
2805
|
}
|
|
2822
2806
|
});
|
|
2823
2807
|
},
|
|
2808
|
+
textDecorationColor: ({ matchUtilities , theme })=>{
|
|
2809
|
+
matchUtilities({
|
|
2810
|
+
decoration: (value)=>{
|
|
2811
|
+
return {
|
|
2812
|
+
'text-decoration-color': (0, _toColorValue).default(value)
|
|
2813
|
+
};
|
|
2814
|
+
}
|
|
2815
|
+
}, {
|
|
2816
|
+
values: (0, _flattenColorPalette).default(theme('textDecorationColor')),
|
|
2817
|
+
type: [
|
|
2818
|
+
'color'
|
|
2819
|
+
]
|
|
2820
|
+
});
|
|
2821
|
+
},
|
|
2822
|
+
textDecorationStyle: ({ addUtilities })=>{
|
|
2823
|
+
addUtilities({
|
|
2824
|
+
'.decoration-solid': {
|
|
2825
|
+
'text-decoration-style': 'solid'
|
|
2826
|
+
},
|
|
2827
|
+
'.decoration-double': {
|
|
2828
|
+
'text-decoration-style': 'double'
|
|
2829
|
+
},
|
|
2830
|
+
'.decoration-dotted': {
|
|
2831
|
+
'text-decoration-style': 'dotted'
|
|
2832
|
+
},
|
|
2833
|
+
'.decoration-dashed': {
|
|
2834
|
+
'text-decoration-style': 'dashed'
|
|
2835
|
+
},
|
|
2836
|
+
'.decoration-wavy': {
|
|
2837
|
+
'text-decoration-style': 'wavy'
|
|
2838
|
+
}
|
|
2839
|
+
});
|
|
2840
|
+
},
|
|
2841
|
+
textDecorationThickness: (0, _createUtilityPlugin).default('textDecorationThickness', [
|
|
2842
|
+
[
|
|
2843
|
+
'decoration',
|
|
2844
|
+
[
|
|
2845
|
+
'text-decoration-thickness'
|
|
2846
|
+
]
|
|
2847
|
+
]
|
|
2848
|
+
], {
|
|
2849
|
+
type: [
|
|
2850
|
+
'length',
|
|
2851
|
+
'percentage'
|
|
2852
|
+
]
|
|
2853
|
+
}),
|
|
2854
|
+
textUnderlineOffset: (0, _createUtilityPlugin).default('textUnderlineOffset', [
|
|
2855
|
+
[
|
|
2856
|
+
'underline-offset',
|
|
2857
|
+
[
|
|
2858
|
+
'text-underline-offset'
|
|
2859
|
+
]
|
|
2860
|
+
]
|
|
2861
|
+
], {
|
|
2862
|
+
type: [
|
|
2863
|
+
'length',
|
|
2864
|
+
'percentage'
|
|
2865
|
+
]
|
|
2866
|
+
}),
|
|
2824
2867
|
fontSmoothing: ({ addUtilities })=>{
|
|
2825
2868
|
addUtilities({
|
|
2826
2869
|
'.antialiased': {
|
|
@@ -2833,10 +2876,10 @@ let corePlugins = {
|
|
|
2833
2876
|
}
|
|
2834
2877
|
});
|
|
2835
2878
|
},
|
|
2836
|
-
placeholderColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
2879
|
+
placeholderColor: ({ matchUtilities , theme , corePlugins: corePlugins5 })=>{
|
|
2837
2880
|
matchUtilities({
|
|
2838
2881
|
placeholder: (value)=>{
|
|
2839
|
-
if (!
|
|
2882
|
+
if (!corePlugins5('placeholderOpacity')) {
|
|
2840
2883
|
return {
|
|
2841
2884
|
'&::placeholder': {
|
|
2842
2885
|
color: (0, _toColorValue).default(value)
|
|
@@ -3026,38 +3069,115 @@ let corePlugins = {
|
|
|
3026
3069
|
'@defaults box-shadow': {
|
|
3027
3070
|
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
3028
3071
|
'--tw-ring-shadow': '0 0 #0000',
|
|
3029
|
-
'--tw-shadow': '0 0 #0000'
|
|
3072
|
+
'--tw-shadow': '0 0 #0000',
|
|
3073
|
+
'--tw-shadow-colored': '0 0 #0000'
|
|
3030
3074
|
}
|
|
3031
3075
|
});
|
|
3032
3076
|
matchUtilities({
|
|
3033
3077
|
shadow: (value)=>{
|
|
3034
3078
|
value = transformValue(value);
|
|
3079
|
+
let ast = (0, _parseBoxShadowValue).parseBoxShadowValue(value);
|
|
3080
|
+
for (let shadow of ast){
|
|
3081
|
+
// Don't override color if the whole shadow is a variable
|
|
3082
|
+
if (!shadow.valid) {
|
|
3083
|
+
continue;
|
|
3084
|
+
}
|
|
3085
|
+
shadow.color = 'var(--tw-shadow-color)';
|
|
3086
|
+
}
|
|
3035
3087
|
return {
|
|
3036
3088
|
'@defaults box-shadow': {
|
|
3037
3089
|
},
|
|
3038
3090
|
'--tw-shadow': value === 'none' ? '0 0 #0000' : value,
|
|
3091
|
+
'--tw-shadow-colored': value === 'none' ? '0 0 #0000' : (0, _parseBoxShadowValue).formatBoxShadowValue(ast),
|
|
3039
3092
|
'box-shadow': defaultBoxShadow
|
|
3040
3093
|
};
|
|
3041
3094
|
}
|
|
3042
3095
|
}, {
|
|
3043
|
-
values: theme('boxShadow')
|
|
3096
|
+
values: theme('boxShadow'),
|
|
3097
|
+
type: [
|
|
3098
|
+
'shadow'
|
|
3099
|
+
]
|
|
3044
3100
|
});
|
|
3045
3101
|
};
|
|
3046
3102
|
})(),
|
|
3047
|
-
|
|
3103
|
+
boxShadowColor: ({ matchUtilities , theme })=>{
|
|
3104
|
+
matchUtilities({
|
|
3105
|
+
shadow: (value)=>{
|
|
3106
|
+
return {
|
|
3107
|
+
'--tw-shadow-color': (0, _toColorValue).default(value),
|
|
3108
|
+
'--tw-shadow': 'var(--tw-shadow-colored)'
|
|
3109
|
+
};
|
|
3110
|
+
}
|
|
3111
|
+
}, {
|
|
3112
|
+
values: (0, _flattenColorPalette).default(theme('boxShadowColor')),
|
|
3113
|
+
type: [
|
|
3114
|
+
'color'
|
|
3115
|
+
]
|
|
3116
|
+
});
|
|
3117
|
+
},
|
|
3118
|
+
outlineStyle: ({ addUtilities })=>{
|
|
3119
|
+
addUtilities({
|
|
3120
|
+
'.outline-none': {
|
|
3121
|
+
outline: '2px solid transparent',
|
|
3122
|
+
'outline-offset': '2px'
|
|
3123
|
+
},
|
|
3124
|
+
'.outline': {
|
|
3125
|
+
'outline-style': 'solid'
|
|
3126
|
+
},
|
|
3127
|
+
'.outline-dashed': {
|
|
3128
|
+
'outline-style': 'dashed'
|
|
3129
|
+
},
|
|
3130
|
+
'.outline-dotted': {
|
|
3131
|
+
'outline-style': 'dotted'
|
|
3132
|
+
},
|
|
3133
|
+
'.outline-double': {
|
|
3134
|
+
'outline-style': 'double'
|
|
3135
|
+
},
|
|
3136
|
+
'.outline-hidden': {
|
|
3137
|
+
'outline-style': 'hidden'
|
|
3138
|
+
}
|
|
3139
|
+
});
|
|
3140
|
+
},
|
|
3141
|
+
outlineWidth: (0, _createUtilityPlugin).default('outlineWidth', [
|
|
3142
|
+
[
|
|
3143
|
+
'outline',
|
|
3144
|
+
[
|
|
3145
|
+
'outline-width'
|
|
3146
|
+
]
|
|
3147
|
+
]
|
|
3148
|
+
], {
|
|
3149
|
+
type: [
|
|
3150
|
+
'length',
|
|
3151
|
+
'number',
|
|
3152
|
+
'percentage'
|
|
3153
|
+
]
|
|
3154
|
+
}),
|
|
3155
|
+
outlineOffset: (0, _createUtilityPlugin).default('outlineOffset', [
|
|
3156
|
+
[
|
|
3157
|
+
'outline-offset',
|
|
3158
|
+
[
|
|
3159
|
+
'outline-offset'
|
|
3160
|
+
]
|
|
3161
|
+
]
|
|
3162
|
+
], {
|
|
3163
|
+
type: [
|
|
3164
|
+
'length',
|
|
3165
|
+
'number',
|
|
3166
|
+
'percentage'
|
|
3167
|
+
]
|
|
3168
|
+
}),
|
|
3169
|
+
outlineColor: ({ matchUtilities , theme })=>{
|
|
3048
3170
|
matchUtilities({
|
|
3049
3171
|
outline: (value)=>{
|
|
3050
|
-
value = Array.isArray(value) ? value : value.split(',');
|
|
3051
|
-
let [outline, outlineOffset = '0'] = Array.isArray(value) ? value : [
|
|
3052
|
-
value
|
|
3053
|
-
];
|
|
3054
3172
|
return {
|
|
3055
|
-
outline,
|
|
3056
|
-
'outline-offset': outlineOffset
|
|
3173
|
+
'outline-color': (0, _toColorValue).default(value)
|
|
3057
3174
|
};
|
|
3058
3175
|
}
|
|
3059
3176
|
}, {
|
|
3060
|
-
values: theme('
|
|
3177
|
+
values: (0, _flattenColorPalette).default(theme('outlineColor')),
|
|
3178
|
+
type: [
|
|
3179
|
+
'color'
|
|
3180
|
+
]
|
|
3061
3181
|
});
|
|
3062
3182
|
},
|
|
3063
3183
|
ringWidth: ({ matchUtilities , addBase , addUtilities , theme })=>{
|
|
@@ -3071,7 +3191,8 @@ let corePlugins = {
|
|
|
3071
3191
|
'--tw-ring-color': ringColorDefault,
|
|
3072
3192
|
'--tw-ring-offset-shadow': '0 0 #0000',
|
|
3073
3193
|
'--tw-ring-shadow': '0 0 #0000',
|
|
3074
|
-
'--tw-shadow': '0 0 #0000'
|
|
3194
|
+
'--tw-shadow': '0 0 #0000',
|
|
3195
|
+
'--tw-shadow-colored': '0 0 #0000'
|
|
3075
3196
|
}
|
|
3076
3197
|
});
|
|
3077
3198
|
matchUtilities({
|
|
@@ -3229,7 +3350,8 @@ let corePlugins = {
|
|
|
3229
3350
|
};
|
|
3230
3351
|
}
|
|
3231
3352
|
}, {
|
|
3232
|
-
values: theme('hueRotate')
|
|
3353
|
+
values: theme('hueRotate'),
|
|
3354
|
+
supportsNegativeValues: true
|
|
3233
3355
|
});
|
|
3234
3356
|
},
|
|
3235
3357
|
invert: ({ matchUtilities , theme })=>{
|
|
@@ -3377,7 +3499,8 @@ let corePlugins = {
|
|
|
3377
3499
|
};
|
|
3378
3500
|
}
|
|
3379
3501
|
}, {
|
|
3380
|
-
values: theme('backdropHueRotate')
|
|
3502
|
+
values: theme('backdropHueRotate'),
|
|
3503
|
+
supportsNegativeValues: true
|
|
3381
3504
|
});
|
|
3382
3505
|
},
|
|
3383
3506
|
backdropInvert: ({ matchUtilities , theme })=>{
|
|
@@ -3526,6 +3649,17 @@ let corePlugins = {
|
|
|
3526
3649
|
]
|
|
3527
3650
|
]
|
|
3528
3651
|
]),
|
|
3529
|
-
content: (0, _createUtilityPlugin).default('content'
|
|
3652
|
+
content: (0, _createUtilityPlugin).default('content', [
|
|
3653
|
+
[
|
|
3654
|
+
'content',
|
|
3655
|
+
[
|
|
3656
|
+
'--tw-content',
|
|
3657
|
+
[
|
|
3658
|
+
'content',
|
|
3659
|
+
'var(--tw-content)'
|
|
3660
|
+
]
|
|
3661
|
+
]
|
|
3662
|
+
],
|
|
3663
|
+
])
|
|
3530
3664
|
};
|
|
3531
3665
|
exports.corePlugins = corePlugins;
|