tailwindcss 0.0.0-insiders.be36eba → 0.0.0-insiders.bf59a88

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
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
  ### Changed
11
11
 
12
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))
13
15
 
14
16
  ### Added
15
17
 
@@ -20,11 +22,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20
22
  - Add all standard `cursor-*` values by default ([#5734](https://github.com/tailwindlabs/tailwindcss/pull/5734))
21
23
  - Add `grow-*` and `shrink-*` utilities, deprecate `flex-grow-*` and `flex-shrink-*` ([#5733](https://github.com/tailwindlabs/tailwindcss/pull/5733))
22
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))
23
26
 
24
27
  ### Fixed
25
28
 
26
29
  - Configure chokidar's `awaitWriteFinish` setting to avoid occasional stale builds on Windows ([#5774](https://github.com/tailwindlabs/tailwindcss/pull/5774))
27
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))
35
+ - Handle color transformations properly with `theme(...)` for all relevant plugins ([#4533](https://github.com/tailwindlabs/tailwindcss/pull/4533), [#5871](https://github.com/tailwindlabs/tailwindcss/pull/5871))
28
36
 
29
37
  ## [3.0.0-alpha.1] - 2021-10-01
30
38
 
package/lib/cli.js CHANGED
@@ -22,7 +22,7 @@ function _interopRequireDefault(obj) {
22
22
  };
23
23
  }
24
24
  let env = {
25
- DEBUG: process.env.DEBUG !== undefined
25
+ DEBUG: process.env.DEBUG !== undefined && process.env.DEBUG !== '0'
26
26
  };
27
27
  // ---
28
28
  function indentRecursive(node, indent = 0) {
@@ -135,7 +135,10 @@ var _default = [
135
135
  "backgroundBlendMode",
136
136
  "mixBlendMode",
137
137
  "boxShadow",
138
- "outline",
138
+ "outlineStyle",
139
+ "outlineWidth",
140
+ "outlineOffset",
141
+ "outlineColor",
139
142
  "ringWidth",
140
143
  "ringColor",
141
144
  "ringOpacity",
@@ -8,14 +8,12 @@ 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"));
21
19
  function _interopRequireDefault(obj) {
@@ -47,54 +45,20 @@ function _interopRequireWildcard(obj) {
47
45
  }
48
46
  }
49
47
  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
- }));
48
+ pseudoElementVariants: ({ addVariant })=>{
49
+ addVariant('first-letter', '&::first-letter');
50
+ addVariant('first-line', '&::first-line');
61
51
  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
- }),
52
+ '& *::marker',
53
+ '&::marker'
73
54
  ]);
74
55
  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
