autoprefixer 6.7.7 → 7.1.1

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 (66) hide show
  1. package/AUTHORS +1 -0
  2. package/CHANGELOG.md +23 -0
  3. package/README.md +9 -15
  4. package/data/prefixes.js +551 -517
  5. package/lib/at-rule.js +55 -38
  6. package/lib/autoprefixer.js +89 -63
  7. package/lib/brackets.js +59 -39
  8. package/lib/browsers.js +102 -65
  9. package/lib/declaration.js +212 -121
  10. package/lib/hacks/align-content.js +65 -38
  11. package/lib/hacks/align-items.js +62 -38
  12. package/lib/hacks/align-self.js +63 -36
  13. package/lib/hacks/appearance.js +42 -0
  14. package/lib/hacks/background-size.js +29 -20
  15. package/lib/hacks/block-logical.js +36 -21
  16. package/lib/hacks/border-image.js +26 -16
  17. package/lib/hacks/border-radius.js +60 -39
  18. package/lib/hacks/break-props.js +69 -44
  19. package/lib/hacks/cross-fade.js +40 -37
  20. package/lib/hacks/display-flex.js +81 -31
  21. package/lib/hacks/display-grid.js +29 -19
  22. package/lib/hacks/filter-value.js +66 -45
  23. package/lib/hacks/filter.js +26 -17
  24. package/lib/hacks/flex-basis.js +60 -30
  25. package/lib/hacks/flex-direction.js +85 -53
  26. package/lib/hacks/flex-flow.js +67 -49
  27. package/lib/hacks/flex-grow.js +45 -26
  28. package/lib/hacks/flex-shrink.js +60 -30
  29. package/lib/hacks/flex-spec.js +18 -8
  30. package/lib/hacks/flex-values.js +39 -20
  31. package/lib/hacks/flex-wrap.js +29 -20
  32. package/lib/hacks/flex.js +68 -43
  33. package/lib/hacks/fullscreen.js +31 -21
  34. package/lib/hacks/gradient.js +462 -302
  35. package/lib/hacks/grid-column-align.js +55 -0
  36. package/lib/hacks/grid-end.js +53 -28
  37. package/lib/hacks/grid-row-align.js +39 -19
  38. package/lib/hacks/grid-start.js +80 -48
  39. package/lib/hacks/grid-template.js +91 -55
  40. package/lib/hacks/image-rendering.js +63 -33
  41. package/lib/hacks/image-set.js +28 -20
  42. package/lib/hacks/inline-logical.js +32 -17
  43. package/lib/hacks/intrinsic.js +73 -0
  44. package/lib/hacks/justify-content.js +69 -42
  45. package/lib/hacks/mask-border.js +36 -21
  46. package/lib/hacks/order.js +58 -35
  47. package/lib/hacks/pixelated.js +44 -30
  48. package/lib/hacks/placeholder.js +40 -25
  49. package/lib/hacks/text-emphasis-position.js +27 -20
  50. package/lib/hacks/transform-decl.js +94 -52
  51. package/lib/hacks/writing-mode.js +37 -27
  52. package/lib/info.js +117 -78
  53. package/lib/old-selector.js +84 -58
  54. package/lib/old-value.js +22 -20
  55. package/lib/prefixer.js +164 -95
  56. package/lib/prefixes.js +446 -351
  57. package/lib/processor.js +394 -278
  58. package/lib/resolution.js +135 -75
  59. package/lib/selector.js +145 -84
  60. package/lib/supports.js +330 -210
  61. package/lib/transition.js +396 -243
  62. package/lib/utils.js +84 -48
  63. package/lib/value.js +118 -80
  64. package/package.json +53 -13
  65. package/lib/hacks/justify-items.js +0 -31
  66. package/lib/hacks/stretch.js +0 -45
