tailwindcss 0.0.0-insiders.d2b53cd → 0.0.0-insiders.d41a739

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 (47) hide show
  1. package/CHANGELOG.md +43 -1
  2. package/lib/cli.js +66 -62
  3. package/lib/constants.js +1 -1
  4. package/lib/corePluginList.js +6 -1
  5. package/lib/corePlugins.js +204 -187
  6. package/lib/css/preflight.css +12 -0
  7. package/lib/featureFlags.js +3 -3
  8. package/lib/lib/collapseDuplicateDeclarations.js +29 -0
  9. package/lib/lib/evaluateTailwindFunctions.js +3 -3
  10. package/lib/lib/expandApplyAtRules.js +7 -7
  11. package/lib/lib/expandTailwindAtRules.js +2 -0
  12. package/lib/lib/generateRules.js +108 -18
  13. package/lib/lib/resolveDefaultsAtRules.js +2 -2
  14. package/lib/lib/setupContextUtils.js +62 -11
  15. package/lib/lib/setupWatchingContext.js +5 -1
  16. package/lib/lib/sharedState.js +2 -2
  17. package/lib/processTailwindFeatures.js +2 -0
  18. package/lib/util/createUtilityPlugin.js +2 -2
  19. package/lib/util/dataTypes.js +24 -4
  20. package/lib/util/formatVariantSelector.js +102 -0
  21. package/lib/util/normalizeConfig.js +22 -8
  22. package/lib/util/parseBoxShadowValue.js +77 -0
  23. package/lib/util/pluginUtils.js +21 -145
  24. package/lib/util/prefixSelector.js +1 -3
  25. package/lib/util/resolveConfig.js +8 -8
  26. package/lib/util/transformThemeValue.js +23 -13
  27. package/package.json +9 -9
  28. package/peers/index.js +938 -2644
  29. package/src/cli.js +9 -2
  30. package/src/corePluginList.js +1 -1
  31. package/src/corePlugins.js +181 -288
  32. package/src/css/preflight.css +12 -0
  33. package/src/lib/collapseDuplicateDeclarations.js +28 -0
  34. package/src/lib/expandTailwindAtRules.js +3 -1
  35. package/src/lib/generateRules.js +116 -10
  36. package/src/lib/setupContextUtils.js +60 -5
  37. package/src/lib/setupWatchingContext.js +7 -0
  38. package/src/lib/sharedState.js +1 -1
  39. package/src/processTailwindFeatures.js +2 -0
  40. package/src/util/dataTypes.js +32 -5
  41. package/src/util/formatVariantSelector.js +105 -0
  42. package/src/util/normalizeConfig.js +17 -1
  43. package/src/util/parseBoxShadowValue.js +71 -0
  44. package/src/util/pluginUtils.js +14 -137
  45. package/src/util/prefixSelector.js +1 -4
  46. package/src/util/transformThemeValue.js +22 -7
  47. package/stubs/defaultConfig.stub.js +24 -14
@@ -2,22 +2,21 @@
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"));
9
9
  var _createUtilityPlugin = _interopRequireDefault(require("./util/createUtilityPlugin"));
10
10
  var _buildMediaQuery = _interopRequireDefault(require("./util/buildMediaQuery"));
11
- var _prefixSelector = _interopRequireDefault(require("./util/prefixSelector"));
12
11
  var _parseAnimationValue = _interopRequireDefault(require("./util/parseAnimationValue"));
13
12
  var _flattenColorPalette = _interopRequireDefault(require("./util/flattenColorPalette"));
14
13
  var _withAlphaVariable = _interopRequireWildcard(require("./util/withAlphaVariable"));
15
14
  var _toColorValue = _interopRequireDefault(require("./util/toColorValue"));
16
15
  var _isPlainObject = _interopRequireDefault(require("./util/isPlainObject"));
17
16
  var _transformThemeValue = _interopRequireDefault(require("./util/transformThemeValue"));
