tailwindcss 3.0.0-alpha.2 → 3.0.3

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 (53) hide show
  1. package/CHANGELOG.md +59 -2
  2. package/colors.js +2 -1
  3. package/defaultConfig.js +2 -1
  4. package/defaultTheme.js +2 -1
  5. package/lib/cli.js +58 -58
  6. package/lib/corePluginList.js +3 -0
  7. package/lib/corePlugins.js +227 -172
  8. package/lib/css/preflight.css +5 -3
  9. package/lib/featureFlags.js +3 -1
  10. package/lib/lib/detectNesting.js +17 -2
  11. package/lib/lib/evaluateTailwindFunctions.js +6 -2
  12. package/lib/lib/expandApplyAtRules.js +23 -6
  13. package/lib/lib/expandTailwindAtRules.js +19 -1
  14. package/lib/lib/generateRules.js +54 -0
  15. package/lib/lib/resolveDefaultsAtRules.js +23 -9
  16. package/lib/lib/setupContextUtils.js +48 -71
  17. package/lib/lib/substituteScreenAtRules.js +7 -4
  18. package/lib/util/buildMediaQuery.js +13 -24
  19. package/lib/util/dataTypes.js +14 -3
  20. package/lib/util/defaults.js +6 -0
  21. package/lib/util/formatVariantSelector.js +88 -4
  22. package/lib/util/isValidArbitraryValue.js +64 -0
  23. package/lib/util/log.js +4 -0
  24. package/lib/util/nameClass.js +1 -0
  25. package/lib/util/normalizeConfig.js +34 -5
  26. package/lib/util/normalizeScreens.js +61 -0
  27. package/lib/util/resolveConfig.js +8 -8
  28. package/package.json +14 -13
  29. package/peers/index.js +3739 -3027
  30. package/plugin.js +2 -1
  31. package/resolveConfig.js +2 -1
  32. package/src/corePluginList.js +1 -1
  33. package/src/corePlugins.js +205 -165
  34. package/src/css/preflight.css +5 -3
  35. package/src/featureFlags.js +5 -1
  36. package/src/lib/detectNesting.js +22 -3
  37. package/src/lib/evaluateTailwindFunctions.js +5 -2
  38. package/src/lib/expandApplyAtRules.js +29 -2
  39. package/src/lib/expandTailwindAtRules.js +18 -0
  40. package/src/lib/generateRules.js +57 -0
  41. package/src/lib/resolveDefaultsAtRules.js +28 -7
  42. package/src/lib/setupContextUtils.js +45 -64
  43. package/src/lib/substituteScreenAtRules.js +6 -3
  44. package/src/util/buildMediaQuery.js +14 -18
  45. package/src/util/dataTypes.js +11 -6
  46. package/src/util/defaults.js +6 -0
  47. package/src/util/formatVariantSelector.js +92 -1
  48. package/src/util/isValidArbitraryValue.js +61 -0
  49. package/src/util/log.js +4 -0
  50. package/src/util/nameClass.js +1 -1
  51. package/src/util/normalizeConfig.js +14 -1
  52. package/src/util/normalizeScreens.js +45 -0
  53. package/stubs/defaultConfig.stub.js +17 -0
@@ -16,6 +16,7 @@ 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");
19
20
  var _parseBoxShadowValue = require("./util/parseBoxShadowValue");
