autoprefixer 9.4.2 → 9.4.6
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 +16 -2
- package/README.md +5 -5
- package/data/prefixes.js +2 -2
- package/lib/at-rule.js +2 -2
- package/lib/browsers.js +6 -6
- package/lib/declaration.js +26 -26
- package/lib/hacks/align-content.js +4 -4
- package/lib/hacks/align-items.js +4 -4
- package/lib/hacks/align-self.js +6 -6
- package/lib/hacks/block-logical.js +2 -2
- package/lib/hacks/border-radius.js +2 -2
- package/lib/hacks/break-props.js +6 -6
- package/lib/hacks/color-adjust.js +2 -2
- package/lib/hacks/display-flex.js +6 -6
- package/lib/hacks/flex-basis.js +4 -4
- package/lib/hacks/flex-direction.js +4 -4
- package/lib/hacks/flex-grow.js +2 -2
- package/lib/hacks/flex-shrink.js +4 -4
- package/lib/hacks/flex.js +4 -4
- package/lib/hacks/gradient.js +32 -32
- package/lib/hacks/grid-column-align.js +4 -4
- package/lib/hacks/grid-row-align.js +4 -4
- package/lib/hacks/grid-rows-columns.js +2 -2
- package/lib/hacks/grid-start.js +4 -4
- package/lib/hacks/grid-utils.js +2 -2
- package/lib/hacks/image-rendering.js +8 -8
- package/lib/hacks/inline-logical.js +2 -2
- package/lib/hacks/justify-content.js +4 -4
- package/lib/hacks/mask-border.js +2 -2
- package/lib/hacks/order.js +4 -4
- package/lib/hacks/overscroll-behavior.js +4 -4
- package/lib/hacks/pixelated.js +2 -2
- package/lib/hacks/placeholder.js +2 -2
- package/lib/hacks/text-decoration-skip-ink.js +40 -0
- package/lib/hacks/transform-decl.js +6 -6
- package/lib/hacks/writing-mode.js +26 -7
- package/lib/old-selector.js +2 -2
- package/lib/prefixer.js +8 -8
- package/lib/prefixes.js +21 -20
- package/lib/processor.js +32 -16
- package/lib/resolution.js +6 -6
- package/lib/selector.js +16 -16
- package/lib/supports.js +30 -30
- package/lib/transition.js +22 -22
- package/lib/value.js +12 -12
- package/package.json +4 -4
package/lib/hacks/gradient.js
CHANGED
|
@@ -101,11 +101,11 @@ function (_Value) {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
return ast.toString();
|
|
104
|
-
}
|
|
104
|
+
}
|
|
105
105
|
/**
|
|
106
106
|
* Replace first token
|
|
107
107
|
*/
|
|
108
|
-
|
|
108
|
+
;
|
|
109
109
|
|
|
110
110
|
_proto.replaceFirst = function replaceFirst(params) {
|
|
111
111
|
for (var _len2 = arguments.length, words = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
@@ -126,21 +126,21 @@ function (_Value) {
|
|
|
126
126
|
};
|
|
127
127
|
});
|
|
128
128
|
return prefix.concat(params.slice(1));
|
|
129
|
-
}
|
|
129
|
+
}
|
|
130
130
|
/**
|
|
131
131
|
* Convert angle unit to deg
|
|
132
132
|
*/
|
|
133
|
-
|
|
133
|
+
;
|
|
134
134
|
|
|
135
135
|
_proto.normalizeUnit = function normalizeUnit(str, full) {
|
|
136
136
|
var num = parseFloat(str);
|
|
137
137
|
var deg = num / full * 360;
|
|
138
138
|
return deg + "deg";
|
|
139
|
-
}
|
|
139
|
+
}
|
|
140
140
|
/**
|
|
141
141
|
* Normalize angle
|
|
142
142
|
*/
|
|
143
|
-
|
|
143
|
+
;
|
|
144
144
|
|
|
145
145
|
_proto.normalize = function normalize(nodes) {
|
|
146
146
|
if (!nodes[0]) return nodes;
|
|
@@ -168,11 +168,11 @@ function (_Value) {
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
return nodes;
|
|
171
|
-
}
|
|
171
|
+
}
|
|
172
172
|
/**
|
|
173
173
|
* Replace old direction to new
|
|
174
174
|
*/
|
|
175
|
-
|
|
175
|
+
;
|
|
176
176
|
|
|
177
177
|
_proto.newDirection = function newDirection(params) {
|
|
178
178
|
if (params[0].value === 'to') {
|
|
@@ -204,11 +204,11 @@ function (_Value) {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
return params;
|
|
207
|
-
}
|
|
207
|
+
}
|
|
208
208
|
/**
|
|
209
209
|
* Look for at word
|
|
210
210
|
*/
|
|
211
|
-
|
|
211
|
+
;
|
|
212
212
|
|
|
213
213
|
_proto.isRadial = function isRadial(params) {
|
|
214
214
|
var state = 'before';
|
|
@@ -241,11 +241,11 @@ function (_Value) {
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
return false;
|
|
244
|
-
}
|
|
244
|
+
}
|
|
245
245
|
/**
|
|
246
246
|
* Change new direction to old
|
|
247
247
|
*/
|
|
248
|
-
|
|
248
|
+
;
|
|
249
249
|
|
|
250
250
|
_proto.convertDirection = function convertDirection(params) {
|
|
251
251
|
if (params.length > 0) {
|
|
@@ -259,11 +259,11 @@ function (_Value) {
|
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
return params;
|
|
262
|
-
}
|
|
262
|
+
}
|
|
263
263
|
/**
|
|
264
264
|
* Replace `to top left` to `bottom right`
|
|
265
265
|
*/
|
|
266
|
-
|
|
266
|
+
;
|
|
267
267
|
|
|
268
268
|
_proto.fixDirection = function fixDirection(params) {
|
|
269
269
|
params.splice(0, 2);
|
|
@@ -290,11 +290,11 @@ function (_Value) {
|
|
|
290
290
|
param.value = this.revertDirection(param.value);
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
}
|
|
293
|
+
}
|
|
294
294
|
/**
|
|
295
295
|
* Add 90 degrees
|
|
296
296
|
*/
|
|
297
|
-
|
|
297
|
+
;
|
|
298
298
|
|
|
299
299
|
_proto.fixAngle = function fixAngle(params) {
|
|
300
300
|
var first = params[0].value;
|
|
@@ -302,11 +302,11 @@ function (_Value) {
|
|
|
302
302
|
first = Math.abs(450 - first) % 360;
|
|
303
303
|
first = this.roundFloat(first, 3);
|
|
304
304
|
params[0].value = first + "deg";
|
|
305
|
-
}
|
|
305
|
+
}
|
|
306
306
|
/**
|
|
307
307
|
* Fix radial direction syntax
|
|
308
308
|
*/
|
|
309
|
-
|
|
309
|
+
;
|
|
310
310
|
|
|
311
311
|
_proto.fixRadial = function fixRadial(params) {
|
|
312
312
|
var first = [];
|
|
@@ -342,19 +342,19 @@ function (_Value) {
|
|
|
342
342
|
|
|
343
343
|
_proto.revertDirection = function revertDirection(word) {
|
|
344
344
|
return this.directions[word.toLowerCase()] || word;
|
|
345
|
-
}
|
|
345
|
+
}
|
|
346
346
|
/**
|
|
347
347
|
* Round float and save digits under dot
|
|
348
348
|
*/
|
|
349
|
-
|
|
349
|
+
;
|
|
350
350
|
|
|
351
351
|
_proto.roundFloat = function roundFloat(float, digits) {
|
|
352
352
|
return parseFloat(float.toFixed(digits));
|
|
353
|
-
}
|
|
353
|
+
}
|
|
354
354
|
/**
|
|
355
355
|
* Convert to old webkit syntax
|
|
356
356
|
*/
|
|
357
|
-
|
|
357
|
+
;
|
|
358
358
|
|
|
359
359
|
_proto.oldWebkit = function oldWebkit(node) {
|
|
360
360
|
var nodes = node.nodes;
|
|
@@ -409,11 +409,11 @@ function (_Value) {
|
|
|
409
409
|
}, this.cloneDiv(node.nodes));
|
|
410
410
|
node.value = '-webkit-gradient';
|
|
411
411
|
return true;
|
|
412
|
-
}
|
|
412
|
+
}
|
|
413
413
|
/**
|
|
414
414
|
* Change direction syntax to old webkit
|
|
415
415
|
*/
|
|
416
|
-
|
|
416
|
+
;
|
|
417
417
|
|
|
418
418
|
_proto.oldDirection = function oldDirection(params) {
|
|
419
419
|
var div = this.cloneDiv(params[0]);
|
|
@@ -453,11 +453,11 @@ function (_Value) {
|
|
|
453
453
|
}, div];
|
|
454
454
|
return params[0];
|
|
455
455
|
}
|
|
456
|
-
}
|
|
456
|
+
}
|
|
457
457
|
/**
|
|
458
458
|
* Get div token from exists parameters
|
|
459
459
|
*/
|
|
460
|
-
|
|
460
|
+
;
|
|
461
461
|
|
|
462
462
|
_proto.cloneDiv = function cloneDiv(params) {
|
|
463
463
|
for (var _iterator6 = params, _isArray6 = Array.isArray(_iterator6), _i7 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
|
|
@@ -484,11 +484,11 @@ function (_Value) {
|
|
|
484
484
|
value: ',',
|
|
485
485
|
after: ' '
|
|
486
486
|
};
|
|
487
|
-
}
|
|
487
|
+
}
|
|
488
488
|
/**
|
|
489
489
|
* Change colors syntax to old webkit
|
|
490
490
|
*/
|
|
491
|
-
|
|
491
|
+
;
|
|
492
492
|
|
|
493
493
|
_proto.colorStops = function colorStops(params) {
|
|
494
494
|
var result = [];
|
|
@@ -536,11 +536,11 @@ function (_Value) {
|
|
|
536
536
|
}
|
|
537
537
|
|
|
538
538
|
return result;
|
|
539
|
-
}
|
|
539
|
+
}
|
|
540
540
|
/**
|
|
541
541
|
* Remove old WebKit gradient too
|
|
542
542
|
*/
|
|
543
|
-
|
|
543
|
+
;
|
|
544
544
|
|
|
545
545
|
_proto.old = function old(prefix) {
|
|
546
546
|
if (prefix === '-webkit-') {
|
|
@@ -551,11 +551,11 @@ function (_Value) {
|
|
|
551
551
|
} else {
|
|
552
552
|
return _Value.prototype.old.call(this, prefix);
|
|
553
553
|
}
|
|
554
|
-
}
|
|
554
|
+
}
|
|
555
555
|
/**
|
|
556
556
|
* Do not add non-webkit prefixes for list-style and object
|
|
557
557
|
*/
|
|
558
|
-
|
|
558
|
+
;
|
|
559
559
|
|
|
560
560
|
_proto.add = function add(decl, prefix) {
|
|
561
561
|
var p = decl.prop;
|
|
@@ -24,19 +24,19 @@ function (_Declaration) {
|
|
|
24
24
|
*/
|
|
25
25
|
_proto.check = function check(decl) {
|
|
26
26
|
return decl.value.indexOf('flex-') === -1 && decl.value !== 'baseline';
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
/**
|
|
29
29
|
* Change property name for IE
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
;
|
|
32
32
|
|
|
33
33
|
_proto.prefixed = function prefixed(prop, prefix) {
|
|
34
34
|
return prefix + 'grid-column-align';
|
|
35
|
-
}
|
|
35
|
+
}
|
|
36
36
|
/**
|
|
37
37
|
* Change IE property back
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
;
|
|
40
40
|
|
|
41
41
|
_proto.normalize = function normalize() {
|
|
42
42
|
return 'justify-self';
|
|
@@ -24,19 +24,19 @@ function (_Declaration) {
|
|
|
24
24
|
*/
|
|
25
25
|
_proto.check = function check(decl) {
|
|
26
26
|
return decl.value.indexOf('flex-') === -1 && decl.value !== 'baseline';
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
/**
|
|
29
29
|
* Change property name for IE
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
;
|
|
32
32
|
|
|
33
33
|
_proto.prefixed = function prefixed(prop, prefix) {
|
|
34
34
|
return prefix + 'grid-row-align';
|
|
35
|
-
}
|
|
35
|
+
}
|
|
36
36
|
/**
|
|
37
37
|
* Change IE property back
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
;
|
|
40
40
|
|
|
41
41
|
_proto.normalize = function normalize() {
|
|
42
42
|
return 'align-self';
|
|
@@ -40,11 +40,11 @@ function (_Declaration) {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
|
43
|
-
}
|
|
43
|
+
}
|
|
44
44
|
/**
|
|
45
45
|
* Change IE property back
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
;
|
|
48
48
|
|
|
49
49
|
_proto.normalize = function normalize(prop) {
|
|
50
50
|
return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1');
|
package/lib/hacks/grid-start.js
CHANGED
|
@@ -25,19 +25,19 @@ function (_Declaration) {
|
|
|
25
25
|
_proto.check = function check(decl) {
|
|
26
26
|
var value = decl.value;
|
|
27
27
|
return value.indexOf('/') === -1 || value.indexOf('span') !== -1;
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
29
|
/**
|
|
30
30
|
* Return a final spec property
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
;
|
|
33
33
|
|
|
34
34
|
_proto.normalize = function normalize(prop) {
|
|
35
35
|
return prop.replace('-start', '');
|
|
36
|
-
}
|
|
36
|
+
}
|
|
37
37
|
/**
|
|
38
38
|
* Change property name for IE
|
|
39
39
|
*/
|
|
40
|
-
|
|
40
|
+
;
|
|
41
41
|
|
|
42
42
|
_proto.prefixed = function prefixed(prop, prefix) {
|
|
43
43
|
var result = _Declaration.prototype.prefixed.call(this, prop, prefix);
|
package/lib/hacks/grid-utils.js
CHANGED
|
@@ -460,7 +460,7 @@ function parseGridTemplatesData(css) {
|
|
|
460
460
|
}
|
|
461
461
|
});
|
|
462
462
|
});
|
|
463
|
-
parsed[index].allAreas = uniq(
|
|
463
|
+
parsed[index].allAreas = uniq([].concat(allAreas, areaNames));
|
|
464
464
|
parsed[index].rules.push({
|
|
465
465
|
hasDuplicates: !hasNoDuplicates,
|
|
466
466
|
params: media.params,
|
|
@@ -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
|
/**
|
|
@@ -24,11 +24,11 @@ function (_Declaration) {
|
|
|
24
24
|
*/
|
|
25
25
|
_proto.check = function check(decl) {
|
|
26
26
|
return decl.value === 'pixelated';
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
/**
|
|
29
29
|
* Change property name for IE
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
;
|
|
32
32
|
|
|
33
33
|
_proto.prefixed = function prefixed(prop, prefix) {
|
|
34
34
|
if (prefix === '-ms-') {
|
|
@@ -36,30 +36,30 @@ function (_Declaration) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
|
39
|
-
}
|
|
39
|
+
}
|
|
40
40
|
/**
|
|
41
41
|
* Change property and value for IE
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
;
|
|
44
44
|
|
|
45
45
|
_proto.set = function set(decl, prefix) {
|
|
46
46
|
if (prefix !== '-ms-') return _Declaration.prototype.set.call(this, decl, prefix);
|
|
47
47
|
decl.prop = '-ms-interpolation-mode';
|
|
48
48
|
decl.value = 'nearest-neighbor';
|
|
49
49
|
return decl;
|
|
50
|
-
}
|
|
50
|
+
}
|
|
51
51
|
/**
|
|
52
52
|
* Return property name by spec
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
;
|
|
55
55
|
|
|
56
56
|
_proto.normalize = function normalize() {
|
|
57
57
|
return 'image-rendering';
|
|
58
|
-
}
|
|
58
|
+
}
|
|
59
59
|
/**
|
|
60
60
|
* Warn on old value
|
|
61
61
|
*/
|
|
62
|
-
|
|
62
|
+
;
|
|
63
63
|
|
|
64
64
|
_proto.process = function process(node, result) {
|
|
65
65
|
return _Declaration.prototype.process.call(this, node, result);
|
|
@@ -24,11 +24,11 @@ function (_Declaration) {
|
|
|
24
24
|
*/
|
|
25
25
|
_proto.prefixed = function prefixed(prop, prefix) {
|
|
26
26
|
return prefix + prop.replace('-inline', '');
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
/**
|
|
29
29
|
* Return property name by spec
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
;
|
|
32
32
|
|
|
33
33
|
_proto.normalize = function normalize(prop) {
|
|
34
34
|
return prop.replace(/(margin|padding|border)-(start|end)/, '$1-inline-$2');
|
|
@@ -38,19 +38,19 @@ function (_Declaration) {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
|
41
|
-
}
|
|
41
|
+
}
|
|
42
42
|
/**
|
|
43
43
|
* Return property name by final spec
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
;
|
|
46
46
|
|
|
47
47
|
_proto.normalize = function normalize() {
|
|
48
48
|
return 'justify-content';
|
|
49
|
-
}
|
|
49
|
+
}
|
|
50
50
|
/**
|
|
51
51
|
* Change value for 2009 and 2012 specs
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
;
|
|
54
54
|
|
|
55
55
|
_proto.set = function set(decl, prefix) {
|
|
56
56
|
var spec = flexSpec(prefix)[0];
|
package/lib/hacks/mask-border.js
CHANGED
|
@@ -24,11 +24,11 @@ function (_Declaration) {
|
|
|
24
24
|
*/
|
|
25
25
|
_proto.normalize = function normalize() {
|
|
26
26
|
return this.name.replace('box-image', 'border');
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
/**
|
|
29
29
|
* Return flex property for 2012 spec
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
;
|
|
32
32
|
|
|
33
33
|
_proto.prefixed = function prefixed(prop, prefix) {
|
|
34
34
|
var result = _Declaration.prototype.prefixed.call(this, prop, prefix);
|
package/lib/hacks/order.js
CHANGED
|
@@ -41,19 +41,19 @@ function (_Declaration) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
return _Declaration.prototype.prefixed.call(this, prop, prefix);
|
|
44
|
-
}
|
|
44
|
+
}
|
|
45
45
|
/**
|
|
46
46
|
* Return property name by final spec
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
;
|
|
49
49
|
|
|
50
50
|
_proto.normalize = function normalize() {
|
|
51
51
|
return 'order';
|
|
52
|
-
}
|
|
52
|
+
}
|
|
53
53
|
/**
|
|
54
54
|
* Fix value for 2009 spec
|
|
55
55
|
*/
|
|
56
|
-
|
|
56
|
+
;
|
|
57
57
|
|
|
58
58
|
_proto.set = function set(decl, prefix) {
|
|
59
59
|
var spec = flexSpec(prefix)[0];
|
|
@@ -24,19 +24,19 @@ function (_Declaration) {
|
|
|
24
24
|
*/
|
|
25
25
|
_proto.prefixed = function prefixed(prop, prefix) {
|
|
26
26
|
return prefix + 'scroll-chaining';
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
/**
|
|
29
29
|
* Return property name by spec
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
;
|
|
32
32
|
|
|
33
33
|
_proto.normalize = function normalize() {
|
|
34
34
|
return 'overscroll-behavior';
|
|
35
|
-
}
|
|
35
|
+
}
|
|
36
36
|
/**
|
|
37
37
|
* Change value for IE
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
;
|
|
40
40
|
|
|
41
41
|
_proto.set = function set(decl, prefix) {
|
|
42
42
|
if (decl.value === 'auto') {
|
package/lib/hacks/pixelated.js
CHANGED
package/lib/hacks/placeholder.js
CHANGED
|
@@ -24,11 +24,11 @@ function (_Selector) {
|
|
|
24
24
|
*/
|
|
25
25
|
_proto.possible = function possible() {
|
|
26
26
|
return _Selector.prototype.possible.call(this).concat(['-moz- old', '-ms- old']);
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
28
|
/**
|
|
29
29
|
* Return different selectors depend on prefix
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
;
|
|
32
32
|
|
|
33
33
|
_proto.prefixed = function prefixed(prefix) {
|
|
34
34
|
if (prefix === '-webkit-') {
|
|
@@ -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;
|
|
@@ -35,11 +35,11 @@ function (_Declaration) {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
return false;
|
|
38
|
-
}
|
|
38
|
+
}
|
|
39
39
|
/**
|
|
40
40
|
* Is transform contain 3D commands
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
;
|
|
43
43
|
|
|
44
44
|
_proto.contain3d = function contain3d(decl) {
|
|
45
45
|
if (decl.prop === 'transform-origin') {
|
|
@@ -66,11 +66,11 @@ function (_Declaration) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
return false;
|
|
69
|
-
}
|
|
69
|
+
}
|
|
70
70
|
/**
|
|
71
71
|
* Replace rotateZ to rotate for IE 9
|
|
72
72
|
*/
|
|
73
|
-
|
|
73
|
+
;
|
|
74
74
|
|
|
75
75
|
_proto.set = function set(decl, prefix) {
|
|
76
76
|
decl = _Declaration.prototype.set.call(this, decl, prefix);
|
|
@@ -80,11 +80,11 @@ function (_Declaration) {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
return decl;
|
|
83
|
-
}
|
|
83
|
+
}
|
|
84
84
|
/**
|
|
85
85
|
* Don't add prefix for IE in keyframes
|
|
86
86
|
*/
|
|
87
|
-
|
|
87
|
+
;
|
|
88
88
|
|
|
89
89
|
_proto.insert = function insert(decl, prefix, prefixes) {
|
|
90
90
|
if (prefix === '-ms-') {
|
|
@@ -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/old-selector.js
CHANGED