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.
Files changed (61) hide show
  1. package/CHANGELOG.md +84 -3
  2. package/colors.js +2 -1
  3. package/defaultConfig.js +2 -1
  4. package/defaultTheme.js +2 -1
  5. package/lib/cli.js +32 -32
  6. package/lib/constants.js +1 -1
  7. package/lib/corePluginList.js +4 -0
  8. package/lib/corePlugins.js +257 -172
  9. package/lib/css/preflight.css +4 -3
  10. package/lib/featureFlags.js +6 -4
  11. package/lib/lib/collapseDuplicateDeclarations.js +2 -2
  12. package/lib/lib/detectNesting.js +17 -2
  13. package/lib/lib/evaluateTailwindFunctions.js +9 -5
  14. package/lib/lib/expandApplyAtRules.js +26 -9
  15. package/lib/lib/expandTailwindAtRules.js +27 -1
  16. package/lib/lib/generateRules.js +64 -10
  17. package/lib/lib/resolveDefaultsAtRules.js +25 -11
  18. package/lib/lib/setupContextUtils.js +55 -78
  19. package/lib/lib/sharedState.js +1 -1
  20. package/lib/lib/substituteScreenAtRules.js +7 -4
  21. package/lib/util/buildMediaQuery.js +13 -24
  22. package/lib/util/createUtilityPlugin.js +2 -2
  23. package/lib/util/dataTypes.js +25 -3
  24. package/lib/util/defaults.js +6 -0
  25. package/lib/util/formatVariantSelector.js +93 -9
  26. package/lib/util/isValidArbitraryValue.js +64 -0
  27. package/lib/util/log.js +4 -0
  28. package/lib/util/nameClass.js +1 -0
  29. package/lib/util/normalizeConfig.js +41 -12
  30. package/lib/util/normalizeScreens.js +61 -0
  31. package/lib/util/parseBoxShadowValue.js +77 -0
  32. package/lib/util/pluginUtils.js +12 -11
  33. package/lib/util/resolveConfig.js +12 -12
  34. package/package.json +15 -14
  35. package/peers/index.js +3798 -3098
  36. package/plugin.js +2 -1
  37. package/resolveConfig.js +2 -1
  38. package/src/corePluginList.js +1 -1
  39. package/src/corePlugins.js +232 -164
  40. package/src/css/preflight.css +4 -3
  41. package/src/featureFlags.js +5 -1
  42. package/src/lib/detectNesting.js +22 -3
  43. package/src/lib/evaluateTailwindFunctions.js +5 -2
  44. package/src/lib/expandApplyAtRules.js +29 -2
  45. package/src/lib/expandTailwindAtRules.js +25 -0
  46. package/src/lib/generateRules.js +57 -0
  47. package/src/lib/resolveDefaultsAtRules.js +28 -7
  48. package/src/lib/setupContextUtils.js +45 -64
  49. package/src/lib/substituteScreenAtRules.js +6 -3
  50. package/src/util/buildMediaQuery.js +14 -18
  51. package/src/util/dataTypes.js +24 -6
  52. package/src/util/defaults.js +6 -0
  53. package/src/util/formatVariantSelector.js +92 -1
  54. package/src/util/isValidArbitraryValue.js +61 -0
  55. package/src/util/log.js +4 -0
  56. package/src/util/nameClass.js +1 -1
  57. package/src/util/normalizeConfig.js +14 -1
  58. package/src/util/normalizeScreens.js +45 -0
  59. package/src/util/parseBoxShadowValue.js +71 -0
  60. package/src/util/pluginUtils.js +2 -0
  61. package/stubs/defaultConfig.stub.js +23 -5
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.variantPlugins = exports.corePlugins = void 0;
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 in theme('screens')){
200
- let size = theme('screens')[screen];
201
- let query = (0, _buildMediaQuery).default(size);
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 Object.values(breakpoints !== null && breakpoints !== void 0 ? breakpoints : {
220
- }).flatMap((breakpoints)=>{
221
- if (typeof breakpoints === 'string') {
222
- breakpoints = {
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 [screen, value] of Object.entries(screens)){
263
- let screenMinWidth = typeof value === 'object' && value !== null ? value.min || value['min-width'] : value;
264
- if (`${screenMinWidth}` === `${minWidth}`) {
265
- mapping.push({
266
- screen,
267
- minWidth,
268
- padding: paddings[screen]
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)=>`${padding.minWidth}` === `${minWidth}`
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
- transform: ({ addBase , addUtilities })=>{
926
- addBase({
927
- '@defaults transform': {
928
- '--tw-translate-x': '0',
929
- '--tw-translate-y': '0',
930
- '--tw-rotate': '0',
931
- '--tw-skew-x': '0',
932
- '--tw-skew-y': '0',
933
- '--tw-scale-x': '1',
934
- '--tw-scale-y': '1',
935
- '--tw-transform': [
936
- 'translateX(var(--tw-translate-x))',
937
- 'translateY(var(--tw-translate-y))',
938
- 'rotate(var(--tw-rotate))',
939
- 'skewX(var(--tw-skew-x))',
940
- 'skewY(var(--tw-skew-y))',
941
- 'scaleX(var(--tw-scale-x))',
942
- 'scaleY(var(--tw-scale-y))',
943
- ].join(' ')
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: (value)=>{
993
- let animations = (0, _parseAnimationValue).default(value);
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': 'pan-x'
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': 'pan-left'
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': 'pan-right'
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': 'pan-y'
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': 'pan-up'
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': 'pan-down'
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': 'pinch-zoom'
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: ({ addUtilities , addBase })=>{
1079
- addBase({
1080
- '@defaults scroll-snap-type': {
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 (!corePlugins('divideOpacity')) {
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: ({ addBase , matchUtilities , theme , corePlugins })=>{
2078
- if (!corePlugins('borderOpacity')) {
2092
+ borderColor: ({ addDefaults , matchUtilities , theme , corePlugins: corePlugins2 })=>{
2093
+ if (!corePlugins2('borderOpacity')) {
2079
2094
  let value = theme('borderColor.DEFAULT', 'currentColor');
2080
- addBase({
2081
- '@defaults border-width': {
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
- addBase({
2087
- '@defaults border-width': (0, _withAlphaVariable).default({
2088
- color: theme('borderColor.DEFAULT', 'currentColor'),
2089
- property: 'border-color',
2090
- variable: '--tw-border-opacity'
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 (!corePlugins('borderOpacity')) {
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 (!corePlugins('borderOpacity')) {
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 (!corePlugins('borderOpacity')) {
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 (!corePlugins('borderOpacity')) {
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 (!corePlugins('borderOpacity')) {
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 (!corePlugins('borderOpacity')) {
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 (!corePlugins('borderOpacity')) {
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 (!corePlugins('backgroundOpacity')) {
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 (!corePlugins('textOpacity')) {
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 (!corePlugins('placeholderOpacity')) {
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 , addBase , theme }) {
2994
- addBase({
2995
- '@defaults box-shadow': {
2996
- '--tw-ring-offset-shadow': '0 0 #0000',
2997
- '--tw-ring-shadow': '0 0 #0000',
2998
- '--tw-shadow': '0 0 #0000'
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 , addBase , addUtilities , theme })=>{
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
- addBase({
3085
- '@defaults ring-width': {
3086
- '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
3087
- '--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
3088
- '--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
3089
- '--tw-ring-color': ringColorDefault,
3090
- '--tw-ring-offset-shadow': '0 0 #0000',
3091
- '--tw-ring-shadow': '0 0 #0000',
3092
- '--tw-shadow': '0 0 #0000'
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: ({ addBase , addUtilities })=>{
3297
- addBase({
3298
- '@defaults filter': {
3299
- '--tw-blur': 'var(--tw-empty,/*!*/ /*!*/)',
3300
- '--tw-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
3301
- '--tw-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
3302
- '--tw-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
3303
- '--tw-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
3304
- '--tw-invert': 'var(--tw-empty,/*!*/ /*!*/)',
3305
- '--tw-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
3306
- '--tw-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
3307
- '--tw-drop-shadow': 'var(--tw-empty,/*!*/ /*!*/)',
3308
- '--tw-filter': [
3309
- 'var(--tw-blur)',
3310
- 'var(--tw-brightness)',
3311
- 'var(--tw-contrast)',
3312
- 'var(--tw-grayscale)',
3313
- 'var(--tw-hue-rotate)',
3314
- 'var(--tw-invert)',
3315
- 'var(--tw-saturate)',
3316
- 'var(--tw-sepia)',
3317
- 'var(--tw-drop-shadow)',
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: ({ addBase , addUtilities })=>{
3460
- addBase({
3461
- '@defaults backdrop-filter': {
3462
- '--tw-backdrop-blur': 'var(--tw-empty,/*!*/ /*!*/)',
3463
- '--tw-backdrop-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
3464
- '--tw-backdrop-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
3465
- '--tw-backdrop-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
3466
- '--tw-backdrop-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
3467
- '--tw-backdrop-invert': 'var(--tw-empty,/*!*/ /*!*/)',
3468
- '--tw-backdrop-opacity': 'var(--tw-empty,/*!*/ /*!*/)',
3469
- '--tw-backdrop-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
3470
- '--tw-backdrop-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
3471
- '--tw-backdrop-filter': [
3472
- 'var(--tw-backdrop-blur)',
3473
- 'var(--tw-backdrop-brightness)',
3474
- 'var(--tw-backdrop-contrast)',
3475
- 'var(--tw-backdrop-grayscale)',
3476
- 'var(--tw-backdrop-hue-rotate)',
3477
- 'var(--tw-backdrop-invert)',
3478
- 'var(--tw-backdrop-opacity)',
3479
- 'var(--tw-backdrop-saturate)',
3480
- 'var(--tw-backdrop-sepia)',
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': {