18
- var _pluginUtils = require("./util/pluginUtils");
19
17
  var _packageJson = require("../package.json");
20
18
  var _log = _interopRequireDefault(require("./util/log"));
19
+ var _parseBoxShadowValue = require("./util/parseBoxShadowValue");
21
20
  function _interopRequireDefault(obj) {
22
21
  return obj && obj.__esModule ? obj : {
23
22
  default: obj
@@ -47,54 +46,20 @@ function _interopRequireWildcard(obj) {
47
46
  }
48
47
  }
49
48
  let variantPlugins = {
50
- pseudoElementVariants: ({ config , addVariant })=>{
51
- addVariant('first-letter', (0, _pluginUtils).transformAllSelectors((selector)=>{
52
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
53
- return withPseudo(`first-letter${config('separator')}${className}`, '::first-letter');
54
- });
55
- }));
56
- addVariant('first-line', (0, _pluginUtils).transformAllSelectors((selector)=>{
57
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
58
- return withPseudo(`first-line${config('separator')}${className}`, '::first-line');
59
- });
60
- }));
49
+ pseudoElementVariants: ({ addVariant })=>{
50
+ addVariant('first-letter', '&::first-letter');
51
+ addVariant('first-line', '&::first-line');
61
52
  addVariant('marker', [
62
- (0, _pluginUtils).transformAllSelectors((selector)=>{
63
- let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
64
- return `marker${config('separator')}${className}`;
65
- });
66
- return `${variantSelector} *::marker`;
67
- }),
68
- (0, _pluginUtils).transformAllSelectors((selector)=>{
69
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
70
- return withPseudo(`marker${config('separator')}${className}`, '::marker');
71
- });
72
- }),
53
+ '& *::marker',
54
+ '&::marker'
73
55
  ]);
74
56
  addVariant('selection', [
75
- (0, _pluginUtils).transformAllSelectors((selector)=>{
76
- let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
77
- return `selection${config('separator')}${className}`;
78
- });
79
- return `${variantSelector} *::selection`;
80
- }),
81
- (0, _pluginUtils).transformAllSelectors((selector)=>{
82
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
83
- return withPseudo(`selection${config('separator')}${className}`, '::selection');
84
- });
85
- }),
57
+ '& *::selection',
58
+ '&::selection'
86
59
  ]);