- }),
56
+ '& *::selection',
57
+ '&::selection'
86
58
  ]);
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)=>{
59
+ addVariant('file', '&::file-selector-button');
60
+ addVariant('before', ({ container })=>{
61
+ container.walkRules((rule)=>{
98
62
  let foundContent = false;
99
63
  rule.walkDecls('content', ()=>{
100
64
  foundContent = true;
@@ -102,17 +66,14 @@ let variantPlugins = {
102
66
  if (!foundContent) {
103
67
  rule.prepend(_postcss.default.decl({
104
68
  prop: 'content',
105
- value: '""'
69
+ value: 'var(--tw-content)'
106
70
  }));
107
71
  }
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
72
  });
114
- }, {
115
- withRule: (rule)=>{
73
+ return '&::before';
74
+ });
75
+ addVariant('after', ({ container })=>{
76
+ container.walkRules((rule)=>{
116
77
  let foundContent = false;
117
78
  rule.walkDecls('content', ()=>{
118
79
  foundContent = true;
@@ -120,13 +81,14 @@ let variantPlugins = {
120
81
  if (!foundContent) {
121
82
  rule.prepend(_postcss.default.decl({
122
83
  prop: 'content',
123
- value: '""'
84
+ value: 'var(--tw-content)'
124
85
  }));
125
86
  }
126
- }
127
- }));
87
+ });
88
+ return '&::after';
89
+ });
128
90
  },
129
- pseudoClassVariants: ({ config , addVariant })=>{
91
+ pseudoClassVariants: ({ addVariant })=>{
130
92
  let pseudoVariants = [
131
93
  // Positional
132
94
  [
@@ -180,94 +142,40 @@ let variantPlugins = {
180
142
  'focus-visible',
181
143
  'active',
182
144
  'disabled',
183
- ];
184
- for (let variant of pseudoVariants){
185
- let [variantName, state] = Array.isArray(variant) ? variant : [
145
+ ].map((variant)=>Array.isArray(variant) ? variant : [
186
146
  variant,
187
147
  `:${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
- }));
148
+ ]
149
+ );
150
+ for (let [variantName, state] of pseudoVariants){
151
+ addVariant(variantName, `&${state}`);
196
152
  }
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
- }));
153
+ for (let [variantName1, state1] of pseudoVariants){
154
+ addVariant(`group-${variantName1}`, `:merge(.group)${state1} &`);
215
155
  }
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
- }));
156
+ for (let [variantName2, state2] of pseudoVariants){
157
+ addVariant(`peer-${variantName2}`, `:merge(.peer)${state2} ~ &`);
234
158
  }
235
159
  },
236
- directionVariants: ({ config , addVariant })=>{
237
- addVariant('ltr', (0, _pluginUtils).transformAllSelectors((selector)=>{
160
+ directionVariants: ({ addVariant })=>{
161
+ addVariant('ltr', ()=>{
238
162
  _log.default.warn('rtl-experimental', [
239
163
  'The RTL features in Tailwind CSS are currently in preview.',
240
164
  'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
241
165
  ]);
242
- return `[dir="ltr"] ${(0, _pluginUtils).updateAllClasses(selector, (className)=>`ltr${config('separator')}${className}`
243
- )}`;
244
- }));
245
- addVariant('rtl', (0, _pluginUtils).transformAllSelectors((selector)=>{
166
+ return '[dir="ltr"] &';
167
+ });
168
+ addVariant('rtl', ()=>{
246
169
  _log.default.warn('rtl-experimental', [
247
170
  'The RTL features in Tailwind CSS are currently in preview.',
248
171
  'Preview features are not covered by semver, and may be improved in breaking ways at any time.',
249
172
  ]);
250
- return `[dir="rtl"] ${(0, _pluginUtils).updateAllClasses(selector, (className)=>`rtl${config('separator')}${className}`
251
- )}`;
252
- }));
173
+ return '[dir="rtl"] &';
174
+ });
253
175
  },
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
- }));
176
+ reducedMotionVariants: ({ addVariant })=>{
177
+ addVariant('motion-safe', '@media (prefers-reduced-motion: no-preference)');
178
+ addVariant('motion-reduce', '@media (prefers-reduced-motion: reduce)');
271
179
  },
272
180
  darkVariants: ({ config , addVariant })=>{
273
181
  let mode = config('darkMode', 'media');
@@ -279,39 +187,19 @@ let variantPlugins = {
279
187
  ]);
280
188
  }
281
189
  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
- }));
190
+ addVariant('dark', '.dark &');
292
191
  } 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
- }));
192
+ addVariant('dark', '@media (prefers-color-scheme: dark)');
301
193
  }
302
194
  },
303
- screenVariants: ({ config , theme , addVariant })=>{
195
+ printVariant: ({ addVariant })=>{
196
+ addVariant('print', '@media print');
197
+ },
198
+ screenVariants: ({ theme , addVariant })=>{
304
199
  for(let screen in theme('screens')){
305
200
  let size = theme('screens')[screen];
306
201
  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
- }));
202
+ addVariant(screen, `@media ${query}`);
315
203
  }
316
204
  }
317
205
  };
@@ -2768,40 +2656,64 @@ let corePlugins = {
2768
2656
  },
2769
2657
  fontVariantNumeric: ({ addUtilities })=>{
2770
2658
  addUtilities({
2771
- '.ordinal, .slashed-zero, .lining-nums, .oldstyle-nums, .proportional-nums, .tabular-nums, .diagonal-fractions, .stacked-fractions': {
2659
+ '@defaults font-variant-numeric': {
2772
2660
  '--tw-ordinal': 'var(--tw-empty,/*!*/ /*!*/)',
2773
2661
  '--tw-slashed-zero': 'var(--tw-empty,/*!*/ /*!*/)',
2774
2662
  '--tw-numeric-figure': 'var(--tw-empty,/*!*/ /*!*/)',
2775
2663
  '--tw-numeric-spacing': 'var(--tw-empty,/*!*/ /*!*/)',
2776
2664
  '--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)'
2665
+ '--tw-font-variant-numeric': 'var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)'
2778
2666
  },
2779
2667
  '.normal-nums': {
2780
2668
  'font-variant-numeric': 'normal'
2781
2669
  },
2782
2670
  '.ordinal': {
2783
- '--tw-ordinal': 'ordinal'
2671
+ '@defaults font-variant-numeric': {
2672
+ },
2673
+ '--tw-ordinal': 'ordinal',
2674
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2784
2675
  },
2785
2676
  '.slashed-zero': {
2786
- '--tw-slashed-zero': 'slashed-zero'
2677
+ '@defaults font-variant-numeric': {
2678
+ },
2679
+ '--tw-slashed-zero': 'slashed-zero',
2680
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2787
2681
  },
2788
2682
  '.lining-nums': {
2789
- '--tw-numeric-figure': 'lining-nums'
2683
+ '@defaults font-variant-numeric': {
2684
+ },
2685
+ '--tw-numeric-figure': 'lining-nums',
2686
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2790
2687
  },
2791
2688
  '.oldstyle-nums': {
2792
- '--tw-numeric-figure': 'oldstyle-nums'
2689
+ '@defaults font-variant-numeric': {
2690
+ },
2691
+ '--tw-numeric-figure': 'oldstyle-nums',
2692
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2793
2693
  },
2794
2694
  '.proportional-nums': {
2795
- '--tw-numeric-spacing': 'proportional-nums'
2695
+ '@defaults font-variant-numeric': {
2696
+ },
2697
+ '--tw-numeric-spacing': 'proportional-nums',
2698
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2796
2699
  },
2797
2700
  '.tabular-nums': {
2798
- '--tw-numeric-spacing': 'tabular-nums'
2701
+ '@defaults font-variant-numeric': {
2702
+ },
2703
+ '--tw-numeric-spacing': 'tabular-nums',
2704
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2799
2705
  },
2800
2706
  '.diagonal-fractions': {
2801
- '--tw-numeric-fraction': 'diagonal-fractions'
2707
+ '@defaults font-variant-numeric': {
2708
+ },
2709
+ '--tw-numeric-fraction': 'diagonal-fractions',
2710
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2802
2711
  },
2803
2712
  '.stacked-fractions': {
2804
- '--tw-numeric-fraction': 'stacked-fractions'
2713
+ '@defaults font-variant-numeric': {
2714
+ },
2715
+ '--tw-numeric-fraction': 'stacked-fractions',
2716
+ 'font-variant-numeric': 'var(--tw-font-variant-numeric)'
2805
2717
  }
2806
2718
  });
2807
2719
  },
@@ -3101,20 +3013,69 @@ let corePlugins = {
3101
3013
  });
3102
3014
  };
3103
3015
  })(),
3104
- outline: ({ matchUtilities , theme })=>{
3016
+ outlineStyle: ({ addUtilities })=>{
3017
+ addUtilities({
3018
+ '.outline-none': {
3019
+ outline: '2px solid transparent',
3020
+ 'outline-offset': '2px'
3021
+ },
3022
+ '.outline': {
3023
+ 'outline-style': 'solid'
3024
+ },
3025
+ '.outline-dashed': {
3026
+ 'outline-style': 'dashed'
3027
+ },
3028
+ '.outline-dotted': {
3029
+ 'outline-style': 'dotted'
3030
+ },
3031
+ '.outline-double': {
3032
+ 'outline-style': 'double'
3033
+ },
3034
+ '.outline-hidden': {
3035
+ 'outline-style': 'hidden'
3036
+ }
3037
+ });
3038
+ },
3039
+ outlineWidth: (0, _createUtilityPlugin).default('outlineWidth', [
3040
+ [
3041
+ 'outline',
3042
+ [
3043
+ 'outline-width'
3044
+ ]
3045
+ ]
3046
+ ], {
3047
+ type: [
3048
+ 'length',
3049
+ 'number',
3050
+ 'percentage'
3051
+ ]
3052
+ }),
3053
+ outlineOffset: (0, _createUtilityPlugin).default('outlineOffset', [
3054
+ [
3055
+ 'outline-offset',
3056
+ [
3057
+ 'outline-offset'
3058
+ ]
3059
+ ]
3060
+ ], {
3061
+ type: [
3062
+ 'length',
3063
+ 'number',
3064
+ 'percentage'
3065
+ ]
3066
+ }),
3067
+ outlineColor: ({ matchUtilities , theme })=>{
3105
3068
  matchUtilities({
3106
3069
  outline: (value)=>{
3107
- value = Array.isArray(value) ? value : value.split(',');
3108
- let [outline, outlineOffset = '0'] = Array.isArray(value) ? value : [
3109
- value
3110
- ];
3111
3070
  return {
3112
- outline,
3113
- 'outline-offset': outlineOffset
3071
+ 'outline-color': (0, _toColorValue).default(value)
3114
3072
  };
3115
3073
  }
3116
3074
  }, {
3117
- values: theme('outline')
3075
+ values: (0, _flattenColorPalette).default(theme('outlineColor')),
3076
+ type: [
3077
+ 'color'
3078
+ ]
3118
3079
  });
3119
3080
  },
3120
3081
  ringWidth: ({ matchUtilities , addBase , addUtilities , theme })=>{
@@ -3585,6 +3546,17 @@ let corePlugins = {
3585
3546
  ]
3586
3547
  ]
3587
3548
  ]),
3588
- content: (0, _createUtilityPlugin).default('content')
3549
+ content: (0, _createUtilityPlugin).default('content', [
3550
+ [
3551
+ 'content',
3552
+ [
3553
+ '--tw-content',
3554
+ [
3555
+ 'content',
3556
+ 'var(--tw-content)'
3557
+ ]
3558
+ ]
3559
+ ],
3560
+ ])
3589
3561
  };
3590
3562
  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.
@@ -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,