autoprefixer 9.4.2 → 9.4.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 (43) hide show
  1. package/CHANGELOG.md +6 -2
  2. package/README.md +5 -5
  3. package/lib/at-rule.js +2 -2
  4. package/lib/browsers.js +6 -6
  5. package/lib/declaration.js +26 -26
  6. package/lib/hacks/align-content.js +4 -4
  7. package/lib/hacks/align-items.js +4 -4
  8. package/lib/hacks/align-self.js +6 -6
  9. package/lib/hacks/block-logical.js +2 -2
  10. package/lib/hacks/border-radius.js +2 -2
  11. package/lib/hacks/break-props.js +6 -6
  12. package/lib/hacks/color-adjust.js +2 -2
  13. package/lib/hacks/display-flex.js +6 -6
  14. package/lib/hacks/flex-basis.js +4 -4
  15. package/lib/hacks/flex-direction.js +4 -4
  16. package/lib/hacks/flex-grow.js +2 -2
  17. package/lib/hacks/flex-shrink.js +4 -4
  18. package/lib/hacks/flex.js +4 -4
  19. package/lib/hacks/gradient.js +32 -32
  20. package/lib/hacks/grid-column-align.js +4 -4
  21. package/lib/hacks/grid-row-align.js +4 -4
  22. package/lib/hacks/grid-rows-columns.js +2 -2
  23. package/lib/hacks/grid-start.js +4 -4
  24. package/lib/hacks/grid-utils.js +1 -1
  25. package/lib/hacks/image-rendering.js +8 -8
  26. package/lib/hacks/inline-logical.js +2 -2
  27. package/lib/hacks/justify-content.js +4 -4
  28. package/lib/hacks/mask-border.js +2 -2
  29. package/lib/hacks/order.js +4 -4
  30. package/lib/hacks/overscroll-behavior.js +4 -4
  31. package/lib/hacks/pixelated.js +2 -2
  32. package/lib/hacks/placeholder.js +2 -2
  33. package/lib/hacks/transform-decl.js +6 -6
  34. package/lib/old-selector.js +2 -2
  35. package/lib/prefixer.js +8 -8
  36. package/lib/prefixes.js +18 -18
  37. package/lib/processor.js +28 -16
  38. package/lib/resolution.js +6 -6
  39. package/lib/selector.js +16 -16
  40. package/lib/supports.js +30 -30
  41. package/lib/transition.js +22 -22
  42. package/lib/value.js +12 -12
  43. package/package.json +3 -3
package/lib/prefixes.js CHANGED
@@ -113,11 +113,11 @@ function () {
113
113
  }
114
114
 
115
115
  return this.cleanerCache;
116
- };
116
+ }
117
117
  /**
118
118
  * Select prefixes from data, which is necessary for selected browsers
119
119
  */
120
-
120
+ ;
121
121
 
122
122
  _proto.select = function select(list) {
123
123
  var _this = this;
@@ -190,11 +190,11 @@ function () {
190
190
  }
191
191
 
192
192
  return selected;
193
- };
193
+ }
194
194
  /**
195
195
  * Sort vendor prefixes
196
196
  */
197
-
197
+ ;
198
198
 
199
199
  _proto.sort = function sort(prefixes) {
200
200
  return prefixes.sort(function (a, b) {
@@ -207,11 +207,11 @@ function () {
207
207
  return bLength - aLength;
208
208
  }
209
209
  });
210
- };
210
+ }
211
211
  /**
212
212
  * Cache prefixes data to fast CSS processing
213
213
  */
214
-
214
+ ;
215
215
 
216
216
  _proto.preprocess = function preprocess(selected) {
217
217
  var add = {
@@ -415,11 +415,11 @@ function () {
415
415
  }
416
416
 
417
417
  return [add, remove];
418
- };
418
+ }
419
419
  /**
420
420
  * Declaration loader with caching
421
421
  */
422
-
422
+ ;
423
423
 
