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,71 +1,103 @@
1
- (function() {
2
- var Declaration, FlexDirection, 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
- FlexDirection = (function(superClass) {
11
- extend(FlexDirection, 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 FlexDirection = function (_Declaration) {
13
+ _inherits(FlexDirection, _Declaration);
12
14
 
13
15
  function FlexDirection() {
14
- return FlexDirection.__super__.constructor.apply(this, arguments);
15
- }
16
+ _classCallCheck(this, FlexDirection);
16
17
 
17
- FlexDirection.names = ['flex-direction', 'box-direction', 'box-orient'];
18
+ return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
19
+ }
18
20
 
19
- FlexDirection.prototype.normalize = function(prop) {
20
- return 'flex-direction';
21
+ /**
22
+ * Return property name by final spec
23
+ */
24
+ FlexDirection.prototype.normalize = function normalize() {
25
+ return 'flex-direction';
21
26
  };
22
27
 
23
- FlexDirection.prototype.insert = function(decl, prefix, prefixes) {
24
- var already, cloned, dir, orient, ref, spec, value;
25
- ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
26
- if (spec !== 2009) {
27
- return FlexDirection.__super__.insert.apply(this, arguments);
28
- } else {
29
- already = decl.parent.some(function(i) {
30
- return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
31
- });
32
- if (already) {
33
- return;
34
- }
35
- value = decl.value;
36
- orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
37
- dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
38
- cloned = this.clone(decl);
39
- cloned.prop = prefix + 'box-orient';
40
- cloned.value = orient;
41
- if (this.needCascade(decl)) {
42
- cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
43
- }
44
- decl.parent.insertBefore(decl, cloned);
45
- cloned = this.clone(decl);
46
- cloned.prop = prefix + 'box-direction';
47
- cloned.value = dir;
48
- if (this.needCascade(decl)) {
49
- cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
28
+ /**
29
+ * Use two properties for 2009 spec
30
+ */
31
+
32
+
33
+ FlexDirection.prototype.insert = function insert(decl, prefix, prefixes) {
34
+ var spec = void 0;
35
+
36
+ var _flexSpec = flexSpec(prefix);
37
+
38
+ spec = _flexSpec[0];
39
+ prefix = _flexSpec[1];
40
+
41
+ if (spec !== 2009) {
42
+ return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
43
+ } else {
44
+ var already = decl.parent.some(function (i) {
45
+ return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
46
+ });
47
+ if (already) {
48
+ return undefined;
49
+ }
50
+
51
+ var value = decl.value;
52
+ var orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
53
+ var dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
54
+
55
+ var cloned = this.clone(decl);
56
+ cloned.prop = prefix + 'box-orient';
57
+ cloned.value = orient;
58
+ if (this.needCascade(decl)) {
59
+ cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
60
+ }
61
+ decl.parent.insertBefore(decl, cloned);
62
+
63
+ cloned = this.clone(decl);
64
+ cloned.prop = prefix + 'box-direction';
65
+ cloned.value = dir;
66
+ if (this.needCascade(decl)) {
67
+ cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
68
+ }
69
+ return decl.parent.insertBefore(decl, cloned);
50
70
  }
51
- return decl.parent.insertBefore(decl, cloned);
52
- }
53
71
  };
54
72
 
55
- FlexDirection.prototype.old = function(prop, prefix) {
56
- var ref, spec;
57
- ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
58
- if (spec === 2009) {
59
- return [prefix + 'box-orient', prefix + 'box-direction'];
60
- } else {
61
- return FlexDirection.__super__.old.apply(this, arguments);
62
- }
73
+ /**
74
+ * Clean two properties for 2009 spec
75
+ */
76
+
77
+
78
+ FlexDirection.prototype.old = function old(prop, prefix) {
79
+ var spec = void 0;
80
+
81
+ var _flexSpec2 = flexSpec(prefix);
82
+
83
+ spec = _flexSpec2[0];
84
+ prefix = _flexSpec2[1];
85
+
86
+ if (spec === 2009) {
87
+ return [prefix + 'box-orient', prefix + 'box-direction'];
88
+ } else {
89
+ return _Declaration.prototype.old.call(this, prop, prefix);
90
+ }
63
91
  };
64
92
 
65
93
  return FlexDirection;
94
+ }(Declaration);
66
95
 
67
- })(Declaration);
96
+ Object.defineProperty(FlexDirection, 'names', {
97
+ enumerable: true,
98
+ writable: true,
99
+ value: ['flex-direction', 'box-direction', 'box-orient']
100
+ });
68
101
 
69
- module.exports = FlexDirection;
70
102
 
71
- }).call(this);
103
+ module.exports = FlexDirection;
@@ -1,63 +1,81 @@
1
- (function() {
2
- var Declaration, FlexFlow, 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
- FlexFlow = (function(superClass) {
11
- extend(FlexFlow, 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 FlexFlow = function (_Declaration) {
13
+ _inherits(FlexFlow, _Declaration);
12
14
 
13
15
  function FlexFlow() {
14
- return FlexFlow.__super__.constructor.apply(this, arguments);
16
+ _classCallCheck(this, FlexFlow);
17
+
18
+ return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
15
19
  }
16
20
 
17
- FlexFlow.names = ['flex-flow', 'box-direction', 'box-orient'];
18
-
19
- FlexFlow.prototype.insert = function(decl, prefix, prefixes) {
20
- var already, cloned, dir, orient, ref, spec, value, values;
21
- ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
22
- if (spec !== 2009) {
23
- return FlexFlow.__super__.insert.apply(this, arguments);
24
- } else {
25
- values = decl.value.split(/\s+/).filter(function(i) {
26
- return i !== 'wrap' && i !== 'nowrap' && 'wrap-reverse';
27
- });
28
- if (values.length === 0) {
29
- return;
30
- }
31
- already = decl.parent.some(function(i) {
32
- return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
33
- });
34
- if (already) {
35
- return;
36
- }
37
- value = values[0];
38
- orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
39
- dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
40
- cloned = this.clone(decl);
41
- cloned.prop = prefix + 'box-orient';
42
- cloned.value = orient;
43
- if (this.needCascade(decl)) {
44
- cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
45
- }
46
- decl.parent.insertBefore(decl, cloned);
47
- cloned = this.clone(decl);
48
- cloned.prop = prefix + 'box-direction';
49
- cloned.value = dir;
50
- if (this.needCascade(decl)) {
51
- cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
21
+ /**
22
+ * Use two properties for 2009 spec
23
+ */
24
+ FlexFlow.prototype.insert = function insert(decl, prefix, prefixes) {
25
+ var spec = void 0;
26
+
27
+ var _flexSpec = flexSpec(prefix);
28
+
29
+ spec = _flexSpec[0];
30
+ prefix = _flexSpec[1];
31
+
32
+ if (spec !== 2009) {
33
+ return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
34
+ } else {
35
+ var values = decl.value.split(/\s+/).filter(function (i) {
36
+ return i !== 'wrap' && i !== 'nowrap' && 'wrap-reverse';
37
+ });
38
+ if (values.length === 0) {
39
+ return undefined;
40
+ }
41
+
42
+ var already = decl.parent.some(function (i) {
43
+ return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
44
+ });
45
+ if (already) {
46
+ return undefined;
47
+ }
48
+
49
+ var value = values[0];
50
+ var orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
51
+ var dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
52
+
53
+ var cloned = this.clone(decl);
54
+ cloned.prop = prefix + 'box-orient';
55
+ cloned.value = orient;
56
+ if (this.needCascade(decl)) {
57
+ cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
58
+ }
59
+ decl.parent.insertBefore(decl, cloned);
60
+
61
+ cloned = this.clone(decl);
62
+ cloned.prop = prefix + 'box-direction';
63
+ cloned.value = dir;
64
+ if (this.needCascade(decl)) {
65
+ cloned.raws.before = this.calcBefore(prefixes, decl, prefix);
66
+ }
67
+ return decl.parent.insertBefore(decl, cloned);
52
68
  }
53
- return decl.parent.insertBefore(decl, cloned);
54
- }
55
69
  };
56
70
 
57
71
  return FlexFlow;
72
+ }(Declaration);
58
73
 
59
- })(Declaration);
74
+ Object.defineProperty(FlexFlow, 'names', {
75
+ enumerable: true,
76
+ writable: true,
77
+ value: ['flex-flow', 'box-direction', 'box-orient']
78
+ });
60
79
 
61
- module.exports = FlexFlow;
62
80
 
63
- }).call(this);
81
+ module.exports = FlexFlow;
@@ -1,41 +1,60 @@
1
- (function() {
2
- var Declaration, Flex, 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
- Flex = (function(superClass) {
11
- extend(Flex, 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 Flex = function (_Declaration) {
13
+ _inherits(Flex, _Declaration);
12
14
 
13
15
  function Flex() {
14
- return Flex.__super__.constructor.apply(this, arguments);
15
- }
16
+ _classCallCheck(this, Flex);
16
17
 
17
- Flex.names = ['flex-grow', 'flex-positive'];
18
+ return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
19
+ }
18
20
 
19
- Flex.prototype.normalize = function() {
20
- return 'flex';
21
+ /**
22
+ * Return property name by final spec
23
+ */
24
+ Flex.prototype.normalize = function normalize() {
25
+ return 'flex';
21
26
  };
22
27
 
23
- Flex.prototype.prefixed = function(prop, prefix) {
24
- var ref, spec;
25
- ref = flexSpec(prefix), spec = ref[0], prefix = ref[1];
26
- if (spec === 2009) {
27
- return prefix + 'box-flex';
28
- } else if (spec === 2012) {
29
- return prefix + 'flex-positive';
30
- } else {
31
- return Flex.__super__.prefixed.apply(this, arguments);
32
- }
28
+ /**
29
+ * Return flex property for 2009 and 2012 specs
30
+ */
31
+
32
+
33
+ Flex.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 === 2009) {
42
+ return prefix + 'box-flex';
43
+ } else if (spec === 2012) {
44
+ return prefix + 'flex-positive';
45
+ } else {
46
+ return _Declaration.prototype.prefixed.call(this, prop, prefix);
47
+ }
33
48
  };
34
49
 
35
50
  return Flex;
51
+ }(Declaration);
36
52
 
37
- })(Declaration);
53
+ Object.defineProperty(Flex, 'names', {
54
+ enumerable: true,
55
+ writable: true,
56
+ value: ['flex-grow', 'flex-positive']
57
+ });
38
58
 
39
- module.exports = Flex;
40
59
 
41
- }).call(this);
60
+ module.exports = Flex;
@@ -1,47 +1,77 @@
1
- (function() {
2
- var Declaration, FlexShrink, 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
- FlexShrink = (function(superClass) {
11
- extend(FlexShrink, 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 FlexShrink = function (_Declaration) {
13
+ _inherits(FlexShrink, _Declaration);
12
14
 
13
15
  function FlexShrink() {
14
- return FlexShrink.__super__.constructor.apply(this, arguments);
15
- }
16
+ _classCallCheck(this, FlexShrink);
16
17
 
17
- FlexShrink.names = ['flex-shrink', 'flex-negative'];
18
+ return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
19
+ }
18
20
 
19
- FlexShrink.prototype.normalize = function() {
20
- return 'flex-shrink';
21
+ /**
22
+ * Return property name by final spec
23
+ */
24
+ FlexShrink.prototype.normalize = function normalize() {
25
+ return 'flex-shrink';
21
26
  };
22
27
 
23
- FlexShrink.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-negative';
28
- } else {
29
- return FlexShrink.__super__.prefixed.apply(this, arguments);
30
- }
28
+ /**
29
+ * Return flex property for 2012 spec
30
+ */
31
+
32
+
33
+ FlexShrink.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-negative';
43
+ } else {
44
+ return _Declaration.prototype.prefixed.call(this, prop, prefix);
45
+ }
31
46
  };
32
47
 
33
- FlexShrink.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 FlexShrink.__super__.set.apply(this, arguments);
38
- }
48
+ /**
49
+ * Ignore 2009 spec and use flex property for 2012
50
+ */
51
+
52
+
53
+ FlexShrink.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 FlexShrink;
68
+ }(Declaration);
42
69
 
43
- })(Declaration);
70
+ Object.defineProperty(FlexShrink, 'names', {
71
+ enumerable: true,
72
+ writable: true,
73
+ value: ['flex-shrink', 'flex-negative']
74
+ });
44
75
 
45
- module.exports = FlexShrink;
46
76
 
47
- }).call(this);
77
+ module.exports = FlexShrink;
@@ -1,11 +1,21 @@
1
- (function() {
2
- module.exports = function(prefix) {
3
- var spec;
4
- spec = prefix === '-webkit- 2009' || prefix === '-moz-' ? 2009 : prefix === '-ms-' ? 2012 : prefix === '-webkit-' ? 'final' : void 0;
1
+ 'use strict';
2
+
3
+ /**
4
+ * Return flexbox spec versions by prefix
5
+ */
6
+ module.exports = function (prefix) {
7
+ var spec = void 0;
8
+ if (prefix === '-webkit- 2009' || prefix === '-moz-') {
9
+ spec = 2009;
10
+ } else if (prefix === '-ms-') {
11
+ spec = 2012;
12
+ } else if (prefix === '-webkit-') {
13
+ spec = 'final';
14
+ }
15
+
5
16
  if (prefix === '-webkit- 2009') {
6
- prefix = '-webkit-';
17
+ prefix = '-webkit-';
7
18
  }
8
- return [spec, prefix];
9
- };
10
19
 
11
- }).call(this);
20
+ return [spec, prefix];
21
+ };
@@ -1,37 +1,56 @@
1
- (function() {
2
- var FlexValues, OldValue, Value,
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
- FlexValues = (function(superClass) {
11
- extend(FlexValues, 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 OldValue = require('../old-value');
10
+ var Value = require('../value');
11
+
12
+ var FlexValues = function (_Value) {
13
+ _inherits(FlexValues, _Value);
12
14
 
13
15
  function FlexValues() {
14
- return FlexValues.__super__.constructor.apply(this, arguments);
15
- }
16
+ _classCallCheck(this, FlexValues);
16
17
 
17
- FlexValues.names = ['flex', 'flex-grow', 'flex-shrink', 'flex-basis'];
18
+ return _possibleConstructorReturn(this, _Value.apply(this, arguments));
19
+ }
18
20
 
19
- FlexValues.prototype.prefixed = function(prefix) {
20
- return this.all.prefixed(this.name, prefix);
21
+ /**
22
+ * Return prefixed property name
23
+ */
24
+ FlexValues.prototype.prefixed = function prefixed(prefix) {
25
+ return this.all.prefixed(this.name, prefix);
21
26
  };
22
27
 
23
- FlexValues.prototype.replace = function(string, prefix) {
24
- return string.replace(this.regexp(), '$1' + this.prefixed(prefix) + '$3');
28
+ /**
29
+ * Change property name to prefixed property name
30
+ */
31
+
32
+
33
+ FlexValues.prototype.replace = function replace(string, prefix) {
34
+ return string.replace(this.regexp(), '$1' + this.prefixed(prefix) + '$3');
25
35
  };
26
36
 
27
- FlexValues.prototype.old = function(prefix) {
28
- return new OldValue(this.name, this.prefixed(prefix));
37
+ /**
38
+ * Return function to fast prefixed property name
39
+ */
40
+
41
+
42
+ FlexValues.prototype.old = function old(prefix) {
43
+ return new OldValue(this.name, this.prefixed(prefix));
29
44
  };
30
45
 
31
46
  return FlexValues;
47
+ }(Value);
32
48
 
33
- })(Value);
49
+ Object.defineProperty(FlexValues, 'names', {
50
+ enumerable: true,
51
+ writable: true,
52
+ value: ['flex', 'flex-grow', 'flex-shrink', 'flex-basis']
53
+ });
34
54
 
35
- module.exports = FlexValues;
36
55
 
37
- }).call(this);
56
+ module.exports = FlexValues;