@@ -1,53 +1,56 @@
1
- (function() {
2
- var CrossFade, OldValue, Value, list, utils,
3
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
4
- hasProp = {}.hasOwnProperty;
1
+ 'use strict';
5
2
 
6
- OldValue = require('../old-value');
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7
4
 
8
- Value = require('../value');
5
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
9
6
 
10
- utils = require('../utils');
7
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
11
8
 
12
- list = require('postcss/lib/list');
9
+ var Value = require('../value');
10
+ var list = require('postcss/lib/list');
13
11
 
14
- CrossFade = (function(superClass) {
15
- extend(CrossFade, superClass);
12
+ var CrossFade = function (_Value) {
13
+ _inherits(CrossFade, _Value);
16
14
 
17
15
  function CrossFade() {
18
- return CrossFade.__super__.constructor.apply(this, arguments);
16
+ _classCallCheck(this, CrossFade);
17
+
18
+ return _possibleConstructorReturn(this, _Value.apply(this, arguments));
19
19
  }
20
20
 
21
- CrossFade.names = ['cross-fade'];
22
-
23
- CrossFade.prototype.replace = function(string, prefix) {
24
- return list.space(string).map((function(_this) {
25
- return function(value) {
26
- var after, args, close, match;
27
- if (value.slice(0, +_this.name.length + 1 || 9e9) !== _this.name + '(') {
28
- return value;
29
- }
30
- close = value.lastIndexOf(')');
31
- after = value.slice(close + 1);
32
- args = value.slice(_this.name.length + 1, +(close - 1) + 1 || 9e9);
33
- if (prefix === '-webkit-') {
34
- match = args.match(/\d*.?\d+%?/);
35
- if (match) {
36
- args = args.slice(match[0].length).trim();
37
- args += ', ' + match[0];
38
- } else {
39
- args += ', 0.5';
21
+ CrossFade.prototype.replace = function replace(string, prefix) {
22
+ var _this2 = this;
23
+
24
+ return list.space(string).map(function (value) {
25
+ if (value.slice(0, +_this2.name.length + 1) !== _this2.name + '(') {
26
+ return value;
27
+ }
28
+
29
+ var close = value.lastIndexOf(')');
30
+ var after = value.slice(close + 1);
31
+ var args = value.slice(_this2.name.length + 1, close);
32
+
33
+ if (prefix === '-webkit-') {
34
+ var match = args.match(/\d*.?\d+%?/);
35
+ if (match) {
36
+ args = args.slice(match[0].length).trim();
37
+ args += ', ' + match[0];
38
+ } else {
39
+ args += ', 0.5';
40
+ }
40
41
  }
41
- }
42
- return prefix + _this.name + '(' + args + ')' + after;
43
- };
44
- })(this)).join(' ');
42
+ return prefix + _this2.name + '(' + args + ')' + after;
43
+ }).join(' ');
45
44
  };
46
45
 
47
46
  return CrossFade;
47
+ }(Value);
48
48
 
49
- })(Value);
49
+ Object.defineProperty(CrossFade, 'names', {
50
+ enumerable: true,
51
+ writable: true,
52
+ value: ['cross-fade']
53
+ });
50
54
 
51
- module.exports = CrossFade;
52
55
 
53
- }).call(this);
56
+ module.exports = CrossFade;
@@ -1,52 +1,102 @@
1
- (function() {
2
- var DisplayFlex, OldValue, Value, flexSpec,
3
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
4
- hasProp = {}.hasOwnProperty;
1
+ 'use strict';
5
2
 
6
- flexSpec = require('./flex-spec');
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7
4
 
8
- OldValue = require('../old-value');
5
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
9
6
 
10
- Value = require('../value');
7
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
11
8
 
12
- DisplayFlex = (function(superClass) {
13
- extend(DisplayFlex, superClass);
9
+ var flexSpec = require('./flex-spec');
10
+ var OldValue = require('../old-value');
11
+ var Value = require('../value');
14
12
 
15
- DisplayFlex.names = ['display-flex', 'inline-flex'];
13
+ var DisplayFlex = function (_Value) {
14
+ _inherits(DisplayFlex, _Value);
16
15
 
17
16
  function DisplayFlex(name, prefixes) {
18
- DisplayFlex.__super__.constructor.apply(this, arguments);
19
- if (name === 'display-flex') {
20
- this.name = 'flex';
21
- }
17
+ _classCallCheck(this, DisplayFlex);
18
+
19
+ var _this = _possibleConstructorReturn(this, _Value.call(this, name, prefixes));
20
+
21
+ if (name === 'display-flex') {
22
+ _this.name = 'flex';
23
+ }
24
+ return _this;
22
25
  }
23
26
 
24
- DisplayFlex.prototype.check = function(decl) {
25
- return decl.prop === 'display' && decl.value === this.name;
27
+ /**
28
+ * Faster check for flex value
29
+ */
30
+
31
+
32
+ DisplayFlex.prototype.check = function check(decl) {
33
+ return decl.prop === 'display' && decl.value === this.name;
26
34
  };
27
35
 
28
- DisplayFlex.prototype.prefixed = function(prefix) {
29
- var ref, spec;
30
- ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
31
- return prefix + (spec === 2009 ? this.name === 'flex' ? 'box' : 'inline-box' : spec === 2012 ? this.name === 'flex' ? 'flexbox' : 'inline-flexbox' : spec === 'final' ? this.name : void 0);
36
+ /**
37
+ * Return value by spec
38
+ */
39
+
40
+
41
+ DisplayFlex.prototype.prefixed = function prefixed(prefix) {
42
+ var spec = void 0,
43
+ value = void 0;
44
+
45
+ var _flexSpec = flexSpec(prefix);
46
+
47
+ spec = _flexSpec[0];
48
+ prefix = _flexSpec[1];
49
+
50
+
51
+ if (spec === 2009) {
52
+ if (this.name === 'flex') {
53
+ value = 'box';
54
+ } else {
55
+ value = 'inline-box';
56
+ }
57
+ } else if (spec === 2012) {
58
+ if (this.name === 'flex') {
59
+ value = 'flexbox';
60
+ } else {
61
+ value = 'inline-flexbox';
62
+ }
63
+ } else if (spec === 'final') {
64
+ value = this.name;
65
+ }
66
+
67
+ return prefix + value;
32
68
  };
33
69
 
34
- DisplayFlex.prototype.replace = function(string, prefix) {
35
- return this.prefixed(prefix);
70
+ /**
71
+ * Add prefix to value depend on flebox spec version
72
+ */
73
+
74
+
75
+ DisplayFlex.prototype.replace = function replace(string, prefix) {
76
+ return this.prefixed(prefix);
36
77
  };
37
78
 
38
- DisplayFlex.prototype.old = function(prefix) {
39
- var prefixed;
40
- prefixed = this.prefixed(prefix);
41
- if (prefixed) {
42
- return new OldValue(this.name, prefixed);
43
- }
79
+ /**
80
+ * Change value for old specs
81
+ */
82
+
83
+
84
+ DisplayFlex.prototype.old = function old(prefix) {
85
+ var prefixed = this.prefixed(prefix);
86
+ if (prefixed) {
87
+ return new OldValue(this.name, prefixed);
88
+ }
89
+ return undefined;
44
90
  };
45
91
 
46
92
  return DisplayFlex;
93
+ }(Value);
47
94
 
48
- })(Value);
95
+ Object.defineProperty(DisplayFlex, 'names', {
96
+ enumerable: true,
97
+ writable: true,
98
+ value: ['display-flex', 'inline-flex']
99
+ });
49
100
 
50
- module.exports = DisplayFlex;
51
101
 
52
- }).call(this);
102
+ module.exports = DisplayFlex;
@@ -1,34 +1,44 @@
1
- (function() {
2
- var DisplayGrid, OldValue, Value, flexSpec,
3
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
4
- hasProp = {}.hasOwnProperty;
1
+ 'use strict';
5
2
 
6
- flexSpec = require('./flex-spec');
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7
4
 
8
- OldValue = require('../old-value');
5
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
9
6
 
10
- Value = require('../value');
7
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
11
8
 
12
- DisplayGrid = (function(superClass) {
13
- extend(DisplayGrid, superClass);
9
+ var Value = require('../value');
14
10
 
15
- DisplayGrid.names = ['display-grid', 'inline-grid'];
11
+ var DisplayGrid = function (_Value) {
12
+ _inherits(DisplayGrid, _Value);
16
13
 
17
14
  function DisplayGrid(name, prefixes) {
18
- DisplayGrid.__super__.constructor.apply(this, arguments);
19
- if (name === 'display-grid') {
20
- this.name = 'grid';
21
- }
15
+ _classCallCheck(this, DisplayGrid);
16
+
17
+ var _this = _possibleConstructorReturn(this, _Value.call(this, name, prefixes));
18
+
19
+ if (name === 'display-grid') {
20
+ _this.name = 'grid';
21
+ }
22
+ return _this;
22
23
  }
23
24
 
24
- DisplayGrid.prototype.check = function(decl) {
25
- return decl.prop === 'display' && decl.value === this.name;
25
+ /**
26
+ * Faster check for flex value
27
+ */
28
+
29
+
30
+ DisplayGrid.prototype.check = function check(decl) {
31
+ return decl.prop === 'display' && decl.value === this.name;
26
32
  };
27
33
 
28
34
  return DisplayGrid;
35
+ }(Value);
29
36
 
30
- })(Value);
37
+ Object.defineProperty(DisplayGrid, 'names', {
38
+ enumerable: true,
39
+ writable: true,
40
+ value: ['display-grid', 'inline-grid']
41
+ });
31
42
 
32
- module.exports = DisplayGrid;
33
43
 
34
- }).call(this);
44
+ module.exports = DisplayGrid;
@@ -1,72 +1,93 @@
1
- (function() {
2
- var FilterValue, OldFilterValue, OldValue, Value, utils,
3
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
4
- hasProp = {}.hasOwnProperty;
1
+ 'use strict';
5
2
 
6
- OldValue = require('../old-value');
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7
4
 
8
- Value = require('../value');
5
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
9
6
 
10
- utils = require('../utils');
7
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
11
8
 
12
- OldFilterValue = (function(superClass) {
13
- extend(OldFilterValue, superClass);
9
+ var OldValue = require('../old-value');
10
+ var Value = require('../value');
11
+ var utils = require('../utils');
12
+
13
+ var OldFilterValue = function (_OldValue) {
14
+ _inherits(OldFilterValue, _OldValue);
14
15
 
15
16
  function OldFilterValue() {
16
- return OldFilterValue.__super__.constructor.apply(this, arguments);
17
+ _classCallCheck(this, OldFilterValue);
18
+
19
+ return _possibleConstructorReturn(this, _OldValue.apply(this, arguments));
17
20
  }
18
21
 
19
- OldFilterValue.prototype.clean = function(decl) {
20
- return decl.value = utils.editList(decl.value, (function(_this) {
21
- return function(props) {
22
- if (props.every(function(i) {
23
- return i.indexOf(_this.unprefixed) !== 0;
24
- })) {
25
- return props;
26
- }
27
- return props.filter(function(i) {
28
- return i.indexOf(_this.prefixed) === -1;
29
- });
30
- };
31
- })(this));
22
+ /**
23
+ * Clean -webkit-filter from properties list
24
+ */
25
+ OldFilterValue.prototype.clean = function clean(decl) {
26
+ var _this2 = this;
27
+
28
+ decl.value = utils.editList(decl.value, function (props) {
29
+ if (props.every(function (i) {
30
+ return i.indexOf(_this2.unprefixed) !== 0;
31
+ })) {
32
+ return props;
33
+ }
34
+ return props.filter(function (i) {
35
+ return i.indexOf(_this2.prefixed) === -1;
36
+ });
37
+ });
32
38
  };
33
39
 
34
40
  return OldFilterValue;
41
+ }(OldValue);
35
42
 
36
- })(OldValue);
43
+ var FilterValue = function (_Value) {
44
+ _inherits(FilterValue, _Value);
37
45
 
38
- FilterValue = (function(superClass) {
39
- extend(FilterValue, superClass);
46
+ function FilterValue(name, prefixes) {
47
+ _classCallCheck(this, FilterValue);
40
48
 
41
- FilterValue.names = ['filter', 'filter-function'];
49
+ var _this3 = _possibleConstructorReturn(this, _Value.call(this, name, prefixes));
42
50
 
43
- function FilterValue(name, prefixes) {
44
- FilterValue.__super__.constructor.apply(this, arguments);
45
- if (name === 'filter-function') {
46
- this.name = 'filter';
47
- }
51
+ if (name === 'filter-function') {
52
+ _this3.name = 'filter';
53
+ }
54
+ return _this3;
48
55
  }
49
56
 
50
- FilterValue.prototype.replace = function(value, prefix) {
51
- if (prefix === '-webkit-' && value.indexOf('filter(') === -1) {
52
- if (value.indexOf('-webkit-filter') === -1) {
53
- return FilterValue.__super__.replace.apply(this, arguments) + ', ' + value;
57
+ /**
58
+ * Use prefixed and unprefixed filter for WebKit
59
+ */
60
+
61
+
62
+ FilterValue.prototype.replace = function replace(value, prefix) {
63
+ if (prefix === '-webkit-' && value.indexOf('filter(') === -1) {
64
+ if (value.indexOf('-webkit-filter') === -1) {
65
+ return _Value.prototype.replace.call(this, value, prefix) + ', ' + value;
66
+ } else {
67
+ return value;
68
+ }
54
69
  } else {
55
- return value;
70
+ return _Value.prototype.replace.call(this, value, prefix);
56
71
  }
57
- } else {
58
- return FilterValue.__super__.replace.apply(this, arguments);
59
- }
60
72
  };
61
73
 
62
- FilterValue.prototype.old = function(prefix) {
63
- return new OldFilterValue(this.name, prefix + this.name);
74
+ /**
75
+ * Clean -webkit-filter
76
+ */
77
+
78
+
79
+ FilterValue.prototype.old = function old(prefix) {
80
+ return new OldFilterValue(this.name, prefix + this.name);
64
81
  };
65
82
 
66
83
  return FilterValue;
84
+ }(Value);
67
85
 
68
- })(Value);
86
+ Object.defineProperty(FilterValue, 'names', {
87
+ enumerable: true,
88
+ writable: true,
89
+ value: ['filter', 'filter-function']
90
+ });
69
91
 
70
- module.exports = FilterValue;
71
92
 
72
- }).call(this);
93
+ module.exports = FilterValue;
@@ -1,29 +1,38 @@
1
- (function() {
2
- var Declaration, Filter,
3
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
4
- hasProp = {}.hasOwnProperty;
1
+ 'use strict';
5
2
 
6
- Declaration = require('../declaration');
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7
4
 
8
- Filter = (function(superClass) {
9
- extend(Filter, superClass);
5
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
6
+
7
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
8
+
9
+ var Declaration = require('../declaration');
10
+
11
+ var Filter = function (_Declaration) {
12
+ _inherits(Filter, _Declaration);
10
13
 
11
14
  function Filter() {
12
- return Filter.__super__.constructor.apply(this, arguments);
13
- }
15
+ _classCallCheck(this, Filter);
14
16
 
15
- Filter.names = ['filter'];
17
+ return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
18
+ }
16
19
 
17
- Filter.prototype.check = function(decl) {
18
- var v;
19
- v = decl.value;
20
- return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1 && v.indexOf('data:image/svg+xml') === -1;
20
+ /**
21
+ * Check is it Internet Explorer filter
22
+ */
23
+ Filter.prototype.check = function check(decl) {
24
+ var v = decl.value;
25
+ return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1 && v.indexOf('data:image/svg+xml') === -1;
21
26
  };
22
27
 
23
28
  return Filter;
29
+ }(Declaration);
24
30
 
25
- })(Declaration);
31
+ Object.defineProperty(Filter, 'names', {
32
+ enumerable: true,
33
+ writable: true,
34
+ value: ['filter']
35
+ });
26
36
 
27
- module.exports = Filter;
28
37
 
29
- }).call(this);
38
+ module.exports = Filter;
@@ -1,47 +1,77 @@
1
- (function() {
2
- var Declaration, FlexBasis, flexSpec,
3
- extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
4
- hasProp = {}.hasOwnProperty;
1
+ 'use strict';
5
2
 
6
- flexSpec = require('./flex-spec');
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
7
4
 
8
- Declaration = require('../declaration');
5
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
9
6
 
10
- FlexBasis = (function(superClass) {
11
- extend(FlexBasis, superClass);
7
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
8
+
9
+ var flexSpec = require('./flex-spec');
10
+ var Declaration = require('../declaration');
11
+
12
+ var FlexBasis = function (_Declaration) {
13
+ _inherits(FlexBasis, _Declaration);
12
14
 
13
15
  function FlexBasis() {
14
- return FlexBasis.__super__.constructor.apply(this, arguments);
15
- }
16
+ _classCallCheck(this, FlexBasis);
16
17
 
17
- FlexBasis.names = ['flex-basis', 'flex-preferred-size'];
18
+ return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
19
+ }
18
20
 
19
- FlexBasis.prototype.normalize = function() {
20
- return 'flex-basis';
21
+ /**
22
+ * Return property name by final spec
23
+ */
24
+ FlexBasis.prototype.normalize = function normalize() {
25
+ return 'flex-basis';
21
26
  };
22
27
 
23
- FlexBasis.prototype.prefixed = function(prop, prefix) {
24
- var ref, spec;
25
- ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
26
- if (spec === 2012) {
27
- return prefix + 'flex-preferred-size';
28
- } else {
29
- return FlexBasis.__super__.prefixed.apply(this, arguments);
30
- }
28
+ /**
29
+ * Return flex property for 2012 spec
30
+ */
31
+
32
+
33
+ FlexBasis.prototype.prefixed = function prefixed(prop, prefix) {
34
+ var spec = void 0;
35
+
36
+ var _flexSpec = flexSpec(prefix);
37
+
38
+ spec = _flexSpec[0];
39
+ prefix = _flexSpec[1];
40
+
41
+ if (spec === 2012) {
42
+ return prefix + 'flex-preferred-size';
43
+ } else {
44
+ return _Declaration.prototype.prefixed.call(this, prop, prefix);
45
+ }
31
46
  };
32
47
 
33
- FlexBasis.prototype.set = function(decl, prefix) {
34
- var ref, spec;
35
- ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
36
- if (spec === 2012 || spec === 'final') {
37
- return FlexBasis.__super__.set.apply(this, arguments);
38
- }
48
+ /**
49
+ * Ignore 2009 spec and use flex property for 2012
50
+ */
51
+
52
+
53
+ FlexBasis.prototype.set = function set(decl, prefix) {
54
+ var spec = void 0;
55
+
56
+ var _flexSpec2 = flexSpec(prefix);
57
+
58
+ spec = _flexSpec2[0];
59
+ prefix = _flexSpec2[1];
60
+
61
+ if (spec === 2012 || spec === 'final') {
62
+ return _Declaration.prototype.set.call(this, decl, prefix);
63
+ }
64
+ return undefined;
39
65
  };
40
66
 
41
67
  return FlexBasis;
68
+ }(Declaration);
42
69
 
43
- })(Declaration);
70
+ Object.defineProperty(FlexBasis, 'names', {
71
+ enumerable: true,
72
+ writable: true,
73
+ value: ['flex-basis', 'flex-preferred-size']
74
+ });
44
75
 
45
- module.exports = FlexBasis;
46
76
 
47
- }).call(this);
77
+ module.exports = FlexBasis;