424
424
  _proto.decl = function decl(prop) {
425
425
  var decl = declsCache[prop];
@@ -430,11 +430,11 @@ function () {
430
430
  declsCache[prop] = Declaration.load(prop);
431
431
  return declsCache[prop];
432
432
  }
433
- };
433
+ }
434
434
  /**
435
435
  * Return unprefixed version of property
436
436
  */
437
-
437
+ ;
438
438
 
439
439
  _proto.unprefixed = function unprefixed(prop) {
440
440
  var value = this.normalize(vendor.unprefixed(prop));
@@ -444,28 +444,28 @@ function () {
444
444
  }
445
445
 
446
446
  return value;
447
- };
447
+ }
448
448
  /**
449
449
  * Normalize prefix for remover
450
450
  */
451
-
451
+ ;
452
452
 
453
453
  _proto.normalize = function normalize(prop) {
454
454
  return this.decl(prop).normalize(prop);
455
- };
455
+ }
456
456
  /**
457
457
  * Return prefixed version of property
458
458
  */
459
-
459
+ ;
460
460
 
461
461
  _proto.prefixed = function prefixed(prop, prefix) {
462
462
  prop = vendor.unprefixed(prop);
463
463
  return this.decl(prop).prefixed(prop, prefix);
464
- };
464
+ }
465
465
  /**
466
466
  * Return values, which must be prefixed in selected property
467
467
  */
468
-
468
+ ;
469
469
 
470
470
  _proto.values = function values(type, prop) {
471
471
  var data = this[type];
@@ -477,11 +477,11 @@ function () {
477
477
  } else {
478
478
  return global || values || [];
479
479
  }
480
- };
480
+ }
481
481
  /**
482
482
  * Group declaration by unprefixed property to check them
483
483
  */
484
-
484
+ ;
485
485
 
486
486
  _proto.group = function group(decl) {
487
487
  var _this2 = this;
package/lib/processor.js CHANGED
@@ -86,6 +86,12 @@ function () {
86
86
  });
87
87
  }
88
88
 
89
+ function insideFlex(decl) {
90
+ return decl.parent.some(function (subDecl) {
91
+ return subDecl.prop === 'display' && /(inline-)?flex/.test(subDecl.value);
92
+ });
93
+ }
94
+
89
95
  var gridPrefixes = this.gridStatus(css, result) && this.prefixes.add['grid-area'] && this.prefixes.add['grid-area'].prefixes;
90
96
  css.walkDecls(function (decl) {
91
97
  if (_this.disabledDecl(decl, result)) return undefined;
@@ -114,6 +120,12 @@ function () {
114
120
  node: decl
115
121
  });
116
122
  }
123
+ } else if (/^(align|justify|place)-(items|content)$/.test(prop) && insideFlex(decl)) {
124
+ if (value === 'start' || value === 'end') {
125
+ result.warn(value + " value has mixed support, consider using " + ("flex-" + value + " instead"), {
126
+ node: decl
127
+ });
128
+ }
117
129
  } else {
118
130
  if (gridPrefixes) {
119
131
  if (/^(align|justify|place)-items$/.test(prop) && insideGrid(decl)) {
@@ -317,11 +329,11 @@ function () {
317
329
 
318
330
  Value.save(_this.prefixes, decl);
319
331
  });
320
- };
332
+ }
321
333
  /**
322
334
  * Remove unnecessary pefixes
323
335
  */
324
-
336
+ ;
325
337
 
326
338
  _proto.remove = function remove(css, result) {
327
339
  var _this2 = this;
@@ -428,19 +440,19 @@ function () {
428
440
  }
429
441
  }
430
442
  });
431
- };
443
+ }
432
444
  /**
433
445
  * Some rare old values, which is not in standard
434
446
  */
435
-
447
+ ;
436
448
 
437
449
  _proto.withHackValue = function withHackValue(decl) {
438
450
  return decl.prop === '-webkit-background-clip' && decl.value === 'text';
439
- };
451
+ }
440
452
  /**
441
453
  * Check for grid/flexbox options.
442
454
  */
443
-
455
+ ;
444
456
 
