tailwindcss 0.0.0-insiders.f9fb2ce → 0.0.0-insiders.fb545bc
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 +84 -3
- package/colors.js +2 -1
- package/defaultConfig.js +2 -1
- package/defaultTheme.js +2 -1
- package/lib/cli.js +32 -32
- package/lib/constants.js +1 -1
- package/lib/corePluginList.js +4 -0
- package/lib/corePlugins.js +257 -172
- package/lib/css/preflight.css +4 -3
- package/lib/featureFlags.js +6 -4
- package/lib/lib/collapseDuplicateDeclarations.js +2 -2
- 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 +27 -1
- package/lib/lib/generateRules.js +64 -10
- package/lib/lib/resolveDefaultsAtRules.js +25 -11
- package/lib/lib/setupContextUtils.js +55 -78
- package/lib/lib/sharedState.js +1 -1
- package/lib/lib/substituteScreenAtRules.js +7 -4
- package/lib/util/buildMediaQuery.js +13 -24
- package/lib/util/createUtilityPlugin.js +2 -2
- package/lib/util/dataTypes.js +25 -3
- package/lib/util/defaults.js +6 -0
- package/lib/util/formatVariantSelector.js +93 -9
- 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 +41 -12
- package/lib/util/normalizeScreens.js +61 -0
- package/lib/util/parseBoxShadowValue.js +77 -0
- package/lib/util/pluginUtils.js +12 -11
- package/lib/util/resolveConfig.js +12 -12
- package/package.json +15 -14
- package/peers/index.js +3798 -3098
- package/plugin.js +2 -1
- package/resolveConfig.js +2 -1
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +232 -164
- package/src/css/preflight.css +4 -3
- package/src/featureFlags.js +5 -1
- 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 +25 -0
- package/src/lib/generateRules.js +57 -0
- package/src/lib/resolveDefaultsAtRules.js +28 -7
- package/src/lib/setupContextUtils.js +45 -64
- package/src/lib/substituteScreenAtRules.js +6 -3
- package/src/util/buildMediaQuery.js +14 -18
- package/src/util/dataTypes.js +24 -6
- package/src/util/defaults.js +6 -0
- package/src/util/formatVariantSelector.js +92 -1
- 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 +14 -1
- package/src/util/normalizeScreens.js +45 -0
- package/src/util/parseBoxShadowValue.js +71 -0
- package/src/util/pluginUtils.js +2 -0
- package/stubs/defaultConfig.stub.js +23 -5
package/lib/corePlugins.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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"));
|
|
@@ -16,6 +16,8 @@ var _isPlainObject = _interopRequireDefault(require("./util/isPlainObject"));
|
|
|
16
16
|
var _transformThemeValue = _interopRequireDefault(require("./util/transformThemeValue"));
|
|
17
17
|
var _packageJson = require("../package.json");
|
|
18
18
|
var _log = _interopRequireDefault(require("./util/log"));
|
|
19
|
+
var _normalizeScreens = require("./util/normalizeScreens");
|
|
20
|
+
var _parseBoxShadowValue = require("./util/parseBoxShadowValue");
|
|
19
21
|
function _interopRequireDefault(obj) {
|
|
20
22
|
return obj && obj.__esModule ? obj : {
|
|
21
23
|
default: obj
|
|
@@ -57,6 +59,7 @@ let variantPlugins = {
|
|
|
57
59
|
'&::selection'
|
|
58
60
|
]);
|
|
59
61
|
addVariant('file', '&::file-selector-button');
|
|
62
|
+
addVariant('placeholder', '&::placeholder');
|
|
60
63
|
addVariant('before', ({ container })=>{
|
|
61
64
|
container.walkRules((rule)=>{
|
|
62
65
|
let foundContent = false;
|
|
@@ -196,11 +199,14 @@ let variantPlugins = {
|
|
|
196
199
|
addVariant('print', '@media print');
|
|
197
200
|
},
|
|
198
201
|
screenVariants: ({ theme , addVariant })=>{
|
|
199
|
-
for(let screen
|
|
200
|
-
let
|
|
201
|
-
|
|
202
|
-
addVariant(screen, `@media ${query}`);
|
|
202
|
+
for (let screen of (0, _normalizeScreens).normalizeScreens(theme('screens'))){
|
|
203
|
+
let query = (0, _buildMediaQuery).default(screen);
|
|
204
|
+
addVariant(screen.name, `@media ${query}`);
|
|
203
205
|
}
|
|
206
|
+
},
|
|
207
|
+
orientationVariants: ({ addVariant })=>{
|
|
208
|
+
addVariant('portrait', '@media (orientation: portrait)');
|
|
209
|
+
addVariant('landscape', '@media (orientation: landscape)');
|
|
204
210
|
}
|
|
205
211
|
};
|
|
206
212
|
exports.variantPlugins = variantPlugins;
|
|
@@ -215,27 +221,11 @@ let corePlugins = {
|
|
|
215
221
|
]);
|
|
216
222
|
},
|
|
217
223
|
container: (()=>{
|
|
218
|
-
function extractMinWidths(breakpoints) {
|
|
219
|
-
return
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
min: breakpoints
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
if (!Array.isArray(breakpoints)) {
|
|
227
|
-
breakpoints = [
|
|
228
|
-
breakpoints
|
|
229
|
-
];
|
|
230
|
-
}
|
|
231
|
-
return breakpoints.filter((breakpoint)=>{
|
|
232
|
-
var ref;
|
|
233
|
-
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'));
|
|
234
|
-
}).map((breakpoint)=>{
|
|
235
|
-
var ref;
|
|
236
|
-
return (ref = breakpoint['min-width']) !== null && ref !== void 0 ? ref : breakpoint.min;
|
|
237
|
-
});
|
|
238
|
-
});
|
|
224
|
+
function extractMinWidths(breakpoints = []) {
|
|
225
|
+
return breakpoints.flatMap((breakpoint1)=>breakpoint1.values.map((breakpoint)=>breakpoint.min
|
|
226
|
+
)
|
|
227
|
+
).filter((v)=>v !== undefined
|
|
228
|
+
);
|
|
239
229
|
}
|
|
240
230
|
function mapMinWidthsToPadding(minWidths, screens, paddings) {
|
|
241
231
|
if (typeof paddings === 'undefined') {
|
|
@@ -259,25 +249,25 @@ let corePlugins = {
|
|
|
259
249
|
});
|
|
260
250
|
}
|
|
261
251
|
for (let minWidth of minWidths){
|
|
262
|
-
for (let
|
|
263
|
-
let
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}
|
|
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
|
+
}
|
|
270
260
|
}
|
|
271
261
|
}
|
|
272
262
|
}
|
|
273
263
|
return mapping;
|
|
274
264
|
}
|
|
275
265
|
return function({ addComponents , theme }) {
|
|
276
|
-
let screens = theme('container.screens', theme('screens'));
|
|
266
|
+
let screens = (0, _normalizeScreens).normalizeScreens(theme('container.screens', theme('screens')));
|
|
277
267
|
let minWidths = extractMinWidths(screens);
|
|
278
268
|
let paddings = mapMinWidthsToPadding(minWidths, screens, theme('container.padding'));
|
|
279
269
|
let generatePaddingFor = (minWidth)=>{
|
|
280
|
-
let paddingConfig = paddings.find((padding)
|
|
270
|
+
let paddingConfig = paddings.find((padding)=>padding.minWidth === minWidth
|
|
281
271
|
);
|
|
282
272
|
if (!paddingConfig) {
|
|
283
273
|
return {
|
|
@@ -921,27 +911,27 @@ let corePlugins = {
|
|
|
921
911
|
],
|
|
922
912
|
],
|
|
923
913
|
],
|
|
924
|
-
]
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
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(' ')
|
|
945
935
|
});
|
|
946
936
|
addUtilities({
|
|
947
937
|
'.transform': {
|
|
@@ -989,8 +979,8 @@ let corePlugins = {
|
|
|
989
979
|
];
|
|
990
980
|
}));
|
|
991
981
|
matchUtilities({
|
|
992
|
-
animate: (
|
|
993
|
-
let animations = (0, _parseAnimationValue).default(
|
|
982
|
+
animate: (value1)=>{
|
|
983
|
+
let animations = (0, _parseAnimationValue).default(value1);
|
|
994
984
|
return [
|
|
995
985
|
...animations.flatMap((animation)=>keyframes[animation.name]
|
|
996
986
|
),
|
|
@@ -1009,7 +999,13 @@ let corePlugins = {
|
|
|
1009
999
|
});
|
|
1010
1000
|
},
|
|
1011
1001
|
cursor: (0, _createUtilityPlugin).default('cursor'),
|
|
1012
|
-
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
|
+
});
|
|
1013
1009
|
addUtilities({
|
|
1014
1010
|
'.touch-auto': {
|
|
1015
1011
|
'touch-action': 'auto'
|
|
@@ -1018,25 +1014,46 @@ let corePlugins = {
|
|
|
1018
1014
|
'touch-action': 'none'
|
|
1019
1015
|
},
|
|
1020
1016
|
'.touch-pan-x': {
|
|
1021
|
-
'touch-action':
|
|
1017
|
+
'@defaults touch-action': {
|
|
1018
|
+
},
|
|
1019
|
+
'--tw-pan-x': 'pan-x',
|
|
1020
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1022
1021
|
},
|
|
1023
1022
|
'.touch-pan-left': {
|
|
1024
|
-
'touch-action':
|
|
1023
|
+
'@defaults touch-action': {
|
|
1024
|
+
},
|
|
1025
|
+
'--tw-pan-x': 'pan-left',
|
|
1026
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1025
1027
|
},
|
|
1026
1028
|
'.touch-pan-right': {
|
|
1027
|
-
'touch-action':
|
|
1029
|
+
'@defaults touch-action': {
|
|
1030
|
+
},
|
|
1031
|
+
'--tw-pan-x': 'pan-right',
|
|
1032
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1028
1033
|
},
|
|
1029
1034
|
'.touch-pan-y': {
|
|
1030
|
-
'touch-action':
|
|
1035
|
+
'@defaults touch-action': {
|
|
1036
|
+
},
|
|
1037
|
+
'--tw-pan-y': 'pan-y',
|
|
1038
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1031
1039
|
},
|
|
1032
1040
|
'.touch-pan-up': {
|
|
1033
|
-
'touch-action':
|
|
1041
|
+
'@defaults touch-action': {
|
|
1042
|
+
},
|
|
1043
|
+
'--tw-pan-y': 'pan-up',
|
|
1044
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1034
1045
|
},
|
|
1035
1046
|
'.touch-pan-down': {
|
|
1036
|
-
'touch-action':
|
|
1047
|
+
'@defaults touch-action': {
|
|
1048
|
+
},
|
|
1049
|
+
'--tw-pan-y': 'pan-down',
|
|
1050
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1037
1051
|
},
|
|
1038
1052
|
'.touch-pinch-zoom': {
|
|
1039
|
-
'touch-action':
|
|
1053
|
+
'@defaults touch-action': {
|
|
1054
|
+
},
|
|
1055
|
+
'--tw-pinch-zoom': 'pinch-zoom',
|
|
1056
|
+
'touch-action': 'var(--tw-touch-action)'
|
|
1040
1057
|
},
|
|
1041
1058
|
'.touch-manipulation': {
|
|
1042
1059
|
'touch-action': 'manipulation'
|
|
@@ -1075,11 +1092,9 @@ let corePlugins = {
|
|
|
1075
1092
|
}
|
|
1076
1093
|
});
|
|
1077
1094
|
},
|
|
1078
|
-
scrollSnapType: ({
|
|
1079
|
-
|
|
1080
|
-
'
|
|
1081
|
-
'--tw-scroll-snap-strictness': 'proximity'
|
|
1082
|
-
}
|
|
1095
|
+
scrollSnapType: ({ addDefaults , addUtilities })=>{
|
|
1096
|
+
addDefaults('scroll-snap-type', {
|
|
1097
|
+
'--tw-scroll-snap-strictness': 'proximity'
|
|
1083
1098
|
});
|
|
1084
1099
|
addUtilities({
|
|
1085
1100
|
'.snap-none': {
|
|
@@ -1660,10 +1675,10 @@ let corePlugins = {
|
|
|
1660
1675
|
}
|
|
1661
1676
|
});
|
|
1662
1677
|
},
|
|
1663
|
-
divideColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
1678
|
+
divideColor: ({ matchUtilities , theme , corePlugins: corePlugins1 })=>{
|
|
1664
1679
|
matchUtilities({
|
|
1665
1680
|
divide: (value)=>{
|
|
1666
|
-
if (!
|
|
1681
|
+
if (!corePlugins1('divideOpacity')) {
|
|
1667
1682
|
return {
|
|
1668
1683
|
['& > :not([hidden]) ~ :not([hidden])']: {
|
|
1669
1684
|
'border-color': (0, _toColorValue).default(value)
|
|
@@ -2074,26 +2089,22 @@ let corePlugins = {
|
|
|
2074
2089
|
}
|
|
2075
2090
|
});
|
|
2076
2091
|
},
|
|
2077
|
-
borderColor: ({
|
|
2078
|
-
if (!
|
|
2092
|
+
borderColor: ({ addDefaults , matchUtilities , theme , corePlugins: corePlugins2 })=>{
|
|
2093
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2079
2094
|
let value = theme('borderColor.DEFAULT', 'currentColor');
|
|
2080
|
-
|
|
2081
|
-
'
|
|
2082
|
-
'border-color': (0, _toColorValue).default(value)
|
|
2083
|
-
}
|
|
2095
|
+
addDefaults('border-width', {
|
|
2096
|
+
'border-color': (0, _toColorValue).default(value)
|
|
2084
2097
|
});
|
|
2085
2098
|
} else {
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
})
|
|
2092
|
-
});
|
|
2099
|
+
addDefaults('border-width', (0, _withAlphaVariable).default({
|
|
2100
|
+
color: theme('borderColor.DEFAULT', 'currentColor'),
|
|
2101
|
+
property: 'border-color',
|
|
2102
|
+
variable: '--tw-border-opacity'
|
|
2103
|
+
}));
|
|
2093
2104
|
}
|
|
2094
2105
|
matchUtilities({
|
|
2095
2106
|
border: (value)=>{
|
|
2096
|
-
if (!
|
|
2107
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2097
2108
|
return {
|
|
2098
2109
|
'border-color': (0, _toColorValue).default(value)
|
|
2099
2110
|
};
|
|
@@ -2113,7 +2124,7 @@ let corePlugins = {
|
|
|
2113
2124
|
});
|
|
2114
2125
|
matchUtilities({
|
|
2115
2126
|
'border-x': (value)=>{
|
|
2116
|
-
if (!
|
|
2127
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2117
2128
|
return {
|
|
2118
2129
|
'border-left-color': (0, _toColorValue).default(value),
|
|
2119
2130
|
'border-right-color': (0, _toColorValue).default(value)
|
|
@@ -2129,7 +2140,7 @@ let corePlugins = {
|
|
|
2129
2140
|
});
|
|
2130
2141
|
},
|
|
2131
2142
|
'border-y': (value)=>{
|
|
2132
|
-
if (!
|
|
2143
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2133
2144
|
return {
|
|
2134
2145
|
'border-top-color': (0, _toColorValue).default(value),
|
|
2135
2146
|
'border-bottom-color': (0, _toColorValue).default(value)
|
|
@@ -2151,7 +2162,7 @@ let corePlugins = {
|
|
|
2151
2162
|
});
|
|
2152
2163
|
matchUtilities({
|
|
2153
2164
|
'border-t': (value)=>{
|
|
2154
|
-
if (!
|
|
2165
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2155
2166
|
return {
|
|
2156
2167
|
'border-top-color': (0, _toColorValue).default(value)
|
|
2157
2168
|
};
|
|
@@ -2163,7 +2174,7 @@ let corePlugins = {
|
|
|
2163
2174
|
});
|
|
2164
2175
|
},
|
|
2165
2176
|
'border-r': (value)=>{
|
|
2166
|
-
if (!
|
|
2177
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2167
2178
|
return {
|
|
2168
2179
|
'border-right-color': (0, _toColorValue).default(value)
|
|
2169
2180
|
};
|
|
@@ -2175,7 +2186,7 @@ let corePlugins = {
|
|
|
2175
2186
|
});
|
|
2176
2187
|
},
|
|
2177
2188
|
'border-b': (value)=>{
|
|
2178
|
-
if (!
|
|
2189
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2179
2190
|
return {
|
|
2180
2191
|
'border-bottom-color': (0, _toColorValue).default(value)
|
|
2181
2192
|
};
|
|
@@ -2187,7 +2198,7 @@ let corePlugins = {
|
|
|
2187
2198
|
});
|
|
2188
2199
|
},
|
|
2189
2200
|
'border-l': (value)=>{
|
|
2190
|
-
if (!
|
|
2201
|
+
if (!corePlugins2('borderOpacity')) {
|
|
2191
2202
|
return {
|
|
2192
2203
|
'border-left-color': (0, _toColorValue).default(value)
|
|
2193
2204
|
};
|
|
@@ -2212,10 +2223,10 @@ let corePlugins = {
|
|
|
2212
2223
|
]
|
|
2213
2224
|
],
|
|
2214
2225
|
]),
|
|
2215
|
-
backgroundColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
2226
|
+
backgroundColor: ({ matchUtilities , theme , corePlugins: corePlugins3 })=>{
|
|
2216
2227
|
matchUtilities({
|
|
2217
2228
|
bg: (value)=>{
|
|
2218
|
-
if (!
|
|
2229
|
+
if (!corePlugins3('backgroundOpacity')) {
|
|
2219
2230
|
return {
|
|
2220
2231
|
'background-color': (0, _toColorValue).default(value)
|
|
2221
2232
|
};
|
|
@@ -2296,6 +2307,12 @@ let corePlugins = {
|
|
|
2296
2307
|
},
|
|
2297
2308
|
'.decoration-clone': {
|
|
2298
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'
|
|
2299
2316
|
}
|
|
2300
2317
|
});
|
|
2301
2318
|
},
|
|
@@ -2735,10 +2752,10 @@ let corePlugins = {
|
|
|
2735
2752
|
], {
|
|
2736
2753
|
supportsNegativeValues: true
|
|
2737
2754
|
}),
|
|
2738
|
-
textColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
2755
|
+
textColor: ({ matchUtilities , theme , corePlugins: corePlugins4 })=>{
|
|
2739
2756
|
matchUtilities({
|
|
2740
2757
|
text: (value)=>{
|
|
2741
|
-
if (!
|
|
2758
|
+
if (!corePlugins4('textOpacity')) {
|
|
2742
2759
|
return {
|
|
2743
2760
|
color: (0, _toColorValue).default(value)
|
|
2744
2761
|
};
|
|
@@ -2765,13 +2782,16 @@ let corePlugins = {
|
|
|
2765
2782
|
textDecoration: ({ addUtilities })=>{
|
|
2766
2783
|
addUtilities({
|
|
2767
2784
|
'.underline': {
|
|
2768
|
-
'text-decoration': 'underline'
|
|
2785
|
+
'text-decoration-line': 'underline'
|
|
2786
|
+
},
|
|
2787
|
+
'.overline': {
|
|
2788
|
+
'text-decoration-line': 'overline'
|
|
2769
2789
|
},
|
|
2770
2790
|
'.line-through': {
|
|
2771
|
-
'text-decoration': 'line-through'
|
|
2791
|
+
'text-decoration-line': 'line-through'
|
|
2772
2792
|
},
|
|
2773
2793
|
'.no-underline': {
|
|
2774
|
-
'text-decoration': 'none'
|
|
2794
|
+
'text-decoration-line': 'none'
|
|
2775
2795
|
}
|
|
2776
2796
|
});
|
|
2777
2797
|
},
|
|
@@ -2785,11 +2805,55 @@ let corePlugins = {
|
|
|
2785
2805
|
}, {
|
|
2786
2806
|
values: (0, _flattenColorPalette).default(theme('textDecorationColor')),
|
|
2787
2807
|
type: [
|
|
2788
|
-
'color'
|
|
2789
|
-
'any'
|
|
2808
|
+
'color'
|
|
2790
2809
|
]
|
|
2791
2810
|
});
|
|
2792
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
|
+
}),
|
|
2793
2857
|
fontSmoothing: ({ addUtilities })=>{
|
|
2794
2858
|
addUtilities({
|
|
2795
2859
|
'.antialiased': {
|
|
@@ -2802,10 +2866,10 @@ let corePlugins = {
|
|
|
2802
2866
|
}
|
|
2803
2867
|
});
|
|
2804
2868
|
},
|
|
2805
|
-
placeholderColor: ({ matchUtilities , theme , corePlugins })=>{
|
|
2869
|
+
placeholderColor: ({ matchUtilities , theme , corePlugins: corePlugins5 })=>{
|
|
2806
2870
|
matchUtilities({
|
|
2807
2871
|
placeholder: (value)=>{
|
|
2808
|
-
if (!
|
|
2872
|
+
if (!corePlugins5('placeholderOpacity')) {
|
|
2809
2873
|
return {
|
|
2810
2874
|
'&::placeholder': {
|
|
2811
2875
|
color: (0, _toColorValue).default(value)
|
|
@@ -2990,29 +3054,55 @@ let corePlugins = {
|
|
|
2990
3054
|
`var(--tw-ring-shadow, 0 0 #0000)`,
|
|
2991
3055
|
`var(--tw-shadow)`,
|
|
2992
3056
|
].join(', ');
|
|
2993
|
-
return function({ matchUtilities ,
|
|
2994
|
-
|
|
2995
|
-
'
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
}
|
|
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'
|
|
3000
3063
|
});
|
|
3001
3064
|
matchUtilities({
|
|
3002
3065
|
shadow: (value)=>{
|
|
3003
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
|
+
}
|
|
3004
3075
|
return {
|
|
3005
3076
|
'@defaults box-shadow': {
|
|
3006
3077
|
},
|
|
3007
3078
|
'--tw-shadow': value === 'none' ? '0 0 #0000' : value,
|
|
3079
|
+
'--tw-shadow-colored': value === 'none' ? '0 0 #0000' : (0, _parseBoxShadowValue).formatBoxShadowValue(ast),
|
|
3008
3080
|
'box-shadow': defaultBoxShadow
|
|
3009
3081
|
};
|
|
3010
3082
|
}
|
|
3011
3083
|
}, {
|
|
3012
|
-
values: theme('boxShadow')
|
|
3084
|
+
values: theme('boxShadow'),
|
|
3085
|
+
type: [
|
|
3086
|
+
'shadow'
|
|
3087
|
+
]
|
|
3013
3088
|
});
|
|
3014
3089
|
};
|
|
3015
3090
|
})(),
|
|
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
|
+
},
|
|
3016
3106
|
outlineStyle: ({ addUtilities })=>{
|
|
3017
3107
|
addUtilities({
|
|
3018
3108
|
'.outline-none': {
|
|
@@ -3078,19 +3168,18 @@ let corePlugins = {
|
|
|
3078
3168
|
]
|
|
3079
3169
|
});
|
|
3080
3170
|
},
|
|
3081
|
-
ringWidth: ({ matchUtilities ,
|
|
3171
|
+
ringWidth: ({ matchUtilities , addDefaults , addUtilities , theme })=>{
|
|
3082
3172
|
let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5');
|
|
3083
3173
|
let ringColorDefault = (0, _withAlphaVariable).withAlphaValue(theme('ringColor.DEFAULT'), ringOpacityDefault, `rgb(147 197 253 / ${ringOpacityDefault})`);
|
|
3084
|
-
|
|
3085
|
-
'
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
}
|
|
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'
|
|
3094
3183
|
});
|
|
3095
3184
|
matchUtilities({
|
|
3096
3185
|
ring: (value)=>{
|
|
@@ -3293,30 +3382,28 @@ let corePlugins = {
|
|
|
3293
3382
|
values: theme('sepia')
|
|
3294
3383
|
});
|
|
3295
3384
|
},
|
|
3296
|
-
filter: ({
|
|
3297
|
-
|
|
3298
|
-
'
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
'--tw-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
].join(' ')
|
|
3319
|
-
}
|
|
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(' ')
|
|
3320
3407
|
});
|
|
3321
3408
|
addUtilities({
|
|
3322
3409
|
'.filter': {
|
|
@@ -3456,30 +3543,28 @@ let corePlugins = {
|
|
|
3456
3543
|
values: theme('backdropSepia')
|
|
3457
3544
|
});
|
|
3458
3545
|
},
|
|
3459
|
-
backdropFilter: ({
|
|
3460
|
-
|
|
3461
|
-
'
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
'--tw-backdrop-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
].join(' ')
|
|
3482
|
-
}
|
|
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(' ')
|
|
3483
3568
|
});
|
|
3484
3569
|
addUtilities({
|
|
3485
3570
|
'.backdrop-filter': {
|