autoprefixer 9.8.7 → 10.0.2

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 (80) hide show
  1. package/CHANGELOG.md +999 -0
  2. package/README.md +0 -3
  3. package/bin/autoprefixer +11 -11
  4. package/data/prefixes.js +799 -545
  5. package/lib/at-rule.js +23 -50
  6. package/lib/autoprefixer.js +108 -97
  7. package/lib/brackets.js +31 -44
  8. package/lib/browsers.js +54 -71
  9. package/lib/declaration.js +122 -178
  10. package/lib/hacks/align-content.js +24 -54
  11. package/lib/hacks/align-items.js +23 -53
  12. package/lib/hacks/align-self.js +32 -60
  13. package/lib/hacks/animation.js +11 -29
  14. package/lib/hacks/appearance.js +19 -35
  15. package/lib/hacks/backdrop-filter.js +16 -31
  16. package/lib/hacks/background-clip.js +19 -36
  17. package/lib/hacks/background-size.js +16 -31
  18. package/lib/hacks/block-logical.js +28 -36
  19. package/lib/hacks/border-image.js +9 -27
  20. package/lib/hacks/border-radius.js +22 -44
  21. package/lib/hacks/break-props.js +38 -51
  22. package/lib/hacks/color-adjust.js +11 -30
  23. package/lib/hacks/cross-fade.js +29 -48
  24. package/lib/hacks/display-flex.js +32 -61
  25. package/lib/hacks/display-grid.js +12 -32
  26. package/lib/hacks/filter-value.js +8 -25
  27. package/lib/hacks/filter.js +13 -27
  28. package/lib/hacks/flex-basis.js +21 -54
  29. package/lib/hacks/flex-direction.js +41 -77
  30. package/lib/hacks/flex-flow.js +33 -61
  31. package/lib/hacks/flex-grow.js +16 -43
  32. package/lib/hacks/flex-shrink.js +21 -54
  33. package/lib/hacks/flex-spec.js +7 -10
  34. package/lib/hacks/flex-wrap.js +11 -32
  35. package/lib/hacks/flex.js +27 -58
  36. package/lib/hacks/fullscreen.js +10 -30
  37. package/lib/hacks/gradient.js +240 -330
  38. package/lib/hacks/grid-area.js +25 -43
  39. package/lib/hacks/grid-column-align.js +14 -34
  40. package/lib/hacks/grid-end.js +30 -45
  41. package/lib/hacks/grid-row-align.js +14 -34
  42. package/lib/hacks/grid-row-column.js +20 -39
  43. package/lib/hacks/grid-rows-columns.js +75 -99
  44. package/lib/hacks/grid-start.js +17 -39
  45. package/lib/hacks/grid-template-areas.js +59 -76
  46. package/lib/hacks/grid-template.js +40 -61
  47. package/lib/hacks/grid-utils.js +686 -716
  48. package/lib/hacks/image-rendering.js +24 -47
  49. package/lib/hacks/image-set.js +10 -30
  50. package/lib/hacks/inline-logical.js +26 -32
  51. package/lib/hacks/intrinsic.js +40 -53
  52. package/lib/hacks/justify-content.js +26 -57
  53. package/lib/hacks/mask-border.js +28 -36
  54. package/lib/hacks/mask-composite.js +41 -57
  55. package/lib/hacks/order.js +22 -52
  56. package/lib/hacks/overscroll-behavior.js +16 -37
  57. package/lib/hacks/pixelated.js +16 -40
  58. package/lib/hacks/place-self.js +18 -41
  59. package/lib/hacks/placeholder-shown.js +9 -28
  60. package/lib/hacks/placeholder.js +15 -38
  61. package/lib/hacks/text-decoration-skip-ink.js +14 -29
  62. package/lib/hacks/text-decoration.js +20 -31
  63. package/lib/hacks/text-emphasis-position.js +9 -28
  64. package/lib/hacks/transform-decl.js +43 -69
  65. package/lib/hacks/user-select.js +19 -27
  66. package/lib/hacks/writing-mode.js +19 -36
  67. package/lib/info.js +63 -93
  68. package/lib/old-selector.js +39 -60
  69. package/lib/old-value.js +17 -25
  70. package/lib/prefixer.js +83 -110
  71. package/lib/prefixes.js +233 -336
  72. package/lib/processor.js +420 -416
  73. package/lib/resolution.js +62 -98
  74. package/lib/selector.js +91 -139
  75. package/lib/supports.js +194 -246
  76. package/lib/transition.js +170 -265
  77. package/lib/utils.js +49 -72
  78. package/lib/value.js +77 -116
  79. package/lib/vendor.js +14 -0
  80. package/package.json +23 -12