445
457
  _proto.disabledValue = function disabledValue(node, result) {
446
458
  if (this.gridStatus(node, result) === false && node.type === 'decl') {
@@ -456,11 +468,11 @@ function () {
456
468
  }
457
469
 
458
470
  return this.disabled(node, result);
459
- };
471
+ }
460
472
  /**
461
473
  * Check for grid/flexbox options.
462
474
  */
463
-
475
+ ;
464
476
 
465
477
  _proto.disabledDecl = function disabledDecl(node, result) {
466
478
  if (this.gridStatus(node, result) === false && node.type === 'decl') {
@@ -478,11 +490,11 @@ function () {
478
490
  }
479
491
 
480
492
  return this.disabled(node, result);
481
- };
493
+ }
482
494
  /**
483
495
  * Check for control comment and global options
484
496
  */
485
-
497
+ ;
486
498
 
487
499
  _proto.disabled = function disabled(node, result) {
488
500
  if (!node) return false;
@@ -540,11 +552,11 @@ function () {
540
552
 
541
553
  node._autoprefixerDisabled = value;
542
554
  return value;
543
- };
555
+ }
544
556
  /**
545
557
  * Normalize spaces in cascade declaration group
546
558
  */
547
-
559
+ ;
548
560
 
549
561
  _proto.reduceSpaces = function reduceSpaces(decl) {
550
562
  var stop = false;
@@ -573,11 +585,11 @@ function () {
573
585
  other.raws.before = parts.join('\n');
574
586
  }
575
587
  });
576
- };
588
+ }
577
589
  /**
578
590
  * Is it flebox or grid rule
579
591
  */
580
-
592
+ ;
581
593
 
582
594
  _proto.displayType = function displayType(decl) {
583
595
  for (var _iterator4 = decl.parent.nodes, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
@@ -608,11 +620,11 @@ function () {
608
620
  }
609
621
 
610
622
  return false;
611
- };
623
+ }
612
624
  /**
613
625
  * Set grid option via control comment
614
626
  */
615
-
627
+ ;
616
628
 
617
629
  _proto.gridStatus = function gridStatus(node, result) {
618
630
  if (!node) return false;
package/lib/resolution.js CHANGED
@@ -33,11 +33,11 @@ function (_Prefixer) {
33
33
  } else {
34
34
  return prefix + name + '-device-pixel-ratio';
35
35
  }
36
- };
36
+ }
37
37
  /**
38
38
  * Return prefixed query
39
39
  */
40
-
40
+ ;
41
41
 
42
42
  _proto.prefixQuery = function prefixQuery(prefix, name, colon, value, units) {
43
43
  if (units === 'dpi') {
@@ -49,11 +49,11 @@ function (_Prefixer) {
49
49
  }
50
50
 
51
51
  return this.prefixName(prefix, name) + colon + value;
52
- };
52
+ }
53
53
  /**
54
54
  * Remove prefixed queries
55
55
  */
56
-
56
+ ;
57
57
 
58
58
  _proto.clean = function clean(rule) {
59
59
  var _this = this;
@@ -86,11 +86,11 @@ function (_Prefixer) {
86
86
  });
87
87
  });
88
88
  });
89
- };
89
+ }
90
90
  /**
91
91
  * Add prefixed queries
92
92
  */
93
-
93
+ ;
94
94
 
95
95
  _proto.process = function process(rule) {
96
96
  var _this2 = this;
package/lib/selector.js CHANGED
@@ -37,19 +37,19 @@ function (_Prefixer) {
37
37
  }
38
38
 
39
39
  return false;
40
- };
40
+ }
41
41
  /**
42
42
  * Return prefixed version of selector
43
43
  */
44
-
44
+ ;
45
45
 
46
46
  _proto.prefixed = function prefixed(prefix) {
47
47
  return this.name.replace(/^([^\w]*)/, "$1" + prefix);
48
- };
48
+ }
49
49
  /**
50
50
  * Lazy loadRegExp for name
51
51
  */
52
-
52
+ ;
53
53
 