20
21
  function _interopRequireDefault(obj) {
21
22
  return obj && obj.__esModule ? obj : {
@@ -58,6 +59,7 @@ let variantPlugins = {
58
59
  '&::selection'
59
60
  ]);
60
61
  addVariant('file', '&::file-selector-button');
62
+ addVariant('placeholder', '&::placeholder');
61
63
  addVariant('before', ({ container })=>{
62
64
  container.walkRules((rule)=>{
63
65
  let foundContent = false;
@@ -197,15 +199,18 @@ let variantPlugins = {
197
199
  addVariant('print', '@media print');
198
200
  },
199
201
  screenVariants: ({ theme , addVariant })=>{
200
- for(let screen in theme('screens')){
201
- let size = theme('screens')[screen];
202
- let query = (0, _buildMediaQuery).default(size);
203
- 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}`);
204
205
  }
206
+ },
207
+ orientationVariants: ({ addVariant })=>{
208
+ addVariant('portrait', '@media (orientation: portrait)');
209
+ addVariant('landscape', '@media (orientation: landscape)');
205
210
  }
206
211
  };
207
212
  exports.variantPlugins = variantPlugins;
208
- let corePlugins1 = {
213
+ let corePlugins = {
209
214
  preflight: ({ addBase })=>{
210
215
  let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(path.join(__dirname, './css/preflight.css'), 'utf8'));
211
216
  addBase([
@@ -216,27 +221,11 @@ let corePlugins1 = {
216
221
  ]);
217
222
  },
218
223
  container: (()=>{
219
- function extractMinWidths(breakpoints1) {
220
- return Object.values(breakpoints1 !== null && breakpoints1 !== void 0 ? breakpoints1 : {
221
- }).flatMap((breakpoints)=>{
222
- if (typeof breakpoints === 'string') {
223
- breakpoints = {
224
- min: breakpoints
225
- };
226
- }
227
- if (!Array.isArray(breakpoints)) {
228
- breakpoints = [
229
- breakpoints
230
- ];
231
- }
232
- return breakpoints.filter((breakpoint)=>{
233
- var ref;
234
- 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'));
235
- }).map((breakpoint)=>{
236
- var ref;
237
- return (ref = breakpoint['min-width']) !== null && ref !== void 0 ? ref : breakpoint.min;
238
- });
239
- });
224
+ function extractMinWidths(breakpoints = []) {
225
+ return breakpoints.flatMap((breakpoint1)=>breakpoint1.values.map((breakpoint)=>breakpoint.min
226
+ )
227
+ ).filter((v)=>v !== undefined
228
+ );
240
229
  }
241
230
  function mapMinWidthsToPadding(minWidths, screens, paddings) {
242
231
  if (typeof paddings === 'undefined') {
@@ -260,25 +249,25 @@ let corePlugins1 = {
260
249
  });
261
250
  }
262
251
  for (let minWidth of minWidths){
263
- for (let [screen, value] of Object.entries(screens)){
264
- let screenMinWidth = typeof value === 'object' && value !== null ? value.min || value['min-width'] : value;
265
- if (`${screenMinWidth}` === `${minWidth}`) {
266
- mapping.push({
267
- screen,
268
- minWidth,
269
- padding: paddings[screen]
270
- });
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
+ }
271
260
  }
272
261
  }
273
262
  }
274
263
  return mapping;
275
264
  }
276
265
  return function({ addComponents , theme }) {
277
- let screens = theme('container.screens', theme('screens'));
266
+ let screens = (0, _normalizeScreens).normalizeScreens(theme('container.screens', theme('screens')));
278
267
  let minWidths = extractMinWidths(screens);
279
268
  let paddings = mapMinWidthsToPadding(minWidths, screens, theme('container.padding'));
280
269
  let generatePaddingFor = (minWidth)=>{
281
- let paddingConfig = paddings.find((padding)=>`${padding.minWidth}` === `${minWidth}`
270
+ let paddingConfig = paddings.find((padding)=>padding.minWidth === minWidth
282
271
  );
283
272
  if (!paddingConfig) {
284
273
  return {
@@ -922,27 +911,27 @@ let corePlugins1 = {
922
911
  ],
923
912
  ],
924
913
  ],
925
- ]),
926
- transform: ({ addBase , addUtilities })=>{
927
- addBase({
928
- '@defaults transform': {
929
- '--tw-translate-x': '0',
930
- '--tw-translate-y': '0',
931
- '--tw-rotate': '0',
932
- '--tw-skew-x': '0',
933
- '--tw-skew-y': '0',
934
- '--tw-scale-x': '1',
935
- '--tw-scale-y': '1',
936
- '--tw-transform': [
937
- 'translateX(var(--tw-translate-x))',
938
- 'translateY(var(--tw-translate-y))',
939
- 'rotate(var(--tw-rotate))',
940
- 'skewX(var(--tw-skew-x))',
941
- 'skewY(var(--tw-skew-y))',
942
- 'scaleX(var(--tw-scale-x))',
943
- 'scaleY(var(--tw-scale-y))',
944
- ].join(' ')
945
- }
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(' ')
946
935
  });
947
936
  addUtilities({
948
937
  '.transform': {
@@ -1010,7 +999,13 @@ let corePlugins1 = {
1010
999
  });
1011
1000
  },
1012
1001
  cursor: (0, _createUtilityPlugin).default('cursor'),
1013
- 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
+ });
1014
1009
  addUtilities({
1015
1010
  '.touch-auto': {
1016
1011
  'touch-action': 'auto'
@@ -1019,25 +1014,46 @@ let corePlugins1 = {
1019
1014
  'touch-action': 'none'
1020
1015
  },
1021
1016
  '.touch-pan-x': {
1022
- 'touch-action': 'pan-x'
1017
+ '@defaults touch-action': {
1018
+ },
1019
+ '--tw-pan-x': 'pan-x',
1020
+ 'touch-action': 'var(--tw-touch-action)'
1023
1021
  },
1024
1022
  '.touch-pan-left': {
1025
- 'touch-action': 'pan-left'
1023
+ '@defaults touch-action': {
1024
+ },
1025
+ '--tw-pan-x': 'pan-left',
1026
+ 'touch-action': 'var(--tw-touch-action)'
1026
1027
  },
1027
1028
  '.touch-pan-right': {
1028
- 'touch-action': 'pan-right'
1029
+ '@defaults touch-action': {
1030
+ },
1031
+ '--tw-pan-x': 'pan-right',
1032
+ 'touch-action': 'var(--tw-touch-action)'
1029
1033
  },
1030
1034
  '.touch-pan-y': {
1031
- 'touch-action': 'pan-y'
1035
+ '@defaults touch-action': {
1036
+ },
1037
+ '--tw-pan-y': 'pan-y',
1038
+ 'touch-action': 'var(--tw-touch-action)'
1032
1039
  },
1033
1040
  '.touch-pan-up': {
1034
- 'touch-action': 'pan-up'
1041
+ '@defaults touch-action': {
1042
+ },
1043
+ '--tw-pan-y': 'pan-up',
1044
+ 'touch-action': 'var(--tw-touch-action)'
1035
1045
  },
1036
1046
  '.touch-pan-down': {
1037
- 'touch-action': 'pan-down'
1047
+ '@defaults touch-action': {
1048
+ },
1049
+ '--tw-pan-y': 'pan-down',
1050
+ 'touch-action': 'var(--tw-touch-action)'
1038
1051
  },
1039
1052
  '.touch-pinch-zoom': {
1040
- 'touch-action': 'pinch-zoom'
1053
+ '@defaults touch-action': {
1054
+ },
1055
+ '--tw-pinch-zoom': 'pinch-zoom',
1056
+ 'touch-action': 'var(--tw-touch-action)'
1041
1057
  },
1042
1058
  '.touch-manipulation': {
1043
1059
  'touch-action': 'manipulation'
@@ -1076,11 +1092,9 @@ let corePlugins1 = {
1076
1092
  }
1077
1093
  });
1078
1094
  },
1079
- scrollSnapType: ({ addUtilities , addBase })=>{
1080
- addBase({
1081
- '@defaults scroll-snap-type': {
1082
- '--tw-scroll-snap-strictness': 'proximity'
1083
- }
1095
+ scrollSnapType: ({ addDefaults , addUtilities })=>{
1096
+ addDefaults('scroll-snap-type', {
1097
+ '--tw-scroll-snap-strictness': 'proximity'
1084
1098
  });
1085
1099
  addUtilities({
1086
1100
  '.snap-none': {
@@ -1661,10 +1675,10 @@ let corePlugins1 = {
1661
1675
  }
1662
1676
  });
1663
1677
  },
1664
- divideColor: ({ matchUtilities , theme , corePlugins })=>{
1678
+ divideColor: ({ matchUtilities , theme , corePlugins: corePlugins1 })=>{
1665
1679
  matchUtilities({
1666
1680
  divide: (value)=>{
1667
- if (!corePlugins('divideOpacity')) {
1681
+ if (!corePlugins1('divideOpacity')) {
1668
1682
  return {
1669
1683
  ['& > :not([hidden]) ~ :not([hidden])']: {
1670
1684
  'border-color': (0, _toColorValue).default(value)
@@ -2075,26 +2089,22 @@ let corePlugins1 = {
2075
2089
  }
2076
2090
  });
2077
2091
  },
2078
- borderColor: ({ addBase , matchUtilities , theme , corePlugins })=>{
2079
- if (!corePlugins('borderOpacity')) {
2092
+ borderColor: ({ addDefaults , matchUtilities , theme , corePlugins: corePlugins2 })=>{
2093
+ if (!corePlugins2('borderOpacity')) {
2080
2094
  let value = theme('borderColor.DEFAULT', 'currentColor');
2081
- addBase({
2082
- '@defaults border-width': {
2083
- 'border-color': (0, _toColorValue).default(value)
2084
- }
2095
+ addDefaults('border-width', {
2096
+ 'border-color': (0, _toColorValue).default(value)
2085
2097
  });
2086
2098
  } else {
2087
- addBase({
2088
- '@defaults border-width': (0, _withAlphaVariable).default({
2089
- color: theme('borderColor.DEFAULT', 'currentColor'),
2090
- property: 'border-color',
2091
- variable: '--tw-border-opacity'
2092
- })
2093
- });
2099
+ addDefaults('border-width', (0, _withAlphaVariable).default({
2100
+ color: theme('borderColor.DEFAULT', 'currentColor'),
2101
+ property: 'border-color',
2102
+ variable: '--tw-border-opacity'
2103
+ }));
2094
2104
  }
2095
2105
  matchUtilities({
2096
2106
  border: (value)=>{
2097
- if (!corePlugins('borderOpacity')) {
2107
+ if (!corePlugins2('borderOpacity')) {
2098
2108
  return {
2099
2109
  'border-color': (0, _toColorValue).default(value)
2100
2110
  };
@@ -2114,7 +2124,7 @@ let corePlugins1 = {
2114
2124
  });
2115
2125
  matchUtilities({
2116
2126
  'border-x': (value)=>{
2117
- if (!corePlugins('borderOpacity')) {
2127
+ if (!corePlugins2('borderOpacity')) {
2118
2128
  return {
2119
2129
  'border-left-color': (0, _toColorValue).default(value),
2120
2130
  'border-right-color': (0, _toColorValue).default(value)
@@ -2130,7 +2140,7 @@ let corePlugins1 = {
2130
2140
  });
2131
2141
  },
2132
2142
  'border-y': (value)=>{
2133
- if (!corePlugins('borderOpacity')) {
2143
+ if (!corePlugins2('borderOpacity')) {
2134
2144
  return {
2135
2145
  'border-top-color': (0, _toColorValue).default(value),
2136
2146
  'border-bottom-color': (0, _toColorValue).default(value)
@@ -2152,7 +2162,7 @@ let corePlugins1 = {
2152
2162
  });
2153
2163
  matchUtilities({
2154
2164
  'border-t': (value)=>{
2155
- if (!corePlugins('borderOpacity')) {
2165
+ if (!corePlugins2('borderOpacity')) {
2156
2166
  return {
2157
2167
  'border-top-color': (0, _toColorValue).default(value)
2158
2168
  };
@@ -2164,7 +2174,7 @@ let corePlugins1 = {
2164
2174
  });
2165
2175
  },
2166
2176
  'border-r': (value)=>{
2167
- if (!corePlugins('borderOpacity')) {
2177
+ if (!corePlugins2('borderOpacity')) {
2168
2178
  return {
2169
2179
  'border-right-color': (0, _toColorValue).default(value)
2170
2180
  };
@@ -2176,7 +2186,7 @@ let corePlugins1 = {
2176
2186
  });
2177
2187
  },
2178
2188
  'border-b': (value)=>{
2179
- if (!corePlugins('borderOpacity')) {
2189
+ if (!corePlugins2('borderOpacity')) {
2180
2190
  return {
2181
2191
  'border-bottom-color': (0, _toColorValue).default(value)
2182
2192
  };
@@ -2188,7 +2198,7 @@ let corePlugins1 = {
2188
2198
  });
2189
2199
  },
2190
2200
  'border-l': (value)=>{
2191
- if (!corePlugins('borderOpacity')) {
2201
+ if (!corePlugins2('borderOpacity')) {
2192
2202
  return {
2193
2203
  'border-left-color': (0, _toColorValue).default(value)
2194
2204
  };
@@ -2213,10 +2223,10 @@ let corePlugins1 = {
2213
2223
  ]
2214
2224
  ],
2215
2225
  ]),
2216
- backgroundColor: ({ matchUtilities , theme , corePlugins })=>{
2226
+ backgroundColor: ({ matchUtilities , theme , corePlugins: corePlugins3 })=>{
2217
2227
  matchUtilities({
2218
2228
  bg: (value)=>{
2219
- if (!corePlugins('backgroundOpacity')) {
2229
+ if (!corePlugins3('backgroundOpacity')) {
2220
2230
  return {
2221
2231
  'background-color': (0, _toColorValue).default(value)
2222
2232
  };
@@ -2297,6 +2307,12 @@ let corePlugins1 = {
2297
2307
  },
2298
2308
  '.decoration-clone': {
2299
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'
2300
2316
  }
2301
2317
  });
2302
2318
  },
@@ -2736,10 +2752,10 @@ let corePlugins1 = {
2736
2752
  ], {
2737
2753
  supportsNegativeValues: true
2738
2754
  }),
2739
- textColor: ({ matchUtilities , theme , corePlugins })=>{
2755
+ textColor: ({ matchUtilities , theme , corePlugins: corePlugins4 })=>{
2740
2756
  matchUtilities({
2741
2757
  text: (value)=>{
2742
- if (!corePlugins('textOpacity')) {
2758
+ if (!corePlugins4('textOpacity')) {
2743
2759
  return {
2744
2760
  color: (0, _toColorValue).default(value)
2745
2761
  };
@@ -2766,13 +2782,16 @@ let corePlugins1 = {
2766
2782
  textDecoration: ({ addUtilities })=>{
2767
2783
  addUtilities({
2768
2784
  '.underline': {
2769
- 'text-decoration': 'underline'
2785
+ 'text-decoration-line': 'underline'
2786
+ },
2787
+ '.overline': {
2788
+ 'text-decoration-line': 'overline'
2770
2789
  },
2771
2790
  '.line-through': {
2772
- 'text-decoration': 'line-through'
2791
+ 'text-decoration-line': 'line-through'
2773
2792
  },
2774
2793
  '.no-underline': {
2775
- 'text-decoration': 'none'
2794
+ 'text-decoration-line': 'none'
2776
2795
  }
2777
2796
  });
2778
2797
  },
@@ -2786,11 +2805,55 @@ let corePlugins1 = {
2786
2805
  }, {
2787
2806
  values: (0, _flattenColorPalette).default(theme('textDecorationColor')),
2788
2807
  type: [
2789
- 'color',
2790
- 'any'
2808
+ 'color'
2791
2809
  ]
2792
2810
  });
2793
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
+ }),
2794
2857
  fontSmoothing: ({ addUtilities })=>{
2795
2858
  addUtilities({
2796
2859
  '.antialiased': {
@@ -2803,10 +2866,10 @@ let corePlugins1 = {
2803
2866
  }
2804
2867
  });
2805
2868
  },
2806
- placeholderColor: ({ matchUtilities , theme , corePlugins })=>{
2869
+ placeholderColor: ({ matchUtilities , theme , corePlugins: corePlugins5 })=>{
2807
2870
  matchUtilities({
2808
2871
  placeholder: (value)=>{
2809
- if (!corePlugins('placeholderOpacity')) {
2872
+ if (!corePlugins5('placeholderOpacity')) {
2810
2873
  return {
2811
2874
  '&::placeholder': {
2812
2875
  color: (0, _toColorValue).default(value)
@@ -2991,14 +3054,12 @@ let corePlugins1 = {
2991
3054
  `var(--tw-ring-shadow, 0 0 #0000)`,
2992
3055
  `var(--tw-shadow)`,
2993
3056
  ].join(', ');
2994
- return function({ matchUtilities , addBase , theme }) {
2995
- addBase({
2996
- '@defaults box-shadow': {
2997
- '--tw-ring-offset-shadow': '0 0 #0000',
2998
- '--tw-ring-shadow': '0 0 #0000',
2999
- '--tw-shadow': '0 0 #0000',
3000
- '--tw-shadow-colored': '0 0 #0000'
3001
- }
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'
3002
3063
  });
3003
3064
  matchUtilities({
3004
3065
  shadow: (value)=>{
@@ -3107,20 +3168,18 @@ let corePlugins1 = {
3107
3168
  ]
3108
3169
  });
3109
3170
  },
3110
- ringWidth: ({ matchUtilities , addBase , addUtilities , theme })=>{
3171
+ ringWidth: ({ matchUtilities , addDefaults , addUtilities , theme })=>{
3111
3172
  let ringOpacityDefault = theme('ringOpacity.DEFAULT', '0.5');
3112
3173
  let ringColorDefault = (0, _withAlphaVariable).withAlphaValue(theme('ringColor.DEFAULT'), ringOpacityDefault, `rgb(147 197 253 / ${ringOpacityDefault})`);
3113
- addBase({
3114
- '@defaults ring-width': {
3115
- '--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
3116
- '--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
3117
- '--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
3118
- '--tw-ring-color': ringColorDefault,
3119
- '--tw-ring-offset-shadow': '0 0 #0000',
3120
- '--tw-ring-shadow': '0 0 #0000',
3121
- '--tw-shadow': '0 0 #0000',
3122
- '--tw-shadow-colored': '0 0 #0000'
3123
- }
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'
3124
3183
  });
3125
3184
  matchUtilities({
3126
3185
  ring: (value)=>{
@@ -3323,30 +3382,28 @@ let corePlugins1 = {
3323
3382
  values: theme('sepia')
3324
3383
  });
3325
3384
  },
3326
- filter: ({ addBase , addUtilities })=>{
3327
- addBase({
3328
- '@defaults filter': {
3329
- '--tw-blur': 'var(--tw-empty,/*!*/ /*!*/)',
3330
- '--tw-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
3331
- '--tw-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
3332
- '--tw-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
3333
- '--tw-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
3334
- '--tw-invert': 'var(--tw-empty,/*!*/ /*!*/)',
3335
- '--tw-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
3336
- '--tw-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
3337
- '--tw-drop-shadow': 'var(--tw-empty,/*!*/ /*!*/)',
3338
- '--tw-filter': [
3339
- 'var(--tw-blur)',
3340
- 'var(--tw-brightness)',
3341
- 'var(--tw-contrast)',
3342
- 'var(--tw-grayscale)',
3343
- 'var(--tw-hue-rotate)',
3344
- 'var(--tw-invert)',
3345
- 'var(--tw-saturate)',
3346
- 'var(--tw-sepia)',
3347
- 'var(--tw-drop-shadow)',
3348
- ].join(' ')
3349
- }
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(' ')
3350
3407
  });
3351
3408
  addUtilities({
3352
3409
  '.filter': {
@@ -3486,30 +3543,28 @@ let corePlugins1 = {
3486
3543
  values: theme('backdropSepia')
3487
3544
  });
3488
3545
  },
3489
- backdropFilter: ({ addBase , addUtilities })=>{
3490
- addBase({
3491
- '@defaults backdrop-filter': {
3492
- '--tw-backdrop-blur': 'var(--tw-empty,/*!*/ /*!*/)',
3493
- '--tw-backdrop-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
3494
- '--tw-backdrop-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
3495
- '--tw-backdrop-grayscale': 'var(--tw-empty,/*!*/ /*!*/)',
3496
- '--tw-backdrop-hue-rotate': 'var(--tw-empty,/*!*/ /*!*/)',
3497
- '--tw-backdrop-invert': 'var(--tw-empty,/*!*/ /*!*/)',
3498
- '--tw-backdrop-opacity': 'var(--tw-empty,/*!*/ /*!*/)',
3499
- '--tw-backdrop-saturate': 'var(--tw-empty,/*!*/ /*!*/)',
3500
- '--tw-backdrop-sepia': 'var(--tw-empty,/*!*/ /*!*/)',
3501
- '--tw-backdrop-filter': [
3502
- 'var(--tw-backdrop-blur)',
3503
- 'var(--tw-backdrop-brightness)',
3504
- 'var(--tw-backdrop-contrast)',
3505
- 'var(--tw-backdrop-grayscale)',
3506
- 'var(--tw-backdrop-hue-rotate)',
3507
- 'var(--tw-backdrop-invert)',
3508
- 'var(--tw-backdrop-opacity)',
3509
- 'var(--tw-backdrop-saturate)',
3510
- 'var(--tw-backdrop-sepia)',
3511
- ].join(' ')
3512
- }
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(' ')
3513
3568
  });
3514
3569
  addUtilities({
3515
3570
  '.backdrop-filter': {
@@ -3589,4 +3644,4 @@ let corePlugins1 = {
3589
3644
  ],
3590
3645
  ])
3591
3646
  };
3592
- exports.corePlugins = corePlugins1;
3647
+ exports.corePlugins = corePlugins;