@@ -1,35 +1,17 @@
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 Animation = /*#__PURE__*/function (_Declaration) {
12
- _inheritsLoose(Animation, _Declaration);
13
-
14
- function Animation() {
15
- return _Declaration.apply(this, arguments) || this;
16
- }
17
-
18
- var _proto = Animation.prototype;
1
+ let Declaration = require('../declaration')
19
2
 
3
+ class Animation extends Declaration {
20
4
  /**
21
5
  * Don’t add prefixes for modern values.
22
6
  */
23
- _proto.check = function check(decl) {
24
- return !decl.value.split(/\s+/).some(function (i) {
25
- var lower = i.toLowerCase();
26
- return lower === 'reverse' || lower === 'alternate-reverse';
27
- });
28
- };
29
-
30
- return Animation;
31
- }(Declaration);
7
+ check (decl) {
8
+ return !decl.value.split(/\s+/).some(i => {
9
+ let lower = i.toLowerCase()
10
+ return lower === 'reverse' || lower === 'alternate-reverse'
11
+ })
12
+ }
13
+ }
32
14
 
33
- _defineProperty(Animation, "names", ['animation', 'animation-direction']);
15
+ Animation.names = ['animation', 'animation-direction']
34
16
 
35
- module.exports = Animation;
17
+ module.exports = Animation
@@ -1,39 +1,23 @@
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 utils = require('../utils');
12
-
13
- var Appearance = /*#__PURE__*/function (_Declaration) {
14
- _inheritsLoose(Appearance, _Declaration);
15
-
16
- function Appearance(name, prefixes, all) {
17
- var _this;
18
-
19
- _this = _Declaration.call(this, name, prefixes, all) || this;
20
-
21
- if (_this.prefixes) {
22
- _this.prefixes = utils.uniq(_this.prefixes.map(function (i) {
23
- if (i === '-ms-') {
24
- return '-webkit-';
25
- }
26
-
27
- return i;
28
- }));
1
+ let Declaration = require('../declaration')
2
+ let utils = require('../utils')
3
+
4
+ class Appearance extends Declaration {
5
+ constructor (name, prefixes, all) {
6
+ super(name, prefixes, all)
7
+
8
+ if (this.prefixes) {
9
+ this.prefixes = utils.uniq(
10
+ this.prefixes.map(i => {
11
+ if (i === '-ms-') {
12
+ return '-webkit-'
13
+ }
14
+ return i
15
+ })
16
+ )
29
17
  }
30
-
31
- return _this;
32
18
  }
19
+ }
33
20
 
34
- return Appearance;
35
- }(Declaration);
36
-
37
- _defineProperty(Appearance, "names", ['appearance']);
21
+ Appearance.names = ['appearance']
38
22
 
39
- module.exports = Appearance;
23
+ module.exports = Appearance
@@ -1,35 +1,20 @@
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 utils = require('../utils');
12
-
13
- var BackdropFilter = /*#__PURE__*/function (_Declaration) {
14
- _inheritsLoose(BackdropFilter, _Declaration);
15
-
16
- function BackdropFilter(name, prefixes, all) {
17
- var _this;
18
-
19
- _this = _Declaration.call(this, name, prefixes, all) || this;
20
-
21
- if (_this.prefixes) {
22
- _this.prefixes = utils.uniq(_this.prefixes.map(function (i) {
23
- return i === '-ms-' ? '-webkit-' : i;
24
- }));
1
+ let Declaration = require('../declaration')
2
+ let utils = require('../utils')
3
+
4
+ class BackdropFilter extends Declaration {
5
+ constructor (name, prefixes, all) {
6
+ super(name, prefixes, all)
7
+
8
+ if (this.prefixes) {
9
+ this.prefixes = utils.uniq(
10
+ this.prefixes.map(i => {
11
+ return i === '-ms-' ? '-webkit-' : i
12
+ })
13
+ )
25
14
  }
26
-
27
- return _this;
28
15
  }
16
+ }
29
17
 
30
- return BackdropFilter;
31
- }(Declaration);
32
-
33
- _defineProperty(BackdropFilter, "names", ['backdrop-filter']);
18
+ BackdropFilter.names = ['backdrop-filter']
34
19
 
35
- module.exports = BackdropFilter;
20
+ module.exports = BackdropFilter
@@ -1,41 +1,24 @@
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 utils = require('../utils');
12
-
13
- var BackgroundClip = /*#__PURE__*/function (_Declaration) {
14
- _inheritsLoose(BackgroundClip, _Declaration);
15
-
16
- function BackgroundClip(name, prefixes, all) {
17
- var _this;
18
-
19
- _this = _Declaration.call(this, name, prefixes, all) || this;
20
-
21
- if (_this.prefixes) {
22
- _this.prefixes = utils.uniq(_this.prefixes.map(function (i) {
23
- return i === '-ms-' ? '-webkit-' : i;
24
- }));
1
+ let Declaration = require('../declaration')
2
+ let utils = require('../utils')
3
+
4
+ class BackgroundClip extends Declaration {
5
+ constructor (name, prefixes, all) {
6
+ super(name, prefixes, all)
7
+
8
+ if (this.prefixes) {
9
+ this.prefixes = utils.uniq(
10
+ this.prefixes.map(i => {
11
+ return i === '-ms-' ? '-webkit-' : i
12
+ })
13
+ )
25
14
  }
26
-
27
- return _this;
28
15
  }
29
16
 
30
- var _proto = BackgroundClip.prototype;
31
-
32
- _proto.check = function check(decl) {
33
- return decl.value.toLowerCase() === 'text';
34
- };
35
-
36
- return BackgroundClip;
37
- }(Declaration);
17
+ check (decl) {
18
+ return decl.value.toLowerCase() === 'text'
19
+ }
20
+ }
38
21
 
39
- _defineProperty(BackgroundClip, "names", ['background-clip']);
22
+ BackgroundClip.names = ['background-clip']
40
23
 
41
- module.exports = BackgroundClip;
24
+ module.exports = BackgroundClip
@@ -1,38 +1,23 @@
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 BackgroundSize = /*#__PURE__*/function (_Declaration) {
12
- _inheritsLoose(BackgroundSize, _Declaration);
13
-
14
- function BackgroundSize() {
15
- return _Declaration.apply(this, arguments) || this;
16
- }
17
-
18
- var _proto = BackgroundSize.prototype;
1
+ let Declaration = require('../declaration')
19
2
 
3
+ class BackgroundSize extends Declaration {
20
4
  /**
21
5
  * Duplication parameter for -webkit- browsers
22
6
  */
23
- _proto.set = function set(decl, prefix) {
24
- var value = decl.value.toLowerCase();
25
-
26
- if (prefix === '-webkit-' && !value.includes(' ') && value !== 'contain' && value !== 'cover') {
27
- decl.value = decl.value + ' ' + decl.value;
7
+ set (decl, prefix) {
8
+ let value = decl.value.toLowerCase()
9
+ if (
10
+ prefix === '-webkit-' &&
11
+ !value.includes(' ') &&
12
+ value !== 'contain' &&
13
+ value !== 'cover'
14
+ ) {
15
+ decl.value = decl.value + ' ' + decl.value
28
16
  }
17
+ return super.set(decl, prefix)
18
+ }
19
+ }
29
20
 
30
- return _Declaration.prototype.set.call(this, decl, prefix);
31
- };
32
-
33
- return BackgroundSize;
34
- }(Declaration);
35
-
36
- _defineProperty(BackgroundSize, "names", ['background-size']);
21
+ BackgroundSize.names = ['background-size']
37
22
 
38
- module.exports = BackgroundSize;
23
+ module.exports = BackgroundSize
@@ -1,48 +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 BlockLogical = /*#__PURE__*/function (_Declaration) {
12
- _inheritsLoose(BlockLogical, _Declaration);
13
-
14
- function BlockLogical() {
15
- return _Declaration.apply(this, arguments) || this;
16
- }
17
-
18
- var _proto = BlockLogical.prototype;
1
+ let Declaration = require('../declaration')
19
2
 
3
+ class BlockLogical extends Declaration {
20
4
  /**
21
5
  * Use old syntax for -moz- and -webkit-
22
6
  */
23
- _proto.prefixed = function prefixed(prop, prefix) {
7
+ prefixed (prop, prefix) {
24
8
  if (prop.includes('-start')) {
25
- return prefix + prop.replace('-block-start', '-before');
9
+ return prefix + prop.replace('-block-start', '-before')
26
10
  }
27
-
28
- return prefix + prop.replace('-block-end', '-after');
11
+ return prefix + prop.replace('-block-end', '-after')
29
12
  }
13
+
30
14
  /**
31
15
  * Return property name by spec
32
16
  */
33
- ;
34
-
35
- _proto.normalize = function normalize(prop) {
17
+ normalize (prop) {
36
18
  if (prop.includes('-before')) {
37
- return prop.replace('-before', '-block-start');
19
+ return prop.replace('-before', '-block-start')
38
20
  }
39
-
40
- return prop.replace('-after', '-block-end');
41
- };
42
-
43
- return BlockLogical;
44
- }(Declaration);
45
-
46
- _defineProperty(BlockLogical, "names", ['border-block-start', 'border-block-end', 'margin-block-start', 'margin-block-end', 'padding-block-start', 'padding-block-end', 'border-before', 'border-after', 'margin-before', 'margin-after', 'padding-before', 'padding-after']);
47
-
48
- module.exports = BlockLogical;
21
+ return prop.replace('-after', '-block-end')
22
+ }
23
+ }
24
+
25
+ BlockLogical.names = [
26
+ 'border-block-start',
27
+ 'border-block-end',
28
+ 'margin-block-start',
29
+ 'margin-block-end',
30
+ 'padding-block-start',
31
+ 'padding-block-end',
32
+ 'border-before',
33
+ 'border-after',
34
+ 'margin-before',
35
+ 'margin-after',
36
+ 'padding-before',
37
+ 'padding-after'
38
+ ]
39
+
40
+ module.exports = BlockLogical
@@ -1,33 +1,15 @@
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 BorderImage = /*#__PURE__*/function (_Declaration) {
12
- _inheritsLoose(BorderImage, _Declaration);
13
-
14
- function BorderImage() {
15
- return _Declaration.apply(this, arguments) || this;
16
- }
17
-
18
- var _proto = BorderImage.prototype;
1
+ let Declaration = require('../declaration')
19
2
 
3
+ class BorderImage extends Declaration {
20
4
  /**
21
5
  * Remove fill parameter for prefixed declarations
22
6
  */
23
- _proto.set = function set(decl, prefix) {
24
- decl.value = decl.value.replace(/\s+fill(\s)/, '$1');
25
- return _Declaration.prototype.set.call(this, decl, prefix);
26
- };
27
-
28
- return BorderImage;
29
- }(Declaration);
7
+ set (decl, prefix) {
8
+ decl.value = decl.value.replace(/\s+fill(\s)/, '$1')
9
+ return super.set(decl, prefix)
10
+ }
11
+ }
30
12
 
31
- _defineProperty(BorderImage, "names", ['border-image']);
13
+ BorderImage.names = ['border-image']
32
14
 
33
- module.exports = BorderImage;
15
+ module.exports = BorderImage
@@ -1,62 +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 BorderRadius = /*#__PURE__*/function (_Declaration) {
12
- _inheritsLoose(BorderRadius, _Declaration);
13
-
14
- function BorderRadius() {
15
- return _Declaration.apply(this, arguments) || this;
16
- }
17
-
18
- var _proto = BorderRadius.prototype;
1
+ let Declaration = require('../declaration')
19
2
 
3
+ class BorderRadius extends Declaration {
20
4
  /**
21
5
  * Change syntax, when add Mozilla prefix
22
6
  */
23
- _proto.prefixed = function prefixed(prop, prefix) {
7
+ prefixed (prop, prefix) {
24
8
  if (prefix === '-moz-') {
25
- return prefix + (BorderRadius.toMozilla[prop] || prop);
9
+ return prefix + (BorderRadius.toMozilla[prop] || prop)
26
10
  }
27
-
28
- return _Declaration.prototype.prefixed.call(this, prop, prefix);
11
+ return super.prefixed(prop, prefix)
29
12
  }
13
+
30
14
  /**
31
15
  * Return unprefixed version of property
32
16
  */
33
- ;
34
-
35
- _proto.normalize = function normalize(prop) {
36
- return BorderRadius.toNormal[prop] || prop;
37
- };
38
-
39
- return BorderRadius;
40
- }(Declaration);
17
+ normalize (prop) {
18
+ return BorderRadius.toNormal[prop] || prop
19
+ }
20
+ }
41
21
 
42
- _defineProperty(BorderRadius, "names", ['border-radius']);
22
+ BorderRadius.names = ['border-radius']
43
23
 
44
- _defineProperty(BorderRadius, "toMozilla", {});
24
+ BorderRadius.toMozilla = {}
25
+ BorderRadius.toNormal = {}
45
26
 
46
- _defineProperty(BorderRadius, "toNormal", {});
27
+ for (let ver of ['top', 'bottom']) {
28
+ for (let hor of ['left', 'right']) {
29
+ let normal = `border-${ver}-${hor}-radius`
30
+ let mozilla = `border-radius-${ver}${hor}`
47
31
 
48
- for (var _i = 0, _arr = ['top', 'bottom']; _i < _arr.length; _i++) {
49
- var ver = _arr[_i];
32
+ BorderRadius.names.push(normal)
33
+ BorderRadius.names.push(mozilla)
50
34
 
51
- for (var _i2 = 0, _arr2 = ['left', 'right']; _i2 < _arr2.length; _i2++) {
52
- var hor = _arr2[_i2];
53
- var normal = "border-" + ver + "-" + hor + "-radius";
54
- var mozilla = "border-radius-" + ver + hor;
55
- BorderRadius.names.push(normal);
56
- BorderRadius.names.push(mozilla);
57
- BorderRadius.toMozilla[normal] = mozilla;
58
- BorderRadius.toNormal[mozilla] = normal;
35
+ BorderRadius.toMozilla[normal] = mozilla
36
+ BorderRadius.toNormal[mozilla] = normal
59
37
  }
60
38
  }
61
39
 
62
- module.exports = BorderRadius;
40
+ module.exports = BorderRadius
@@ -1,76 +1,63 @@
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 BreakProps = /*#__PURE__*/function (_Declaration) {
12
- _inheritsLoose(BreakProps, _Declaration);
13
-
14
- function BreakProps() {
15
- return _Declaration.apply(this, arguments) || this;
16
- }
17
-
18
- var _proto = BreakProps.prototype;
1
+ let Declaration = require('../declaration')
19
2
 
3
+ class BreakProps extends Declaration {
20
4
  /**
21
5
  * Change name for -webkit- and -moz- prefix
22
6
  */
23
- _proto.prefixed = function prefixed(prop, prefix) {
24
- return prefix + "column-" + prop;
7
+ prefixed (prop, prefix) {
8
+ return `${prefix}column-${prop}`
25
9
  }
10
+
26
11
  /**
27
12
  * Return property name by final spec
28
13
  */
29
- ;
30
-
31
- _proto.normalize = function normalize(prop) {
14
+ normalize (prop) {
32
15
  if (prop.includes('inside')) {
33
- return 'break-inside';
16
+ return 'break-inside'
34
17
  }
35
-
36
18
  if (prop.includes('before')) {
37
- return 'break-before';
19
+ return 'break-before'
38
20
  }
39
-
40
- return 'break-after';
21
+ return 'break-after'
41
22
  }
23
+
42
24
  /**
43
25
  * Change prefixed value for avoid-column and avoid-page
44
26
  */
45
- ;
46
-
47
- _proto.set = function set(decl, prefix) {
48
- if (decl.prop === 'break-inside' && decl.value === 'avoid-column' || decl.value === 'avoid-page') {
49
- decl.value = 'avoid';
27
+ set (decl, prefix) {
28
+ if (
29
+ (decl.prop === 'break-inside' && decl.value === 'avoid-column') ||
30
+ decl.value === 'avoid-page'
31
+ ) {
32
+ decl.value = 'avoid'
50
33
  }
51
-
52
- return _Declaration.prototype.set.call(this, decl, prefix);
34
+ return super.set(decl, prefix)
53
35
  }
36
+
54
37
  /**
55
38
  * Don’t prefix some values
56
39
  */
57
- ;
58
-
59
- _proto.insert = function insert(decl, prefix, prefixes) {
40
+ insert (decl, prefix, prefixes) {
60
41
  if (decl.prop !== 'break-inside') {
61
- return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
42
+ return super.insert(decl, prefix, prefixes)
62
43
  }
63
-
64
44
  if (/region/i.test(decl.value) || /page/i.test(decl.value)) {
65
- return undefined;
45
+ return undefined
66
46
  }
67
-
68
- return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
69
- };
70
-
71
- return BreakProps;
72
- }(Declaration);
73
-
74
- _defineProperty(BreakProps, "names", ['break-inside', 'page-break-inside', 'column-break-inside', 'break-before', 'page-break-before', 'column-break-before', 'break-after', 'page-break-after', 'column-break-after']);
75
-
76
- module.exports = BreakProps;
47
+ return super.insert(decl, prefix, prefixes)
48
+ }
49
+ }
50
+
51
+ BreakProps.names = [
52
+ 'break-inside',
53
+ 'page-break-inside',
54
+ 'column-break-inside',
55
+ 'break-before',
56
+ 'page-break-before',
57
+ 'column-break-before',
58
+ 'break-after',
59
+ 'page-break-after',
60
+ 'column-break-after'
61
+ ]
62
+
63
+ module.exports = BreakProps
@@ -1,40 +1,21 @@
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 ColorAdjust = /*#__PURE__*/function (_Declaration) {
12
- _inheritsLoose(ColorAdjust, _Declaration);
13
-
14
- function ColorAdjust() {
15
- return _Declaration.apply(this, arguments) || this;
16
- }
17
-
18
- var _proto = ColorAdjust.prototype;
1
+ let Declaration = require('../declaration')
19
2
 
3
+ class ColorAdjust extends Declaration {
20
4
  /**
21
5
  * Change property name for WebKit-based browsers
22
6
  */
23
- _proto.prefixed = function prefixed(prop, prefix) {
24
- return prefix + 'print-color-adjust';
7
+ prefixed (prop, prefix) {
8
+ return prefix + 'print-color-adjust'
25
9
  }
10
+
26
11
  /**
27
12
  * Return property name by spec
28
13
  */
29
- ;
30
-
31
- _proto.normalize = function normalize() {
32
- return 'color-adjust';
33
- };
34
-
35
- return ColorAdjust;
36
- }(Declaration);
14
+ normalize () {
15
+ return 'color-adjust'
16
+ }
17
+ }
37
18
 
38
- _defineProperty(ColorAdjust, "names", ['color-adjust', 'print-color-adjust']);
19
+ ColorAdjust.names = ['color-adjust', 'print-color-adjust']
39
20
 
40
- module.exports = ColorAdjust;
21
+ module.exports = ColorAdjust