54
54
  _proto.regexp = function regexp(prefix) {
55
55
  if (this.regexpCache[prefix]) {
@@ -59,19 +59,19 @@ function (_Prefixer) {
59
59
  var name = prefix ? this.prefixed(prefix) : this.name;
60
60
  this.regexpCache[prefix] = new RegExp("(^|[^:\"'=])" + utils.escapeRegexp(name), 'gi');
61
61
  return this.regexpCache[prefix];
62
- };
62
+ }
63
63
  /**
64
64
  * All possible prefixes
65
65
  */
66
-
66
+ ;
67
67
 
68
68
  _proto.possible = function possible() {
69
69
  return Browsers.prefixes();
70
- };
70
+ }
71
71
  /**
72
72
  * Return all possible selector prefixes
73
73
  */
74
-
74
+ ;
75
75
 
76
76
  _proto.prefixeds = function prefixeds(rule) {
77
77
  if (rule._autoprefixerPrefixeds) {
@@ -98,11 +98,11 @@ function (_Prefixer) {
98
98
 
99
99
  rule._autoprefixerPrefixeds = prefixeds;
100
100
  return rule._autoprefixerPrefixeds;
101
- };
101
+ }
102
102
  /**
103
103
  * Is rule already prefixed before
104
104
  */
105
-
105
+ ;
106
106
 
107
107
  _proto.already = function already(rule, prefixeds, prefix) {
108
108
  var index = rule.parent.index(rule) - 1;
@@ -137,19 +137,19 @@ function (_Prefixer) {
137
137
  }
138
138
 
139
139
  return false;
140
- };
140
+ }
141
141
  /**
142
142
  * Replace selectors by prefixed one
143
143
  */
144
-
144
+ ;
145
145
 
146
146
  _proto.replace = function replace(selector, prefix) {
147
147
  return selector.replace(this.regexp(), "$1" + this.prefixed(prefix));
148
- };
148
+ }
149
149
  /**
150
150
  * Clone and add prefixes for at-rule
151
151
  */
152
-
152
+ ;
153
153
 
154
154
  _proto.add = function add(rule, prefix) {
155
155
  var prefixeds = this.prefixeds(rule);
@@ -162,11 +162,11 @@ function (_Prefixer) {
162
162
  selector: prefixeds[prefix]
163
163
  });
164
164
  rule.parent.insertBefore(rule, cloned);
165
- };
165
+ }
166
166
  /**
167
167
  * Return function to fast find prefixed selector
168
168
  */
169
-
169
+ ;
170
170
 
171
171
  _proto.old = function old(prefix) {
172
172
  return new OldSelector(this, prefix);
package/lib/supports.js CHANGED
@@ -51,11 +51,11 @@ function () {
51
51
  var browsers = new Browsers(this.all.browsers.data, filtered, this.all.options);
52
52
  this.prefixerCache = new this.Prefixes(this.all.data, browsers, this.all.options);
53
53
  return this.prefixerCache;
54
- };
54
+ }
55
55
  /**
56
56
  * Parse string into declaration property and value
57
57
  */
58
-
58
+ ;
59
59
 
60
60
  _proto.parse = function parse(str) {
61
61
  var parts = str.split(':');
@@ -63,11 +63,11 @@ function () {
63
63
  var value = parts[1];
64
64
  if (!value) value = '';
65
65
  return [prop.trim(), value.trim()];
66
- };
66
+ }
67
67
  /**
68
68
  * Create virtual rule to process it by prefixer
69
69
  */
70
-
70
+ ;
71
71
 
72
72
  _proto.virtual = function virtual(str) {
73
73
  var _this$parse = this.parse(str),
@@ -83,11 +83,11 @@ function () {
83
83
  }
84
84
  });
85
85
  return rule;
86
- };
86
+ }
87
87
  /**
88
88
  * Return array of Declaration with all necessary prefixes
89
89
  */
90
-
90
+ ;
91
91
 
92
92
  _proto.prefixed = function prefixed(str) {
93
93
  var rule = this.virtual(str);
@@ -138,44 +138,44 @@ function () {
138
138
  }
139
139
 
140
140
  return rule.nodes;
141
- };
141
+ }
142
142
  /**
143
143
  * Return true if brackets node is "not" word
144
144
  */
145
-
145
+ ;
146
146
 
