tailwindcss 0.0.0-insiders.ee0f329 → 0.0.0-insiders.ee3f3fd

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 CHANGED
@@ -7,10 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Changed
11
+
12
+ - Don't use pointer cursor on disabled buttons by default ([#5772](https://github.com/tailwindlabs/tailwindcss/pull/5772))
13
+ - Set default content value in preflight instead of within each before/after utility ([#5820](https://github.com/tailwindlabs/tailwindcss/pull/5820))
14
+ - Remove `prefix` as a function ([#5829](https://github.com/tailwindlabs/tailwindcss/pull/5829))
15
+
10
16
  ### Added
11
17
 
12
18
  - Add `flex-basis` utilities ([#5671](https://github.com/tailwindlabs/tailwindcss/pull/5671))
13
19
  - Make negative values a first-class feature ([#5709](https://github.com/tailwindlabs/tailwindcss/pull/5709))
20
+ - Add `fit-content` values for `min/max-width/height` utilities ([#5638](https://github.com/tailwindlabs/tailwindcss/pull/5638))
21
+ - Add `min/max-content` values for `min/max-height` utilities ([#5729](https://github.com/tailwindlabs/tailwindcss/pull/5729))
22
+ - Add all standard `cursor-*` values by default ([#5734](https://github.com/tailwindlabs/tailwindcss/pull/5734))
23
+ - Add `grow-*` and `shrink-*` utilities, deprecate `flex-grow-*` and `flex-shrink-*` ([#5733](https://github.com/tailwindlabs/tailwindcss/pull/5733))
24
+ - Add `text-decoration-color` utilities ([#5760](https://github.com/tailwindlabs/tailwindcss/pull/5760))
25
+ - Add declarative `addVariant` syntax ([#5809](https://github.com/tailwindlabs/tailwindcss/pull/5809))
26
+
27
+ ### Fixed
28
+
29
+ - Configure chokidar's `awaitWriteFinish` setting to avoid occasional stale builds on Windows ([#5774](https://github.com/tailwindlabs/tailwindcss/pull/5774))
30
+ - Fix CLI `--content` option ([#5775](https://github.com/tailwindlabs/tailwindcss/pull/5775))
31
+ - Fix before/after utilities overriding custom content values at larger breakpoints ([#5820](https://github.com/tailwindlabs/tailwindcss/pull/5820))
32
+ - Cleanup duplicate properties ([#5830](https://github.com/tailwindlabs/tailwindcss/pull/5830))
33
+ - Allow `_` inside `url()` when using arbitrary values ([#5853](https://github.com/tailwindlabs/tailwindcss/pull/5853))
34
+ - Prevent crashes when using comments in `@layer` AtRules ([#5854](https://github.com/tailwindlabs/tailwindcss/pull/5854))
14
35
 
15
36
  ## [3.0.0-alpha.1] - 2021-10-01
16
37
 
package/lib/cli.js CHANGED
@@ -396,7 +396,7 @@ async function build() {
396
396
  }
397
397
  }
398
398
  if (args['--content']) {
399
- resolvedConfig.content = args['--content'].split(/(?<!{[^}]+),/);
399
+ resolvedConfig.content.files = args['--content'].split(/(?<!{[^}]+),/);
400
400
  }
401
401
  return resolvedConfig;
402
402
  }
@@ -649,7 +649,11 @@ async function build() {
649
649
  ...contextDependencies,
650
650
  ...extractFileGlobs(config)
651
651
  ], {
652
- ignoreInitial: true
652
+ ignoreInitial: true,
653
+ awaitWriteFinish: process.platform === 'win32' ? {
654
+ stabilityThreshold: 50,
655
+ pollInterval: 10
656
+ } : false
653
657
  });
654
658
  let chain = Promise.resolve();
655
659
  watcher.on('change', async (file)=>{
@@ -125,6 +125,7 @@ var _default = [
125
125
  "textColor",
126
126
  "textOpacity",
127
127
  "textDecoration",
128
+ "textDecorationColor",
128
129
  "fontSmoothing",
129
130
  "placeholderColor",
130
131
  "placeholderOpacity",
@@ -4,17 +4,16 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  exports.variantPlugins = exports.corePlugins = void 0;
6
6
  var _fs = _interopRequireDefault(require("fs"));
7
+ var path = _interopRequireWildcard(require("path"));
7
8
  var _postcss = _interopRequireDefault(require("postcss"));
8
9
  var _createUtilityPlugin = _interopRequireDefault(require("./util/createUtilityPlugin"));
9
10
  var _buildMediaQuery = _interopRequireDefault(require("./util/buildMediaQuery"));
10
- var _prefixSelector = _interopRequireDefault(require("./util/prefixSelector"));
11
11
  var _parseAnimationValue = _interopRequireDefault(require("./util/parseAnimationValue"));
12
12
  var _flattenColorPalette = _interopRequireDefault(require("./util/flattenColorPalette"));
13
13
  var _withAlphaVariable = _interopRequireWildcard(require("./util/withAlphaVariable"));
14
14
  var _toColorValue = _interopRequireDefault(require("./util/toColorValue"));
15
15
  var _isPlainObject = _interopRequireDefault(require("./util/isPlainObject"));
16
16
  var _transformThemeValue = _interopRequireDefault(require("./util/transformThemeValue"));
17
- var _pluginUtils = require("./util/pluginUtils");
18
17
  var _packageJson = require("../package.json");
19
18
  var _log = _interopRequireDefault(require("./util/log"));
20
19
  function _interopRequireDefault(obj) {
@@ -46,54 +45,20 @@ function _interopRequireWildcard(obj) {
46
45
  }
47
46
  }
48
47
  let variantPlugins = {
49
- pseudoElementVariants: ({ config , addVariant })=>{
50
- addVariant('first-letter', (0, _pluginUtils).transformAllSelectors((selector)=>{
51
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
52
- return withPseudo(`first-letter${config('separator')}${className}`, '::first-letter');
53
- });
54
- }));
55
- addVariant('first-line', (0, _pluginUtils).transformAllSelectors((selector)=>{
56
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
57
- return withPseudo(`first-line${config('separator')}${className}`, '::first-line');
58
- });
59
- }));
48
+ pseudoElementVariants: ({ addVariant })=>{
49
+ addVariant('first-letter', '&::first-letter');
50
+ addVariant('first-line', '&::first-line');
60
51
  addVariant('marker', [
61
- (0, _pluginUtils).transformAllSelectors((selector)=>{
62
- let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
63
- return `marker${config('separator')}${className}`;
64
- });
65
- return `${variantSelector} *::marker`;
66
- }),
67
- (0, _pluginUtils).transformAllSelectors((selector)=>{
68
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
69
- return withPseudo(`marker${config('separator')}${className}`, '::marker');
70
- });
71
- }),
52
+ '& *::marker',
53
+ '&::marker'
72
54
  ]);
73
55
  addVariant('selection', [
74
- (0, _pluginUtils).transformAllSelectors((selector)=>{
75
- let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
76
- return `selection${config('separator')}${className}`;
77
- });
78
- return `${variantSelector} *::selection`;
79
- }),
80
- (0, _pluginUtils).transformAllSelectors((selector)=>{
81
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
82
- return withPseudo(`selection${config('separator')}${className}`, '::selection');
83
- });
84
- }),
56
+ '& *::selection',
57
+ '&::selection'
85
58
  ]);
86
- addVariant('file', (0, _pluginUtils).transformAllSelectors((selector)=>{
87
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
88
- return withPseudo(`file${config('separator')}${className}`, '::file-selector-button');
89
- });
90
- }));
91
- addVariant('before', (0, _pluginUtils).transformAllSelectors((selector)=>{
92
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
93
- return withPseudo(`before${config('separator')}${className}`, '::before');
94
- });
95
- }, {
96
- withRule: (rule)=>{
59
+ addVariant('file', '&::file-selector-button');
60
+ addVariant('before', ({ container })=>{
61
+ container.walkRules((rule)=>{
97
62
  let foundContent = false;
98
63
  rule.walkDecls('content', ()=>{
99
64
  foundContent = true;
@@ -101,17 +66,14 @@ let variantPlugins = {
101
66
  if (!foundContent) {
102
67
  rule.prepend(_postcss.default.decl({
103
68
  prop: 'content',
104
- value: '""'
69
+ value: 'var(--tw-content)'
105
70
  }));
106
71
  }
107
- }
108
- }));
109
- addVariant('after', (0, _pluginUtils).transformAllSelectors((selector)=>{
110
- return (0, _pluginUtils).updateAllClasses(selector, (className, { withPseudo })=>{
111
- return withPseudo(`after${config('separator')}${className}`, '::after');
112
72
  });
113
- }, {
114
- withRule: (rule)=>{
73
+ return '&::before';
74
+ });
75
+ addVariant('after', ({ container })=>{
76
+ container.walkRules((rule)=>{
115
77
  let foundContent = false;
116
78
  rule.walkDecls('content', ()=>{
117
79
  foundContent = true;
@@ -119,13 +81,14 @@ let variantPlugins = {
119
81
  if (!foundContent) {
120
82
  rule.prepend(_postcss.default.decl({
121
83
  prop: 'content',
122
- value: '""'
84
+ value: 'var(--tw-content)'
123
85
  }));
124
86
  }
125
- }
126
- }));
87
+ });
88
+ return '&::after';
89
+ });
127
90
  },
128
- pseudoClassVariants: ({ config , addVariant })=>{
91
+ pseudoClassVariants: ({ addVariant })=>{
129
92
  let pseudoVariants = [
130
93
  // Positional
131
94
  [
@@ -179,94 +142,40 @@ let variantPlugins = {
179
142
  'focus-visible',
180
143
  'active',
181
144
  'disabled',
182
- ];
183
- for (let variant of pseudoVariants){
184
- let [variantName, state] = Array.isArray(variant) ? variant : [
145
+ ].map((variant)=>Array.isArray(variant) ? variant : [
185
146
  variant,
186
147
  `:${variant}`
187
- ];
188
- addVariant(variantName, (0, _pluginUtils).transformAllClasses((className, { withAttr , withPseudo })=>{
189
- if (state.startsWith(':')) {
190
- return withPseudo(`${variantName}${config('separator')}${className}`, state);
191
- } else if (state.startsWith('[')) {
192
- return withAttr(`${variantName}${config('separator')}${className}`, state);
193
- }
194
- }));
148
+ ]
149
+ );
150
+ for (let [variantName, state] of pseudoVariants){
151
+ addVariant(variantName, `&${state}`);
195
152
  }
196
- let groupMarker = (0, _prefixSelector).default(config('prefix'), '.group');
197
- for (let variant1 of pseudoVariants){
198
- let [variantName, state] = Array.isArray(variant1) ? variant1 : [
199
- variant1,
200
- `:${variant1}`
201
- ];
202
- let groupVariantName = `group-${variantName}`;
203
- addVariant(groupVariantName, (0, _pluginUtils).transformAllSelectors((selector)=>{
204
- let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
205
- if (`.${className}` === groupMarker) return className;
206
- return `${groupVariantName}${config('separator')}${className}`;
207
- });
208
- if (variantSelector === selector) {
209
- return null;
210
- }
211
- return (0, _pluginUtils).applyStateToMarker(variantSelector, groupMarker, state, (marker, selector)=>`${marker} ${selector}`
212
- );
213
- }));
153
+ for (let [variantName1, state1] of pseudoVariants){
154
+ addVariant(`group-${variantName1}`, `:merge(.group)${state1} &`);
214
155
  }
215
- let peerMarker = (0, _prefixSelector).default(config('prefix'), '.peer');
216
- for (let variant2 of pseudoVariants){
217
- let [variantName, state] = Array.isArray(variant2) ? variant2 : [
218
- variant2,
219
- `:${variant2}`
220
- ];
221
- let peerVariantName = `peer-${variantName}`;
222
- addVariant(peerVariantName, (0, _pluginUtils).transformAllSelectors((selector)=>{
223
- let variantSelector = (0, _pluginUtils).updateAllClasses(selector, (className)=>{
224
- if (`.${className}` === peerMarker) return className;
225
- return `${peerVariantName}${config('separator')}${className}`;
226
- });
227
- if (variantSelector === selector) {
228
- return null;
229
- }
230
- return (0, _pluginUtils).applyStateToMarker(variantSelector, peerMarker, state, (marker, selector)=>selector.trim().startsWith('~') ? `${marker}${selector}` : `${marker} ~ ${selector}`
231
- );
232
- }));
156
+ for (let [variantName2, state2] of pseudoVariants){
157
+ addVariant(`peer-${variantName2}`, `:merge(.peer)${state2} ~ &`);
233
158
  }
234
159
  },
235
- directionVariants: ({ config , addVariant })=>{
236
- addVariant('ltr', (0, _pluginUtils).transformAllSelectors((selector)=>{
160
+ directionVariants: ({ addVariant })=>{
161
+ addVariant('ltr', ()=>{
237
162
  _log.default.warn('rtl-experimental', [
238
163
  'The RTL features in Tailwind CSS are currently in preview.',
239
164
  'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
240
165
  ]);
241
- return `[dir="ltr"] ${(0, _pluginUtils).updateAllClasses(selector, (className)=>`ltr${config('separator')}${className}`
242
- )}`;
243
- }));
244
- addVariant('rtl', (0, _pluginUtils).transformAllSelectors((selector)=>{
166
+ return '[dir="ltr"] &';
167
+ });
168
+ addVariant('rtl', ()=>{
245
169
  _log.default.warn('rtl-experimental', [
246
170
  'The RTL features in Tailwind CSS are currently in preview.',
247
171
  'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
248
172
  ]);
249
- return `[dir="rtl"] ${(0, _pluginUtils).updateAllClasses(selector, (className)=>`rtl${config('separator')}${className}`
250
- )}`;
251
- }));
173
+ return '[dir="rtl"] &';
174
+ });
252
175
  },
253
- reducedMotionVariants: ({ config , addVariant })=>{
254
- addVariant('motion-safe', (0, _pluginUtils).transformLastClasses((className)=>{
255
- return `motion-safe${config('separator')}${className}`;
256
- }, {
257
- wrap: ()=>_postcss.default.atRule({
258
- name: 'media',
259
- params: '(prefers-reduced-motion: no-preference)'
260
- })
261
- }));
262
- addVariant('motion-reduce', (0, _pluginUtils).transformLastClasses((className)=>{
263
- return `motion-reduce${config('separator')}${className}`;
264
- }, {
265
- wrap: ()=>_postcss.default.atRule({
266
- name: 'media',
267
- params: '(prefers-reduced-motion: reduce)'
268
- })
269
- }));
176
+ reducedMotionVariants: ({ addVariant })=>{
177
+ addVariant('motion-safe', '@media (prefers-reduced-motion: no-preference)');
178
+ addVariant('motion-reduce', '@media (prefers-reduced-motion: reduce)');
270
179
  },
271
180
  darkVariants: ({ config , addVariant })=>{
272
181
  let mode = config('darkMode', 'media');
@@ -278,46 +187,23 @@ let variantPlugins = {
278
187
  ]);
279
188
  }
280
189
  if (mode === 'class') {
281
- addVariant('dark', (0, _pluginUtils).transformAllSelectors((selector)=>{
282
- let variantSelector = (0, _pluginUtils).updateLastClasses(selector, (className)=>{
283
- return `dark${config('separator')}${className}`;
284
- });
285
- if (variantSelector === selector) {
286
- return null;
287
- }
288
- let darkSelector = (0, _prefixSelector).default(config('prefix'), `.dark`);
289
- return `${darkSelector} ${variantSelector}`;
290
- }));
190
+ addVariant('dark', '.dark &');
291
191
  } else if (mode === 'media') {
292
- addVariant('dark', (0, _pluginUtils).transformLastClasses((className)=>{
293
- return `dark${config('separator')}${className}`;
294
- }, {
295
- wrap: ()=>_postcss.default.atRule({
296
- name: 'media',
297
- params: '(prefers-color-scheme: dark)'
298
- })
299
- }));
192
+ addVariant('dark', '@media (prefers-color-scheme: dark)');
300
193
  }
301
194
  },
302
- screenVariants: ({ config , theme , addVariant })=>{
195
+ screenVariants: ({ theme , addVariant })=>{
303
196
  for(let screen in theme('screens')){
304
197
  let size = theme('screens')[screen];
305
198
  let query = (0, _buildMediaQuery).default(size);
306
- addVariant(screen, (0, _pluginUtils).transformLastClasses((className)=>{
307
- return `${screen}${config('separator')}${className}`;
308
- }, {
309
- wrap: ()=>_postcss.default.atRule({
310
- name: 'media',
311
- params: query
312
- })
313
- }));
199
+ addVariant(screen, `@media ${query}`);
314
200
  }
315
201
  }
316
202
  };
317
203
  exports.variantPlugins = variantPlugins;
318
204
  let corePlugins = {
319
205
  preflight: ({ addBase })=>{
320
- let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(`${__dirname}/css/preflight.css`, 'utf8'));
206
+ let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(path.join(__dirname, './css/preflight.css'), 'utf8'));
321
207
  addBase([
322
208
  _postcss.default.comment({
323
209
  text: `! tailwindcss v${_packageJson.version} | MIT License | https://tailwindcss.com`
@@ -834,7 +720,13 @@ let corePlugins = {
834
720
  [
835
721
  'flex-shrink'
836
722
  ]
837
- ]
723
+ ],
724
+ [
725
+ 'shrink',
726
+ [
727
+ 'flex-shrink'
728
+ ]
729
+ ],
838
730
  ]),
839
731
  flexGrow: (0, _createUtilityPlugin).default('flexGrow', [
840
732
  [
@@ -842,7 +734,13 @@ let corePlugins = {
842
734
  [
843
735
  'flex-grow'
844
736
  ]
845
- ]
737
+ ],
738
+ [
739
+ 'grow',
740
+ [
741
+ 'flex-grow'
742
+ ]
743
+ ],
846
744
  ]),
847
745
  flexBasis: (0, _createUtilityPlugin).default('flexBasis', [
848
746
  [
@@ -2755,40 +2653,64 @@ let corePlugins = {
2755
2653
  },
2756
2654
  fontVariantNumeric: ({ addUtilities })=>{
2757
2655
  addUtilities({
2758
- '.ordinal, .slashed-zero, .lining-nums, .oldstyle-nums, .proportional-nums, .tabular-nums, .diagonal-fractions, .stacked-fractions': {
2656
+ '@defaults font-variant-numeric': {
2759
2657
  '--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)',
2760
2658
  '--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)',
2761
2659
  '--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)',
2762
2660
  '--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)',
2763
2661
  '--tw-numeric-fraction': 'var(--tw-empty,/*!*/ /*!*/)',
2764
- 'font-variant-numeric': 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
2662
+ '--tw-font-variant-numeric': 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
2765
2663
  },
2766
2664
  '.normal-nums': {
2767
2665
  'font-variant-numeric': 'normal'
2768
2666
  },
2769
2667
  '.ordinal': {
2770
- '--tw-ordinal': 'ordinal'
2668
+ '@defaults font-variant-numeric': {
2669
+ },
2670
+ '--tw-ordinal': 'ordinal',
2671
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2771
2672
  },
2772
2673
  '.slashed-zero': {
2773
- '--tw-slashed-zero': 'slashed-zero'
2674
+ '@defaults font-variant-numeric': {
2675
+ },
2676
+ '--tw-slashed-zero': 'slashed-zero',
2677
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2774
2678
  },
2775
2679
  '.lining-nums': {
2776
- '--tw-numeric-figure': 'lining-nums'
2680
+ '@defaults font-variant-numeric': {
2681
+ },
2682
+ '--tw-numeric-figure': 'lining-nums',
2683
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2777
2684
  },
2778
2685
  '.oldstyle-nums': {
2779
- '--tw-numeric-figure': 'oldstyle-nums'
2686
+ '@defaults font-variant-numeric': {
2687
+ },
2688
+ '--tw-numeric-figure': 'oldstyle-nums',
2689
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2780
2690
  },
2781
2691
  '.proportional-nums': {
2782
- '--tw-numeric-spacing': 'proportional-nums'
2692
+ '@defaults font-variant-numeric': {
2693
+ },
2694
+ '--tw-numeric-spacing': 'proportional-nums',
2695
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2783
2696
  },
2784
2697
  '.tabular-nums': {
2785
- '--tw-numeric-spacing': 'tabular-nums'
2698
+ '@defaults font-variant-numeric': {
2699
+ },
2700
+ '--tw-numeric-spacing': 'tabular-nums',
2701
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2786
2702
  },
2787
2703
  '.diagonal-fractions': {
2788
- '--tw-numeric-fraction': 'diagonal-fractions'
2704
+ '@defaults font-variant-numeric': {
2705
+ },
2706
+ '--tw-numeric-fraction': 'diagonal-fractions',
2707
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2789
2708
  },
2790
2709
  '.stacked-fractions': {
2791
- '--tw-numeric-fraction': 'stacked-fractions'
2710
+ '@defaults font-variant-numeric': {
2711
+ },
2712
+ '--tw-numeric-fraction': 'stacked-fractions',
2713
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2792
2714
  }
2793
2715
  });
2794
2716
  },
@@ -2850,6 +2772,21 @@ let corePlugins = {
2850
2772
  }
2851
2773
  });
2852
2774
  },
2775
+ textDecorationColor: ({ matchUtilities , theme })=>{
2776
+ matchUtilities({
2777
+ decoration: (value)=>{
2778
+ return {
2779
+ 'text-decoration-color': (0, _toColorValue).default(value)
2780
+ };
2781
+ }
2782
+ }, {
2783
+ values: (0, _flattenColorPalette).default(theme('textDecorationColor')),
2784
+ type: [
2785
+ 'color',
2786
+ 'any'
2787
+ ]
2788
+ });
2789
+ },
2853
2790
  fontSmoothing: ({ addUtilities })=>{
2854
2791
  addUtilities({
2855
2792
  '.antialiased': {
@@ -3557,6 +3494,17 @@ let corePlugins = {
3557
3494
  ]
3558
3495
  ]
3559
3496
  ]),
3560
- content: (0, _createUtilityPlugin).default('content')
3497
+ content: (0, _createUtilityPlugin).default('content', [
3498
+ [
3499
+ 'content',
3500
+ [
3501
+ '--tw-content',
3502
+ [
3503
+ 'content',
3504
+ 'var(--tw-content)'
3505
+ ]
3506
+ ]
3507
+ ],
3508
+ ])
3561
3509
  };
3562
3510
  exports.corePlugins = corePlugins;
@@ -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)
@@ -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 decl of droppable){
25
+ decl.remove();
26
+ }
27
+ });
28
+ };
29
+ }
@@ -42,6 +42,8 @@ const PATTERNS = [
42
42
  /([^<>"'`\s]*\[\w*"[^"`\s]*"?\])/.source,
43
43
  /([^<>"'`\s]*\[\w*\('[^"'`\s]*'\)\])/.source,
44
44
  /([^<>"'`\s]*\[\w*\("[^"'`\s]*"\)\])/.source,
45
+ /([^<>"'`\s]*\[\w*\('[^"`\s]*'\)\])/.source,
46
+ /([^<>"'`\s]*\[\w*\("[^'`\s]*"\)\])/.source,
45
47
  /([^<>"'`\s]*\['[^"'`\s]*'\])/.source,
46
48
  /([^<>"'`\s]*\["[^"'`\s]*"\])/.source,
47
49
  /([^<>"'`\s]*\[[^"'`\s]+\][^<>"'`\s]*)/.source,
@@ -230,7 +232,6 @@ function expandTailwindAtRules(context) {
230
232
  if (env.DEBUG) {
231
233
  console.log('Potential classes: ', candidates.size);
232
234
  console.log('Active contexts: ', sharedState.contextSourcesMap.size);
233
- console.log('Content match entries', contentMatchCache.size);
234
235
  }
235
236
  // Clear the cache for the changed files
236
237
  context.changedContent = [];