autoprefixer 9.4.3 → 9.4.7
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 +13 -0
- package/data/prefixes.js +2 -2
- package/lib/hacks/grid-utils.js +1 -1
- package/lib/hacks/text-decoration-skip-ink.js +40 -0
- package/lib/hacks/writing-mode.js +26 -7
- package/lib/prefixes.js +3 -2
- package/lib/processor.js +85 -48
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
3
3
|
|
|
4
|
+
## 9.4.7
|
|
5
|
+
* Fix infinite loop on mismatched parens.
|
|
6
|
+
|
|
7
|
+
## 9.4.6
|
|
8
|
+
* Fix warning text (by Albert Juhé Lluveras).
|
|
9
|
+
|
|
10
|
+
## 9.4.5
|
|
11
|
+
* Fix `text-decoration-skip-ink` support.
|
|
12
|
+
|
|
13
|
+
## 9.4.4
|
|
14
|
+
* Use `direction` value for `-ms-writing-mode` (by Denys Kniazevych).
|
|
15
|
+
* Fix warning text (by @zzzzBov).
|
|
16
|
+
|
|
4
17
|
## 9.4.3
|
|
5
18
|
* Add warning to force `flex-start` instead of `start` (by Antoine du Hamel).
|
|
6
19
|
* Fix docs (by Christian Oliff).
|
package/data/prefixes.js
CHANGED
|
@@ -427,9 +427,9 @@ f(decoration, function (browsers) {
|
|
|
427
427
|
});
|
|
428
428
|
});
|
|
429
429
|
f(decoration, {
|
|
430
|
-
match: /x.*#[
|
|
430
|
+
match: /x.*#[235]/
|
|
431
431
|
}, function (browsers) {
|
|
432
|
-
return prefix(['text-decoration-skip'], {
|
|
432
|
+
return prefix(['text-decoration-skip', 'text-decoration-skip-ink'], {
|
|
433
433
|
feature: 'text-decoration',
|
|
434
434
|
browsers: browsers
|
|
435
435
|
});
|
package/lib/hacks/grid-utils.js
CHANGED
|
@@ -1001,7 +1001,7 @@ function warnGridGap(_ref13) {
|
|
|
1001
1001
|
|
|
1002
1002
|
if (!hasColumns && (hasBothGaps || gap.column && !gap.row)) {
|
|
1003
1003
|
delete gap.column;
|
|
1004
|
-
decl.warn(result, 'Can not
|
|
1004
|
+
decl.warn(result, 'Can not implement grid-gap without grid-template-columns');
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
/**
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
|
4
|
+
|
|
5
|
+
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _defaults(subClass, superClass); }
|
|
6
|
+
|
|
7
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
|
|
9
|
+
var Declaration = require('../declaration');
|
|
10
|
+
|
|
11
|
+
var TextDecorationSkipInk =
|
|
12
|
+
/*#__PURE__*/
|
|
13
|
+
function (_Declaration) {
|
|
14
|
+
_inheritsLoose(TextDecorationSkipInk, _Declaration);
|
|
15
|
+
|
|
16
|
+
function TextDecorationSkipInk() {
|
|
17
|
+
return _Declaration.apply(this, arguments) || this;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var _proto = TextDecorationSkipInk.prototype;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Change prefix for ink value
|
|
24
|
+
*/
|
|
25
|
+
_proto.set = function set(decl, prefix) {
|
|
26
|
+
if (decl.prop === 'text-decoration-skip-ink' && decl.value === 'auto') {
|
|
27
|
+
decl.prop = prefix + 'text-decoration-skip';
|
|
28
|
+
decl.value = 'ink';
|
|
29
|
+
return decl;
|
|
30
|
+
} else {
|
|
31
|
+
return _Declaration.prototype.set.call(this, decl, prefix);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return TextDecorationSkipInk;
|
|
36
|
+
}(Declaration);
|
|
37
|
+
|
|
38
|
+
_defineProperty(TextDecorationSkipInk, "names", ['text-decoration-skip-ink', 'text-decoration-skip']);
|
|
39
|
+
|
|
40
|
+
module.exports = TextDecorationSkipInk;
|
|
@@ -19,13 +19,25 @@ function (_Declaration) {
|
|
|
19
19
|
|
|
20
20
|
var _proto = WritingMode.prototype;
|
|
21
21
|
|
|
22
|
-
_proto.
|
|
22
|
+
_proto.insert = function insert(decl, prefix, prefixes) {
|
|
23
23
|
if (prefix === '-ms-') {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
var cloned = this.set(this.clone(decl), prefix);
|
|
25
|
+
|
|
26
|
+
if (this.needCascade(decl)) {
|
|
27
|
+
cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var direction = 'ltr';
|
|
31
|
+
decl.parent.nodes.forEach(function (i) {
|
|
32
|
+
if (i.prop === 'direction') {
|
|
33
|
+
if (i.value === 'rtl' || i.value === 'ltr') direction = i.value;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
cloned.value = WritingMode.msValues[direction][decl.value] || decl.value;
|
|
37
|
+
return decl.parent.insertBefore(decl, cloned);
|
|
26
38
|
}
|
|
27
39
|
|
|
28
|
-
return _Declaration.prototype.
|
|
40
|
+
return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
|
|
29
41
|
};
|
|
30
42
|
|
|
31
43
|
return WritingMode;
|
|
@@ -34,9 +46,16 @@ function (_Declaration) {
|
|
|
34
46
|
_defineProperty(WritingMode, "names", ['writing-mode']);
|
|
35
47
|
|
|
36
48
|
_defineProperty(WritingMode, "msValues", {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
ltr: {
|
|
50
|
+
'horizontal-tb': 'lr-tb',
|
|
51
|
+
'vertical-rl': 'tb-rl',
|
|
52
|
+
'vertical-lr': 'tb-lr'
|
|
53
|
+
},
|
|
54
|
+
rtl: {
|
|
55
|
+
'horizontal-tb': 'rl-tb',
|
|
56
|
+
'vertical-rl': 'bt-rl',
|
|
57
|
+
'vertical-lr': 'bt-lr'
|
|
58
|
+
}
|
|
40
59
|
});
|
|
41
60
|
|
|
42
61
|
module.exports = WritingMode;
|
package/lib/prefixes.js
CHANGED
|
@@ -33,6 +33,7 @@ Declaration.hack(require('./hacks/flex-flow'));
|
|
|
33
33
|
Declaration.hack(require('./hacks/flex-grow'));
|
|
34
34
|
Declaration.hack(require('./hacks/flex-wrap'));
|
|
35
35
|
Declaration.hack(require('./hacks/grid-area'));
|
|
36
|
+
Declaration.hack(require('./hacks/place-self'));
|
|
36
37
|
Declaration.hack(require('./hacks/grid-start'));
|
|
37
38
|
Declaration.hack(require('./hacks/align-self'));
|
|
38
39
|
Declaration.hack(require('./hacks/appearance'));
|
|
@@ -41,6 +42,7 @@ Declaration.hack(require('./hacks/mask-border'));
|
|
|
41
42
|
Declaration.hack(require('./hacks/align-items'));
|
|
42
43
|
Declaration.hack(require('./hacks/flex-shrink'));
|
|
43
44
|
Declaration.hack(require('./hacks/break-props'));
|
|
45
|
+
Declaration.hack(require('./hacks/color-adjust'));
|
|
44
46
|
Declaration.hack(require('./hacks/writing-mode'));
|
|
45
47
|
Declaration.hack(require('./hacks/border-image'));
|
|
46
48
|
Declaration.hack(require('./hacks/align-content'));
|
|
@@ -62,8 +64,7 @@ Declaration.hack(require('./hacks/grid-column-align'));
|
|
|
62
64
|
Declaration.hack(require('./hacks/overscroll-behavior'));
|
|
63
65
|
Declaration.hack(require('./hacks/grid-template-areas'));
|
|
64
66
|
Declaration.hack(require('./hacks/text-emphasis-position'));
|
|
65
|
-
Declaration.hack(require('./hacks/
|
|
66
|
-
Declaration.hack(require('./hacks/place-self'));
|
|
67
|
+
Declaration.hack(require('./hacks/text-decoration-skip-ink'));
|
|
67
68
|
Value.hack(require('./hacks/gradient'));
|
|
68
69
|
Value.hack(require('./hacks/intrinsic'));
|
|
69
70
|
Value.hack(require('./hacks/pixelated'));
|
package/lib/processor.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var parser = require('postcss-value-parser');
|
|
4
|
+
|
|
3
5
|
var Value = require('./value');
|
|
4
6
|
|
|
5
7
|
var insertAreas = require('./hacks/grid-utils').insertAreas;
|
|
6
8
|
|
|
7
9
|
var OLD_LINEAR = /(^|[^-])linear-gradient\(\s*(top|left|right|bottom)/i;
|
|
8
10
|
var OLD_RADIAL = /(^|[^-])radial-gradient\(\s*\d+(\w*|%)\s+\d+(\w*|%)\s*,/i;
|
|
9
|
-
var RADIAL_BLOCK = /\(((?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*)\)/i;
|
|
10
11
|
var IGNORE_NEXT = /(!\s*)?autoprefixer:\s*ignore\s+next/i;
|
|
11
12
|
var GRID_REGEX = /(!\s*)?autoprefixer\s*grid:\s*(on|off|(no-)?autoplace)/i;
|
|
12
13
|
var SIZES = ['width', 'height', 'min-width', 'max-width', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size'];
|
|
@@ -126,6 +127,10 @@ function () {
|
|
|
126
127
|
node: decl
|
|
127
128
|
});
|
|
128
129
|
}
|
|
130
|
+
} else if (prop === 'text-decoration-skip' && value === 'ink') {
|
|
131
|
+
result.warn('Replace text-decoration-skip: ink to ' + 'text-decoration-skip-ink: auto, because spec had been changed', {
|
|
132
|
+
node: decl
|
|
133
|
+
});
|
|
129
134
|
} else {
|
|
130
135
|
if (gridPrefixes) {
|
|
131
136
|
if (/^(align|justify|place)-items$/.test(prop) && insideGrid(decl)) {
|
|
@@ -208,17 +213,49 @@ function () {
|
|
|
208
213
|
node: decl
|
|
209
214
|
});
|
|
210
215
|
} else {
|
|
211
|
-
var
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
216
|
+
var ast = parser(value);
|
|
217
|
+
|
|
218
|
+
for (var _iterator = ast.nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
|
|
219
|
+
var _ref;
|
|
220
|
+
|
|
221
|
+
if (_isArray) {
|
|
222
|
+
if (_i >= _iterator.length) break;
|
|
223
|
+
_ref = _iterator[_i++];
|
|
224
|
+
} else {
|
|
225
|
+
_i = _iterator.next();
|
|
226
|
+
if (_i.done) break;
|
|
227
|
+
_ref = _i.value;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
var i = _ref;
|
|
231
|
+
|
|
232
|
+
if (i.type === 'function' && i.value === 'radial-gradient') {
|
|
233
|
+
for (var _iterator2 = i.nodes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
|
|
234
|
+
var _ref2;
|
|
235
|
+
|
|
236
|
+
if (_isArray2) {
|
|
237
|
+
if (_i2 >= _iterator2.length) break;
|
|
238
|
+
_ref2 = _iterator2[_i2++];
|
|
239
|
+
} else {
|
|
240
|
+
_i2 = _iterator2.next();
|
|
241
|
+
if (_i2.done) break;
|
|
242
|
+
_ref2 = _i2.value;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
var word = _ref2;
|
|
246
|
+
|
|
247
|
+
if (word.type === 'word') {
|
|
248
|
+
if (word.value === 'cover') {
|
|
249
|
+
result.warn('Gradient has outdated direction syntax. ' + 'Replace `cover` to `farthest-corner`.', {
|
|
250
|
+
node: decl
|
|
251
|
+
});
|
|
252
|
+
} else if (word.value === 'contain') {
|
|
253
|
+
result.warn('Gradient has outdated direction syntax. ' + 'Replace `contain` to `closest-side`.', {
|
|
254
|
+
node: decl
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
222
259
|
}
|
|
223
260
|
}
|
|
224
261
|
}
|
|
@@ -311,19 +348,19 @@ function () {
|
|
|
311
348
|
|
|
312
349
|
var unprefixed = _this.prefixes.unprefixed(decl.prop);
|
|
313
350
|
|
|
314
|
-
for (var
|
|
315
|
-
var
|
|
351
|
+
for (var _iterator3 = _this.prefixes.values('add', unprefixed), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
|
|
352
|
+
var _ref3;
|
|
316
353
|
|
|
317
|
-
if (
|
|
318
|
-
if (
|
|
319
|
-
|
|
354
|
+
if (_isArray3) {
|
|
355
|
+
if (_i3 >= _iterator3.length) break;
|
|
356
|
+
_ref3 = _iterator3[_i3++];
|
|
320
357
|
} else {
|
|
321
|
-
|
|
322
|
-
if (
|
|
323
|
-
|
|
358
|
+
_i3 = _iterator3.next();
|
|
359
|
+
if (_i3.done) break;
|
|
360
|
+
_ref3 = _i3.value;
|
|
324
361
|
}
|
|
325
362
|
|
|
326
|
-
var value =
|
|
363
|
+
var value = _ref3;
|
|
327
364
|
value.process(decl, result);
|
|
328
365
|
}
|
|
329
366
|
|
|
@@ -351,16 +388,16 @@ function () {
|
|
|
351
388
|
}); // Selectors
|
|
352
389
|
|
|
353
390
|
var _loop = function _loop() {
|
|
354
|
-
if (
|
|
355
|
-
if (
|
|
356
|
-
|
|
391
|
+
if (_isArray4) {
|
|
392
|
+
if (_i4 >= _iterator4.length) return "break";
|
|
393
|
+
_ref4 = _iterator4[_i4++];
|
|
357
394
|
} else {
|
|
358
|
-
|
|
359
|
-
if (
|
|
360
|
-
|
|
395
|
+
_i4 = _iterator4.next();
|
|
396
|
+
if (_i4.done) return "break";
|
|
397
|
+
_ref4 = _i4.value;
|
|
361
398
|
}
|
|
362
399
|
|
|
363
|
-
var checker =
|
|
400
|
+
var checker = _ref4;
|
|
364
401
|
css.walkRules(function (rule, i) {
|
|
365
402
|
if (checker.check(rule)) {
|
|
366
403
|
if (!_this2.disabled(rule, result)) {
|
|
@@ -370,8 +407,8 @@ function () {
|
|
|
370
407
|
});
|
|
371
408
|
};
|
|
372
409
|
|
|
373
|
-
for (var
|
|
374
|
-
var
|
|
410
|
+
for (var _iterator4 = this.prefixes.remove.selectors, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
|
|
411
|
+
var _ref4;
|
|
375
412
|
|
|
376
413
|
var _ret = _loop();
|
|
377
414
|
|
|
@@ -410,19 +447,19 @@ function () {
|
|
|
410
447
|
} // Values
|
|
411
448
|
|
|
412
449
|
|
|
413
|
-
for (var
|
|
414
|
-
var
|
|
450
|
+
for (var _iterator5 = _this2.prefixes.values('remove', unprefixed), _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
|
|
451
|
+
var _ref5;
|
|
415
452
|
|
|
416
|
-
if (
|
|
417
|
-
if (
|
|
418
|
-
|
|
453
|
+
if (_isArray5) {
|
|
454
|
+
if (_i5 >= _iterator5.length) break;
|
|
455
|
+
_ref5 = _iterator5[_i5++];
|
|
419
456
|
} else {
|
|
420
|
-
|
|
421
|
-
if (
|
|
422
|
-
|
|
457
|
+
_i5 = _iterator5.next();
|
|
458
|
+
if (_i5.done) break;
|
|
459
|
+
_ref5 = _i5.value;
|
|
423
460
|
}
|
|
424
461
|
|
|
425
|
-
var checker =
|
|
462
|
+
var checker = _ref5;
|
|
426
463
|
|
|
427
464
|
if (!checker.check(decl.value)) {
|
|
428
465
|
continue;
|
|
@@ -592,19 +629,19 @@ function () {
|
|
|
592
629
|
;
|
|
593
630
|
|
|
594
631
|
_proto.displayType = function displayType(decl) {
|
|
595
|
-
for (var
|
|
596
|
-
var
|
|
632
|
+
for (var _iterator6 = decl.parent.nodes, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
|
|
633
|
+
var _ref6;
|
|
597
634
|
|
|
598
|
-
if (
|
|
599
|
-
if (
|
|
600
|
-
|
|
635
|
+
if (_isArray6) {
|
|
636
|
+
if (_i6 >= _iterator6.length) break;
|
|
637
|
+
_ref6 = _iterator6[_i6++];
|
|
601
638
|
} else {
|
|
602
|
-
|
|
603
|
-
if (
|
|
604
|
-
|
|
639
|
+
_i6 = _iterator6.next();
|
|
640
|
+
if (_i6.done) break;
|
|
641
|
+
_ref6 = _i6.value;
|
|
605
642
|
}
|
|
606
643
|
|
|
607
|
-
var i =
|
|
644
|
+
var i = _ref6;
|
|
608
645
|
|
|
609
646
|
if (i.prop !== 'display') {
|
|
610
647
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autoprefixer",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.7",
|
|
4
4
|
"description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
|
|
5
5
|
"keywords": ["autoprefixer", "css", "prefix", "postcss", "postcss-plugin"],
|
|
6
6
|
"author": "Andrey Sitnik <andrey@sitnik.ru>",
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"node": ">=6.0.0"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"browserslist": "^4.
|
|
14
|
-
"caniuse-lite": "^1.0.
|
|
13
|
+
"browserslist": "^4.4.1",
|
|
14
|
+
"caniuse-lite": "^1.0.30000932",
|
|
15
15
|
"normalize-range": "^0.1.2",
|
|
16
16
|
"num2fraction": "^1.2.2",
|
|
17
|
-
"postcss": "^7.0.
|
|
17
|
+
"postcss": "^7.0.14",
|
|
18
18
|
"postcss-value-parser": "^3.3.1"
|
|
19
19
|
},
|
|
20
20
|
"bin": {
|