87
- addVariant('file', (0, _pluginUtils).transformAllSelectors((selector)=>{
88
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
89
- return withPseudo(`file${config('separator')}${className}`, '::file-selector-button');
90
- });
91
- }));
92
- addVariant('before', (0, _pluginUtils).transformAllSelectors((selector)=>{
93
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
94
- return withPseudo(`before${config('separator')}${className}`, '::before');
95
- });
96
- }, {
97
- withRule: (rule)=>{
60
+ addVariant('file', '&::file-selector-button');
61
+ addVariant('before', ({ container })=>{
62
+ container.walkRules((rule)=>{
98
63
  let foundContent = false;
99
64
  rule.walkDecls('content', ()=>{
100
65
  foundContent = true;
@@ -102,17 +67,14 @@ let variantPlugins = {
102
67
  if (!foundContent) {
103
68
  rule.prepend(_postcss.default.decl({
104
69
  prop: 'content',
105
- value: '""'
70
+ value: 'var(--tw-content)'
106
71
  }));
107
72
  }
108
- }
109
- }));
110
- addVariant('after', (0, _pluginUtils).transformAllSelectors((selector)=>{
111
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
112
- return withPseudo(`after${config('separator')}${className}`, '::after');
113
73
  });
114
- }, {
115
- withRule: (rule)=>{
74
+ return '&::before';
75
+ });
76
+ addVariant('after', ({ container })=>{
77
+ container.walkRules((rule)=>{
116
78
  let foundContent = false;
117
79
  rule.walkDecls('content', ()=>{
118
80
  foundContent = true;
@@ -120,13 +82,14 @@ let variantPlugins = {
120
82
  if (!foundContent) {
121
83
  rule.prepend(_postcss.default.decl({
122
84
  prop: 'content',
123
- value: '""'
85
+ value: 'var(--tw-content)'
124
86
  }));
125
87
  }
126
- }
127
- }));
88
+ });
89
+ return '&::after';
90
+ });
128
91
  },
129
- pseudoClassVariants: ({ config , addVariant })=>{
92
+ pseudoClassVariants: ({ addVariant })=>{
130
93
  let pseudoVariants = [
131
94
  // Positional
132
95
  [
@@ -180,94 +143,40 @@ let variantPlugins = {
180
143
  'focus-visible',
181
144
  'active',
182
145
  'disabled',
183
- ];
184
- for (let variant of pseudoVariants){
185
- let [variantName, state] = Array.isArray(variant) ? variant : [
146
+ ].map((variant)=>Array.isArray(variant) ? variant : [
186
147
  variant,
187
148
  `:${variant}`
188
- ];
189
- addVariant(variantName, (0, _pluginUtils).transformAllClasses((className, { withAttr , withPseudo })=>{
190
- if (state.startsWith(':')) {
191
- return withPseudo(`${variantName}${config('separator')}${className}`, state);
192
- } else if (state.startsWith('[')) {
193
- return withAttr(`${variantName}${config('separator')}${className}`, state);
194
- }
195
- }));
149
+ ]
150
+ );
151
+ for (let [variantName, state] of pseudoVariants){
152
+ addVariant(variantName, `&${state}`);
196
153
  }
197
- let groupMarker = (0, _prefixSelector).default(config('prefix'), '.group');
198
- for (let variant1 of pseudoVariants){
199
- let [variantName, state] = Array.isArray(variant1) ? variant1 : [
200
- variant1,
201
- `:${variant1}`
202
- ];
203
- let groupVariantName = `group-${variantName}`;
204
- addVariant(groupVariantName, (0, _pluginUtils).transformAllSelectors((selector)=>{
205
- let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
206
- if (`.${className}` === groupMarker) return className;
207
- return `${groupVariantName}${config('separator')}${className}`;
208
- });
209
- if (variantSelector === selector) {
210
- return null;
211
- }
212
- return (0, _pluginUtils).applyStateToMarker(variantSelector, groupMarker, state, (marker, selector)=>`${marker} ${selector}`
213
- );
214
- }));
154
+ for (let [variantName1, state1] of pseudoVariants){
155
+ addVariant(`group-${variantName1}`, `:merge(.group)${state1} &`);
215
156
  }
216
- let peerMarker = (0, _prefixSelector).default(config('prefix'), '.peer');
217
- for (let variant2 of pseudoVariants){
218
- let [variantName, state] = Array.isArray(variant2) ? variant2 : [
219
- variant2,
220
- `:${variant2}`
221
- ];
222
- let peerVariantName = `peer-${variantName}`;
223
- addVariant(peerVariantName, (0, _pluginUtils).transformAllSelectors((selector)=>{
224
- let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
225
- if (`.${className}` === peerMarker) return className;
226
- return `${peerVariantName}${config('separator')}${className}`;
227
- });
228
- if (variantSelector === selector) {
229
- return null;
230
- }
231
- return (0, _pluginUtils).applyStateToMarker(variantSelector, peerMarker, state, (marker, selector)=>selector.trim().startsWith('~') ? `${marker}${selector}` : `${marker} ~ ${selector}`
232
- );
233
- }));
157
+ for (let [variantName2, state2] of pseudoVariants){
158
+ addVariant(`peer-${variantName2}`, `:merge(.peer)${state2} ~ &`);
234
159
  }
235
160
  },
236
- directionVariants: ({ config , addVariant })=>{
237
- addVariant('ltr', (0, _pluginUtils).transformAllSelectors((selector)=>{
161
+ directionVariants: ({ addVariant })=>{
162
+ addVariant('ltr', ()=>{
238
163
  _log.default.warn('rtl-experimental', [
239
164
  'The RTL features in Tailwind CSS are currently in preview.',
240
165
  'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
241
166
  ]);
242
- return `[dir="ltr"] ${(0, _pluginUtils).updateAllClasses(selector, (className)=>`ltr${config('separator')}${className}`
243
- )}`;
244
- }));
245
- addVariant('rtl', (0, _pluginUtils).transformAllSelectors((selector)=>{
167
+ return '[dir="ltr"] &';
168
+ });
169
+ addVariant('rtl', ()=>{
246
170
  _log.default.warn('rtl-experimental', [
247
171
  'The RTL features in Tailwind CSS are currently in preview.',
248
172
  'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
249
173
  ]);
250
- return `[dir="rtl"] ${(0, _pluginUtils).updateAllClasses(selector, (className)=>`rtl${config('separator')}${className}`
251
- )}`;
252
- }));
174
+ return '[dir="rtl"] &';
175
+ });
253
176
  },
254
- reducedMotionVariants: ({ config , addVariant })=>{
255
- addVariant('motion-safe', (0, _pluginUtils).transformLastClasses((className)=>{
256
- return `motion-safe${config('separator')}${className}`;
257
- }, {
258
- wrap: ()=>_postcss.default.atRule({
259
- name: 'media',
260
- params: '(prefers-reduced-motion: no-preference)'
261
- })
262
- }));
263
- addVariant('motion-reduce', (0, _pluginUtils).transformLastClasses((className)=>{
264
- return `motion-reduce${config('separator')}${className}`;
265
- }, {
266
- wrap: ()=>_postcss.default.atRule({
267
- name: 'media',
268
- params: '(prefers-reduced-motion: reduce)'
269
- })
270
- }));
177
+ reducedMotionVariants: ({ addVariant })=>{
178
+ addVariant('motion-safe', '@media (prefers-reduced-motion: no-preference)');
179
+ addVariant('motion-reduce', '@media (prefers-reduced-motion: reduce)');
271
180
  },
272
181
  darkVariants: ({ config , addVariant })=>{
273
182
  let mode = config('darkMode', 'media');
@@ -279,44 +188,24 @@ let variantPlugins = {
279
188
  ]);
280
189
  }
281
190
  if (mode === 'class') {
282
- addVariant('dark', (0, _pluginUtils).transformAllSelectors((selector)=>{
283
- let variantSelector = (0, _pluginUtils).updateLastClasses(selector, (className)=>{
284
- return `dark${config('separator')}${className}`;
285
- });
286
- if (variantSelector === selector) {
287
- return null;
288
- }
289
- let darkSelector = (0, _prefixSelector).default(config('prefix'), `.dark`);
290
- return `${darkSelector} ${variantSelector}`;
291
- }));
191
+ addVariant('dark', '.dark &');
292
192
  } else if (mode === 'media') {
293
- addVariant('dark', (0, _pluginUtils).transformLastClasses((className)=>{
294
- return `dark${config('separator')}${className}`;
295
- }, {
296
- wrap: ()=>_postcss.default.atRule({
297
- name: 'media',
298
- params: '(prefers-color-scheme: dark)'
299
- })
300
- }));
193
+ addVariant('dark', '@media (prefers-color-scheme: dark)');
301
194
  }
302
195
  },
303
- screenVariants: ({ config , theme , addVariant })=>{
196
+ printVariant: ({ addVariant })=>{
197
+ addVariant('print', '@media print');
198
+ },
199
+ screenVariants: ({ theme , addVariant })=>{
304
200
  for(let screen in theme('screens')){
305
201
  let size = theme('screens')[screen];
306
202
  let query = (0, _buildMediaQuery).default(size);
307
- addVariant(screen, (0, _pluginUtils).transformLastClasses((className)=>{
308
- return `${screen}${config('separator')}${className}`;
309
- }, {
310
- wrap: ()=>_postcss.default.atRule({
311
- name: 'media',
312
- params: query
313
- })
314
- }));
203
+ addVariant(screen, `@media ${query}`);
315
204
  }
316
205
  }
317
206
  };
318
207
  exports.variantPlugins = variantPlugins;
319
- let corePlugins = {
208
+ let corePlugins1 = {
320
209
  preflight: ({ addBase })=>{
321
210
  let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(path.join(__dirname, './css/preflight.css'), 'utf8'));
322
211
  addBase([
@@ -327,8 +216,8 @@ let corePlugins = {
327
216
  ]);
328
217
  },
329
218
  container: (()=>{
330
- function extractMinWidths(breakpoints) {
331
- return Object.values(breakpoints !== null && breakpoints !== void 0 ? breakpoints : {
219
+ function extractMinWidths(breakpoints1) {
220
+ return Object.values(breakpoints1 !== null && breakpoints1 !== void 0 ? breakpoints1 : {
332
221
  }).flatMap((breakpoints)=>{
333
222
  if (typeof breakpoints === 'string') {
334
223
  breakpoints = {
@@ -1101,8 +990,8 @@ let corePlugins = {
1101
990
  ];
1102
991
  }));
1103
992
  matchUtilities({
1104
- animate: (value)=>{
1105
- let animations = (0, _parseAnimationValue).default(value);
993
+ animate: (value1)=>{
994
+ let animations = (0, _parseAnimationValue).default(value1);
1106
995
  return [
1107
996
  ...animations.flatMap((animation)=>keyframes[animation.name]
1108
997
  ),
@@ -2768,40 +2657,64 @@ let corePlugins = {
2768
2657
  },
2769
2658
  fontVariantNumeric: ({ addUtilities })=>{
2770
2659
  addUtilities({
2771
- '.ordinal, .slashed-zero, .lining-nums, .oldstyle-nums, .proportional-nums, .tabular-nums, .diagonal-fractions, .stacked-fractions': {
2660
+ '@defaults font-variant-numeric': {
2772
2661
  '--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)',
2773
2662
  '--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)',
2774
2663
  '--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)',
2775
2664
  '--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)',
2776
2665
  '--tw-numeric-fraction': 'var(--tw-empty,/*!*/ /*!*/)',
2777
- 'font-variant-numeric': 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
2666
+ '--tw-font-variant-numeric': 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
2778
2667
  },
2779
2668
  '.normal-nums': {
2780
2669
  'font-variant-numeric': 'normal'
2781
2670
  },
2782
2671
  '.ordinal': {
2783
- '--tw-ordinal': 'ordinal'
2672
+ '@defaults font-variant-numeric': {
2673
+ },
2674
+ '--tw-ordinal': 'ordinal',
2675
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2784
2676
  },
2785
2677
  '.slashed-zero': {
2786
- '--tw-slashed-zero': 'slashed-zero'
2678
+ '@defaults font-variant-numeric': {
2679
+ },
2680
+ '--tw-slashed-zero': 'slashed-zero',
2681
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2787
2682
  },
2788
2683
  '.lining-nums': {
2789
- '--tw-numeric-figure': 'lining-nums'
2684
+ '@defaults font-variant-numeric': {
2685
+ },
2686
+ '--tw-numeric-figure': 'lining-nums',
2687
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2790
2688
  },
2791
2689
  '.oldstyle-nums': {
2792
- '--tw-numeric-figure': 'oldstyle-nums'
2690
+ '@defaults font-variant-numeric': {
2691
+ },
2692
+ '--tw-numeric-figure': 'oldstyle-nums',
2693
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2793
2694
  },
2794
2695
  '.proportional-nums': {
2795
- '--tw-numeric-spacing': 'proportional-nums'
2696
+ '@defaults font-variant-numeric': {
2697
+ },
2698
+ '--tw-numeric-spacing': 'proportional-nums',
2699
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2796
2700
  },
2797
2701
  '.tabular-nums': {
2798
- '--tw-numeric-spacing': 'tabular-nums'
2702
+ '@defaults font-variant-numeric': {
2703
+ },
2704
+ '--tw-numeric-spacing': 'tabular-nums',
2705
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2799
2706
  },
2800
2707
  '.diagonal-fractions': {
2801
- '--tw-numeric-fraction': 'diagonal-fractions'
2708
+ '@defaults font-variant-numeric': {
2709
+ },
2710
+ '--tw-numeric-fraction': 'diagonal-fractions',
2711
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2802
2712
  },
2803
2713
  '.stacked-fractions': {
2804
- '--tw-numeric-fraction': 'stacked-fractions'
2714
+ '@defaults font-variant-numeric': {
2715
+ },
2716
+ '--tw-numeric-fraction': 'stacked-fractions',
2717
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2805
2718
  }
2806
2719
  });
2807
2720
  },
@@ -2863,6 +2776,21 @@ let corePlugins = {
2863
2776
  }
2864
2777
  });
2865
2778
  },
2779
+ textDecorationColor: ({ matchUtilities , theme })=>{
2780
+ matchUtilities({
2781
+ decoration: (value)=>{
2782
+ return {
2783
+ 'text-decoration-color': (0, _toColorValue).default(value)
2784
+ };
2785
+ }
2786
+ }, {
2787
+ values: (0, _flattenColorPalette).default(theme('textDecorationColor')),
2788
+ type: [
2789
+ 'color',
2790
+ 'any'
2791
+ ]
2792
+ });
2793
+ },
2866
2794
  fontSmoothing: ({ addUtilities })=>{
2867
2795
  addUtilities({
2868
2796
  '.antialiased': {
@@ -3068,38 +2996,115 @@ let corePlugins = {
3068
2996
  '@defaults box-shadow': {
3069
2997
  '--tw-ring-offset-shadow': '0 0 #0000',
3070
2998
  '--tw-ring-shadow': '0 0 #0000',
3071
- '--tw-shadow': '0 0 #0000'
2999
+ '--tw-shadow': '0 0 #0000',
3000
+ '--tw-shadow-colored': '0 0 #0000'
3072
3001
  }
3073
3002
  });
3074
3003
  matchUtilities({
3075
3004
  shadow: (value)=>{
3076
3005
  value = transformValue(value);
3006
+ let ast = (0, _parseBoxShadowValue).parseBoxShadowValue(value);
3007
+ for (let shadow of ast){
3008
+ // Don't override color if the whole shadow is a variable
3009
+ if (!shadow.valid) {
3010
+ continue;
3011
+ }
3012
+ shadow.color = 'var(--tw-shadow-color)';
3013
+ }
3077
3014
  return {
3078
3015
  '@defaults box-shadow': {
3079
3016
  },
3080
3017
  '--tw-shadow': value === 'none' ? '0 0 #0000' : value,
3018
+ '--tw-shadow-colored': value === 'none' ? '0 0 #0000' : (0, _parseBoxShadowValue).formatBoxShadowValue(ast),
3081
3019
  'box-shadow': defaultBoxShadow
3082
3020
  };
3083
3021
  }
3084
3022
  }, {
3085
- values: theme('boxShadow')
3023
+ values: theme('boxShadow'),
3024
+ type: [
3025
+ 'shadow'
3026
+ ]
3086
3027
  });
3087
3028
  };
3088
3029
  })(),
3089
- outline: ({ matchUtilities , theme })=>{
3030
+ boxShadowColor: ({ matchUtilities , theme })=>{
3031
+ matchUtilities({
3032
+ shadow: (value)=>{
3033
+ return {
3034
+ '--tw-shadow-color': (0, _toColorValue).default(value),
3035
+ '--tw-shadow': 'var(--tw-shadow-colored)'
3036
+ };
3037
+ }
3038
+ }, {
3039
+ values: (0, _flattenColorPalette).default(theme('boxShadowColor')),
3040
+ type: [
3041
+ 'color'
3042
+ ]
3043
+ });
3044
+ },
3045
+ outlineStyle: ({ addUtilities })=>{
3046
+ addUtilities({
3047
+ '.outline-none': {
3048
+ outline: '2px solid transparent',
3049
+ 'outline-offset': '2px'
3050
+ },
3051
+ '.outline': {
3052
+ 'outline-style': 'solid'
3053
+ },
3054
+ '.outline-dashed': {
3055
+ 'outline-style': 'dashed'
3056
+ },
3057
+ '.outline-dotted': {
3058
+ 'outline-style': 'dotted'
3059
+ },
3060
+ '.outline-double': {
3061
+ 'outline-style': 'double'
3062
+ },
3063
+ '.outline-hidden': {
3064
+ 'outline-style': 'hidden'
3065
+ }
3066
+ });
3067
+ },
3068
+ outlineWidth: (0, _createUtilityPlugin).default('outlineWidth', [
3069
+ [
3070
+ 'outline',
3071
+ [
3072
+ 'outline-width'
3073
+ ]
3074
+ ]
3075
+ ], {
3076
+ type: [
3077
+ 'length',
3078
+ 'number',
3079
+ 'percentage'
3080
+ ]
3081
+ }),
3082
+ outlineOffset: (0, _createUtilityPlugin).default('outlineOffset', [
3083
+ [
3084
+ 'outline-offset',
3085
+ [
3086
+ 'outline-offset'
3087
+ ]
3088
+ ]
3089
+ ], {
3090
+ type: [
3091
+ 'length',
3092
+ 'number',
3093
+ 'percentage'
3094
+ ]
3095
+ }),
3096
+ outlineColor: ({ matchUtilities , theme })=>{
3090
3097
  matchUtilities({
3091
3098
  outline: (value)=>{
3092
- value = Array.isArray(value) ? value : value.split(',');
3093
- let [outline, outlineOffset = '0'] = Array.isArray(value) ? value : [
3094
- value
3095
- ];
3096
3099
  return {
3097
- outline,
3098
- 'outline-offset': outlineOffset
3100
+ 'outline-color': (0, _toColorValue).default(value)
3099
3101
  };
3100
3102
  }
3101
3103
  }, {
3102
- values: theme('outline')
3104
+ values: (0, _flattenColorPalette).default(theme('outlineColor')),
3105
+ type: [
3106
+ 'color'
3107
+ ]
3103
3108
  });
3104
3109
  },
3105
3110
  ringWidth: ({ matchUtilities , addBase , addUtilities , theme })=>{
@@ -3113,7 +3118,8 @@ let corePlugins = {
3113
3118
  '--tw-ring-color': ringColorDefault,
3114
3119
  '--tw-ring-offset-shadow': '0 0 #0000',
3115
3120
  '--tw-ring-shadow': '0 0 #0000',
3116
- '--tw-shadow': '0 0 #0000'
3121
+ '--tw-shadow': '0 0 #0000',
3122
+ '--tw-shadow-colored': '0 0 #0000'
3117
3123
  }
3118
3124
  });
3119
3125
  matchUtilities({
@@ -3570,6 +3576,17 @@ let corePlugins = {
3570
3576
  ]
3571
3577
  ]
3572
3578
  ]),
3573
- content: (0, _createUtilityPlugin).default('content')
3579
+ content: (0, _createUtilityPlugin).default('content', [
3580
+ [
3581
+ 'content',
3582
+ [
3583
+ '--tw-content',
3584
+ [
3585
+ 'content',
3586
+ 'var(--tw-content)'
3587
+ ]
3588
+ ]
3589
+ ],
3590
+ ])
3574
3591
  };
3575
- exports.corePlugins = corePlugins;
3592
+ exports.corePlugins = corePlugins1;
@@ -12,6 +12,11 @@
12
12
  border-color: currentColor; /* 2 */
13
13
  }
14
14
 
15
+ ::before,
16
+ ::after {
17
+ --tw-content: '';
18
+ }
19
+
15
20
  /*
16
21
  1. Use a consistent sensible line-height in all browsers.
17
22
  2. Prevent adjustments of font size after orientation changes in iOS.
@@ -317,6 +322,13 @@ button,
317
322
  cursor: pointer;
318
323
  }
319
324
 
325
+ /*
326
+ Make sure disabled buttons don't get the pointer cursor.
327
+ */
328
+ :disabled {
329
+ cursor: default;
330
+ }
331
+
320
332
  /*
321
333
  1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
322
334
  2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
@@ -28,9 +28,9 @@ function flagEnabled(config, flag) {
28
28
  return config.future === 'all' || ((ref2 = (ref1 = config === null || config === void 0 ? void 0 : (ref = config.future) === null || ref === void 0 ? void 0 : ref[flag]) !== null && ref1 !== void 0 ? ref1 : defaults[flag]) !== null && ref2 !== void 0 ? ref2 : false);
29
29
  }
30
30
  if (featureFlags.experimental.includes(flag)) {
31
- var ref;
32
- var ref11, ref12;
33
- return config.experimental === 'all' || ((ref12 = (ref11 = config === null || config === void 0 ? void 0 : (ref = config.experimental) === null || ref === void 0 ? void 0 : ref[flag]) !== null && ref11 !== void 0 ? ref11 : defaults[flag]) !== null && ref12 !== void 0 ? ref12 : false);
31
+ var ref3;
32
+ var ref4, ref5;
33
+ return config.experimental === 'all' || ((ref5 = (ref4 = config === null || config === void 0 ? void 0 : (ref3 = config.experimental) === null || ref3 === void 0 ? void 0 : ref3[flag]) !== null && ref4 !== void 0 ? ref4 : defaults[flag]) !== null && ref5 !== void 0 ? ref5 : false);
34
34
  }
35
35
  return false;
36
36
  }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ exports.default = collapseDuplicateDeclarations;
6
+ function collapseDuplicateDeclarations() {
7
+ return (root)=>{
8
+ root.walkRules((node)=>{
9
+ let seen = new Map();
10
+ let droppable = new Set([]);
11
+ node.walkDecls((decl)=>{
12
+ // This could happen if we have nested selectors. In that case the
13
+ // parent will loop over all its declarations but also the declarations
14
+ // of nested rules. With this we ensure that we are shallowly checking
15
+ // declarations.
16
+ if (decl.parent !== node) {
17
+ return;
18
+ }
19
+ if (seen.has(decl.prop)) {
20
+ droppable.add(seen.get(decl.prop));
21
+ }
22
+ seen.set(decl.prop, decl);
23
+ });
24
+ for (let decl1 of droppable){
25
+ decl1.remove();
26
+ }
27
+ });
28
+ };
29
+ }
@@ -112,11 +112,11 @@ function extractArgs(node, vNodes, functions) {
112
112
  let args = [
113
113
  ''
114
114
  ];
115
- for (let vNode of vNodes){
116
- if (vNode.type === 'div' && vNode.value === ',') {
115
+ for (let vNode1 of vNodes){
116
+ if (vNode1.type === 'div' && vNode1.value === ',') {
117
117
  args.push('');
118
118
  } else {
119
- args[args.length - 1] += _postcssValueParser.default.stringify(vNode);
119
+ args[args.length - 1] += _postcssValueParser.default.stringify(vNode1);
120
120
  }
121
121
  }
122
122
  return args;