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
@@ -0,0 +1,55 @@
1
+ 'use strict';
2
+
3
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
+
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 GridColumnAlign = function (_Declaration) {
12
+ _inherits(GridColumnAlign, _Declaration);
13
+
14
+ function GridColumnAlign() {
15
+ _classCallCheck(this, GridColumnAlign);
16
+
17
+ return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
18
+ }
19
+
20
+ /**
21
+ * Do not prefix flexbox values
22
+ */
23
+ GridColumnAlign.prototype.check = function check(decl) {
24
+ return decl.value.indexOf('flex-') === -1 && decl.value !== 'baseline';
25
+ };
26
+
27
+ /**
28
+ * Change property name for IE
29
+ */
30
+
31
+
32
+ GridColumnAlign.prototype.prefixed = function prefixed(prop, prefix) {
33
+ return prefix + 'grid-column-align';
34
+ };
35
+
36
+ /**
37
+ * Change IE property back
38
+ */
39
+
40
+
41
+ GridColumnAlign.prototype.normalize = function normalize() {
42
+ return 'justify-self';
43
+ };
44
+
45
+ return GridColumnAlign;
46
+ }(Declaration);
47
+
48
+ Object.defineProperty(GridColumnAlign, 'names', {
49
+ enumerable: true,
50
+ writable: true,
51
+ value: ['grid-column-align']
52
+ });
53
+
54
+
55
+ module.exports = GridColumnAlign;
@@ -1,46 +1,71 @@
1
- (function() {
2
- var Declaration, GridEnd,
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
- GridEnd = (function(superClass) {
9
- extend(GridEnd, 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 GridEnd = function (_Declaration) {
12
+ _inherits(GridEnd, _Declaration);
10
13
 
11
14
  function GridEnd() {
12
- return GridEnd.__super__.constructor.apply(this, arguments);
13
- }
15
+ _classCallCheck(this, GridEnd);
14
16
 
15
- GridEnd.names = ['grid-row-end', 'grid-column-end', 'grid-row-span', 'grid-column-span'];
17
+ return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
18
+ }
16
19
 
17
- GridEnd.prototype.check = function(decl) {
18
- return decl.value.indexOf('span') !== -1;
20
+ /**
21
+ * Do not add prefix for unsupported value in IE
22
+ */
23
+ GridEnd.prototype.check = function check(decl) {
24
+ return decl.value.indexOf('span') !== -1;
19
25
  };
20
26
 
21
- GridEnd.prototype.normalize = function(prop) {
22
- return prop.replace(/(-span|-end)/, '');
27
+ /**
28
+ * Return a final spec property
29
+ */
30
+
31
+
32
+ GridEnd.prototype.normalize = function normalize(prop) {
33
+ return prop.replace(/(-span|-end)/, '');
23
34
  };
24
35
 
25
- GridEnd.prototype.prefixed = function(prop, prefix) {
26
- if (prefix === '-ms-') {
27
- return prefix + prop.replace('-end', '-span');
28
- } else {
29
- return GridEnd.__super__.prefixed.call(this, prop, prefix);
30
- }
36
+ /**
37
+ * Change property name for IE
38
+ */
39
+
40
+
41
+ GridEnd.prototype.prefixed = function prefixed(prop, prefix) {
42
+ if (prefix === '-ms-') {
43
+ return prefix + prop.replace('-end', '-span');
44
+ } else {
45
+ return _Declaration.prototype.prefixed.call(this, prop, prefix);
46
+ }
31
47
  };
32
48
 
33
- GridEnd.prototype.set = function(decl, prefix) {
34
- if (prefix === '-ms-') {
35
- decl.value = decl.value.replace(/span\s/i, '');
36
- }
37
- return GridEnd.__super__.set.call(this, decl, prefix);
49
+ /**
50
+ * Change repeating syntax for IE
51
+ */
52
+
53
+
54
+ GridEnd.prototype.set = function set(decl, prefix) {
55
+ if (prefix === '-ms-') {
56
+ decl.value = decl.value.replace(/span\s/i, '');
57
+ }
58
+ return _Declaration.prototype.set.call(this, decl, prefix);
38
59
  };
39
60
 
40
61
  return GridEnd;
62
+ }(Declaration);
41
63
 
42
- })(Declaration);
64
+ Object.defineProperty(GridEnd, 'names', {
65
+ enumerable: true,
66
+ writable: true,
67
+ value: ['grid-row-end', 'grid-column-end', 'grid-row-span', 'grid-column-span']
68
+ });
43
69
 
44
- module.exports = GridEnd;
45
70
 
46
- }).call(this);
71
+ module.exports = GridEnd;
@@ -1,35 +1,55 @@
1
- (function() {
2
- var Declaration, GridRowAlign,
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
- GridRowAlign = (function(superClass) {
9
- extend(GridRowAlign, 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 GridRowAlign = function (_Declaration) {
12
+ _inherits(GridRowAlign, _Declaration);
10
13
 
11
14
  function GridRowAlign() {
12
- return GridRowAlign.__super__.constructor.apply(this, arguments);
13
- }
15
+ _classCallCheck(this, GridRowAlign);
14
16
 
15
- GridRowAlign.names = ['grid-row-align'];
17
+ return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
18
+ }
16
19
 
17
- GridRowAlign.prototype.check = function(decl) {
18
- return decl.value.indexOf('flex-') === -1 && decl.value !== 'baseline';
20
+ /**
21
+ * Do not prefix flexbox values
22
+ */
23
+ GridRowAlign.prototype.check = function check(decl) {
24
+ return decl.value.indexOf('flex-') === -1 && decl.value !== 'baseline';
19
25
  };
20
26
 
21
- GridRowAlign.prototype.prefixed = function(prop, prefix) {
22
- return prefix + 'grid-row-align';
27
+ /**
28
+ * Change property name for IE
29
+ */
30
+
31
+
32
+ GridRowAlign.prototype.prefixed = function prefixed(prop, prefix) {
33
+ return prefix + 'grid-row-align';
23
34
  };
24
35
 
25
- GridRowAlign.prototype.normalize = function(prop) {
26
- return 'align-self';
36
+ /**
37
+ * Change IE property back
38
+ */
39
+
40
+
41
+ GridRowAlign.prototype.normalize = function normalize() {
42
+ return 'align-self';
27
43
  };
28
44
 
29
45
  return GridRowAlign;
46
+ }(Declaration);
30
47
 
31
- })(Declaration);
48
+ Object.defineProperty(GridRowAlign, 'names', {
49
+ enumerable: true,
50
+ writable: true,
51
+ value: ['grid-row-align']
52
+ });
32
53
 
33
- module.exports = GridRowAlign;
34
54
 
35
- }).call(this);
55
+ module.exports = GridRowAlign;
@@ -1,71 +1,103 @@
1
- (function() {
2
- var Declaration, GridStart,
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
- GridStart = (function(superClass) {
9
- extend(GridStart, 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 GridStart = function (_Declaration) {
12
+ _inherits(GridStart, _Declaration);
10
13
 
11
14
  function GridStart() {
12
- return GridStart.__super__.constructor.apply(this, arguments);
13
- }
15
+ _classCallCheck(this, GridStart);
14
16
 
15
- GridStart.names = ['grid-row-start', 'grid-column-start', 'grid-row', 'grid-column'];
17
+ return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
18
+ }
16
19
 
17
- GridStart.prototype.check = function(decl) {
18
- return decl.value.indexOf('/') === -1 || decl.value.indexOf('span') !== -1;
20
+ /**
21
+ * Do not add prefix for unsupported value in IE
22
+ */
23
+ GridStart.prototype.check = function check(decl) {
24
+ return decl.value.indexOf('/') === -1 || decl.value.indexOf('span') !== -1;
19
25
  };
20
26
 
21
- GridStart.prototype.normalize = function(prop) {
22
- return prop.replace('-start', '');
23
- };
27
+ /**
28
+ * Return a final spec property
29
+ */
24
30
 
25
- GridStart.prototype.prefixed = function(prop, prefix) {
26
- if (prefix === '-ms-') {
27
- return prefix + prop.replace('-start', '');
28
- } else {
29
- return GridStart.__super__.prefixed.call(this, prop, prefix);
30
- }
31
+
32
+ GridStart.prototype.normalize = function normalize(prop) {
33
+ return prop.replace('-start', '');
31
34
  };
32
35
 
33
- GridStart.prototype.insert = function(decl, prefix, prefixes) {
34
- var parts;
35
- parts = this.splitValue(decl, prefix);
36
- if (parts.length === 2) {
37
- decl.cloneBefore({
38
- prop: '-ms-' + decl.prop + '-span',
39
- value: parts[1]
40
- });
41
- }
42
- return GridStart.__super__.insert.call(this, decl, prefix, prefixes);
36
+ /**
37
+ * Change property name for IE
38
+ */
39
+
40
+
41
+ GridStart.prototype.prefixed = function prefixed(prop, prefix) {
42
+ if (prefix === '-ms-') {
43
+ return prefix + prop.replace('-start', '');
44
+ } else {
45
+ return _Declaration.prototype.prefixed.call(this, prop, prefix);
46
+ }
43
47
  };
44
48
 
45
- GridStart.prototype.set = function(decl, prefix) {
46
- var parts;
47
- parts = this.splitValue(decl, prefix);
48
- if (parts.length === 2) {
49
- decl.value = parts[0];
50
- }
51
- return GridStart.__super__.set.call(this, decl, prefix);
49
+ /**
50
+ * Split one value to two
51
+ */
52
+
53
+
54
+ GridStart.prototype.insert = function insert(decl, prefix, prefixes) {
55
+ var parts = this.splitValue(decl, prefix);
56
+ if (parts.length === 2) {
57
+ decl.cloneBefore({
58
+ prop: '-ms-' + decl.prop + '-span',
59
+ value: parts[1]
60
+ });
61
+ }
62
+ return _Declaration.prototype.insert.call(this, decl, prefix, prefixes);
52
63
  };
53
64
 
54
- GridStart.prototype.splitValue = function(decl, prefix) {
55
- var parts;
56
- if (prefix === '-ms-' && decl.prop.indexOf('-start') === -1) {
57
- parts = decl.value.split(/\s*\/\s*span\s+/);
65
+ /**
66
+ * Change value for combine property
67
+ */
68
+
69
+
70
+ GridStart.prototype.set = function set(decl, prefix) {
71
+ var parts = this.splitValue(decl, prefix);
58
72
  if (parts.length === 2) {
59
- return parts;
73
+ decl.value = parts[0];
74
+ }
75
+ return _Declaration.prototype.set.call(this, decl, prefix);
76
+ };
77
+
78
+ /**
79
+ * If property contains start and end
80
+ */
81
+
82
+
83
+ GridStart.prototype.splitValue = function splitValue(decl, prefix) {
84
+ if (prefix === '-ms-' && decl.prop.indexOf('-start') === -1) {
85
+ var parts = decl.value.split(/\s*\/\s*span\s+/);
86
+ if (parts.length === 2) {
87
+ return parts;
88
+ }
60
89
  }
61
- }
62
- return false;
90
+ return false;
63
91
  };
64
92
 
65
93
  return GridStart;
94
+ }(Declaration);
66
95
 
67
- })(Declaration);
96
+ Object.defineProperty(GridStart, 'names', {
97
+ enumerable: true,
98
+ writable: true,
99
+ value: ['grid-row-start', 'grid-column-start', 'grid-row', 'grid-column']
100
+ });
68
101
 
69
- module.exports = GridStart;
70
102
 
71
- }).call(this);
103
+ module.exports = GridStart;
@@ -1,77 +1,113 @@
1
- (function() {
2
- var Declaration, GridTemplate, parser,
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
- parser = require('postcss-value-parser');
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
- GridTemplate = (function(superClass) {
11
- extend(GridTemplate, 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 parser = require('postcss-value-parser');
10
+
11
+ var Declaration = require('../declaration');
12
+
13
+ var GridTemplate = function (_Declaration) {
14
+ _inherits(GridTemplate, _Declaration);
12
15
 
13
16
  function GridTemplate() {
14
- return GridTemplate.__super__.constructor.apply(this, arguments);
15
- }
17
+ _classCallCheck(this, GridTemplate);
16
18
 
17
- GridTemplate.names = ['grid-template-rows', 'grid-template-columns', 'grid-rows', 'grid-columns'];
19
+ return _possibleConstructorReturn(this, _Declaration.apply(this, arguments));
20
+ }
18
21
 
19
- GridTemplate.prototype.prefixed = function(prop, prefix) {
20
- if (prefix === '-ms-') {
21
- return prefix + prop.replace('template-', '');
22
- } else {
23
- return GridTemplate.__super__.prefixed.call(this, prop, prefix);
24
- }
22
+ /**
23
+ * Change property name for IE
24
+ */
25
+ GridTemplate.prototype.prefixed = function prefixed(prop, prefix) {
26
+ if (prefix === '-ms-') {
27
+ return prefix + prop.replace('template-', '');
28
+ } else {
29
+ return _Declaration.prototype.prefixed.call(this, prop, prefix);
30
+ }
25
31
  };
26
32
 
27
- GridTemplate.prototype.normalize = function(prop) {
28
- return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1');
33
+ /**
34
+ * Change IE property back
35
+ */
36
+
37
+
38
+ GridTemplate.prototype.normalize = function normalize(prop) {
39
+ return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1');
29
40
  };
30
41
 
31
- GridTemplate.prototype.walkRepeat = function(node) {
32
- var count, first, fixed, i, j, len, ref;
33
- fixed = [];
34
- ref = node.nodes;
35
- for (j = 0, len = ref.length; j < len; j++) {
36
- i = ref[j];
37
- if (i.nodes) {
38
- this.walkRepeat(i);
39
- }
40
- fixed.push(i);
41
- if (i.type === 'function' && i.value === 'repeat') {
42
- first = i.nodes.shift();
43
- if (first) {
44
- count = first.value;
45
- i.nodes.shift();
46
- i.value = '';
47
- fixed.push({
48
- type: 'word',
49
- value: "[" + count + "]"
50
- });
51
- }
42
+ /**
43
+ * Recursive part of changeRepeat
44
+ */
45
+
46
+
47
+ GridTemplate.prototype.walkRepeat = function walkRepeat(node) {
48
+ var fixed = [];
49
+ for (var _iterator = node.nodes, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
50
+ var _ref;
51
+
52
+ if (_isArray) {
53
+ if (_i >= _iterator.length) break;
54
+ _ref = _iterator[_i++];
55
+ } else {
56
+ _i = _iterator.next();
57
+ if (_i.done) break;
58
+ _ref = _i.value;
59
+ }
60
+
61
+ var i = _ref;
62
+
63
+ if (i.nodes) {
64
+ this.walkRepeat(i);
65
+ }
66
+ fixed.push(i);
67
+ if (i.type === 'function' && i.value === 'repeat') {
68
+ var first = i.nodes.shift();
69
+ if (first) {
70
+ var count = first.value;
71
+ i.nodes.shift();
72
+ i.value = '';
73
+ fixed.push({ type: 'word', value: '[' + count + ']' });
74
+ }
75
+ }
52
76
  }
53
- }
54
- return node.nodes = fixed;
77
+ node.nodes = fixed;
55
78
  };
56
79
 
57
- GridTemplate.prototype.changeRepeat = function(value) {
58
- var ast;
59
- ast = parser(value);
60
- this.walkRepeat(ast);
61
- return ast.toString();
80
+ /**
81
+ * IE repeating syntax
82
+ */
83
+
84
+
85
+ GridTemplate.prototype.changeRepeat = function changeRepeat(value) {
86
+ var ast = parser(value);
87
+ this.walkRepeat(ast);
88
+ return ast.toString();
62
89
  };
63
90
 
64
- GridTemplate.prototype.set = function(decl, prefix) {
65
- if (prefix === '-ms-' && decl.value.indexOf('repeat(') !== -1) {
66
- decl.value = this.changeRepeat(decl.value);
67
- }
68
- return GridTemplate.__super__.set.call(this, decl, prefix);
91
+ /**
92
+ * Change repeating syntax for IE
93
+ */
94
+
95
+
96
+ GridTemplate.prototype.set = function set(decl, prefix) {
97
+ if (prefix === '-ms-' && decl.value.indexOf('repeat(') !== -1) {
98
+ decl.value = this.changeRepeat(decl.value);
99
+ }
100
+ return _Declaration.prototype.set.call(this, decl, prefix);
69
101
  };
70
102
 
71
103
  return GridTemplate;
104
+ }(Declaration);
72
105
 
73
- })(Declaration);
106
+ Object.defineProperty(GridTemplate, 'names', {
107
+ enumerable: true,
108
+ writable: true,
109
+ value: ['grid-template-rows', 'grid-template-columns', 'grid-rows', 'grid-columns']
110
+ });
74
111
 
75
- module.exports = GridTemplate;
76
112
 
77
- }).call(this);
113
+ module.exports = GridTemplate;