147
147
  _proto.isNot = function isNot(node) {
148
148
  return typeof node === 'string' && /not\s*/i.test(node);
149
- };
149
+ }
150
150
  /**
151
151
  * Return true if brackets node is "or" word
152
152
  */
153
-
153
+ ;
154
154
 
155
155
  _proto.isOr = function isOr(node) {
156
156
  return typeof node === 'string' && /\s*or\s*/i.test(node);
157
- };
157
+ }
158
158
  /**
159
159
  * Return true if brackets node is (prop: value)
160
160
  */
161
-
161
+ ;
162
162
 
163
163
  _proto.isProp = function isProp(node) {
164
164
  return typeof node === 'object' && node.length === 1 && typeof node[0] === 'string';
165
- };
165
+ }
166
166
  /**
167
167
  * Return true if prefixed property has no unprefixed
168
168
  */
169
-
169
+ ;
170
170
 
171
171
  _proto.isHack = function isHack(all, unprefixed) {
172
172
  var check = new RegExp("(\\(|\\s)" + utils.escapeRegexp(unprefixed) + ":");
173
173
  return !check.test(all);
174
- };
174
+ }
175
175
  /**
176
176
  * Return true if we need to remove node
177
177
  */
178
-
178
+ ;
179
179
 
180
180
  _proto.toRemove = function toRemove(str, all) {
181
181
  var _this$parse2 = this.parse(str),
@@ -209,11 +209,11 @@ function () {
209
209
  }
210
210
 
211
211
  return false;
212
- };
212
+ }
213
213
  /**
214
214
  * Remove all unnecessary prefixes
215
215
  */
216
-
216
+ ;
217
217
 
218
218
  _proto.remove = function remove(nodes, all) {
219
219
  var i = 0;
@@ -237,11 +237,11 @@ function () {
237
237
  }
238
238
 
239
239
  return nodes;
240
- };
240
+ }
241
241
  /**
242
242
  * Clean brackets with one child
243
243
  */
244
-
244
+ ;
245
245
 
246
246
  _proto.cleanBrackets = function cleanBrackets(nodes) {
247
247
  var _this = this;
@@ -257,11 +257,11 @@ function () {
257
257
 
258
258
  return _this.cleanBrackets(i);
259
259
  });
260
- };
260
+ }
261
261
  /**
262
262
  * Add " or " between properties and convert it to brackets format
263
263
  */
264
-
264
+ ;
265
265
 
266
266
  _proto.convert = function convert(progress) {
267
267
  var result = [''];
@@ -285,11 +285,11 @@ function () {
285
285
 
286
286
  result[result.length - 1] = '';
287
287
  return result;
288
- };
288
+ }
289
289
  /**
290
290
  * Compress value functions into a string nodes
291
291
  */
292
-
292
+ ;
293
293
 
294
294
  _proto.normalize = function normalize(nodes) {
295
295
  var _this2 = this;
@@ -309,11 +309,11 @@ function () {
309
309
  return nodes.map(function (i) {
310
310
  return _this2.normalize(i);
311
311
  });
312
- };
312
+ }
313
313
  /**
314
314
  * Add prefixes
315
315
  */
316
-
316
+ ;
317
317
 
318
318
  _proto.add = function add(nodes, all) {
319
319
  var _this3 = this;
@@ -335,11 +335,11 @@ function () {
335
335
 
336
336
  return i;
337
337
  });
338
- };
338
+ }
339
339
  /**
340
340
  * Add prefixed declaration
341
341
  */
342
-
342
+ ;
343
343
 
344
344
  _proto.process = function process(rule) {
345
345
  var ast = brackets.parse(rule.params);
@@ -348,11 +348,11 @@ function () {
348
348
  ast = this.add(ast, rule.params);
349
349
  ast = this.cleanBrackets(ast);
350
350
  rule.params = brackets.stringify(ast);
351
- };
351
+ }
352
352
  /**
353
353
  * Check global options
354
354
  */
355
-
355
+ ;
356
356
 
357
357
  _proto.disabled = function disabled(node) {
358
358
  if (!this.all.options.grid) {