autoprefixer 6.2.1 → 6.3.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## 6.3.1
2
+ * Fix compatibility with Flexibility polyfill.
3
+
4
+ ## 6.3 “Pro rege et lege”
5
+ * Add Grid Layout support.
6
+ * Add `text-spacing` support.
7
+ * Add `> 10% in my stats` browsers query with custom usage statistics.
8
+ * Add options to disable `@supports`, Flexbox or Grid support.
9
+ * Fix compatibility with other PostCSS plugins.
10
+
11
+ ## 6.2.3
12
+ * Fix error on broken transition with double comma.
13
+
14
+ ## 6.2.2
15
+ * Fix issues in broken transitions.
16
+
1
17
  ## 6.2.1
2
18
  * Fix AST error in transition warning (by @jvdanilo).
3
19
 
package/README.md CHANGED
@@ -446,7 +446,16 @@ a {
446
446
  If some prefixes were generated in a wrong way,
447
447
  please create an issue on GitHub.
448
448
 
449
- But if you do not need Autoprefixer in some part of your CSS,
449
+ Autoprefixer has 4 features, which can be disabled by options:
450
+
451
+ * `supports: false` will disable `@supports` parameters prefixing.
452
+ * `flexbox: false` will disabled flexbox properties prefixing.
453
+ Or `flexbox: "no-2009"` will add prefixes only for final and IE
454
+ versions of specification.
455
+ * `grid: false` will disable Grid Layout prefixes for IE.
456
+ * `remove: false` will disabled cleaning outdated prefixes.
457
+
458
+ If you do not need Autoprefixer in some part of your CSS,
450
459
  you can use control comments to disable Autoprefixer.
451
460
 
452
461
  ```css
@@ -496,13 +505,23 @@ There are 4 options:
496
505
  * `add` (boolean): should Autoprefixer add prefixes. Default is `true`.
497
506
  * `remove` (boolean): should Autoprefixer [remove outdated] prefixes.
498
507
  Default is `true`.
508
+ * `supports` (boolean): should Autoprefixer add prefixes for `@supports`
509
+ parameters. Default is `true`.
510
+ * `flexbox` (boolean|string): should Autoprefixer add prefixes for flexbox
511
+ properties. With `"no-2009"` value Autoprefixer will add prefixes only
512
+ for final and IE versions of specification. Default is `true`.
513
+ * `grid` (boolean): should Autoprefixer add IE prefixes for Grid Layout
514
+ properties. Default is `true`.
515
+ * `stats` (object): custom [usage statistics] for `> 10% in my stats`
516
+ browsers query.
499
517
 
500
518
  Plugin object has `info()` method for debugging purpose.
501
519
 
502
520
  You can use PostCSS processor to process several CSS files
503
521
  to increase performance.
504
522
 
505
- [PostCSS API]: https://github.com/postcss/postcss/blob/master/docs/api.md
523
+ [usage statistics]: https://github.com/ai/browserslist#custom-usage-data
524
+ [PostCSS API]: https://github.com/postcss/postcss/blob/master/docs/api.md
506
525
 
507
526
  ## Debug
508
527
 
package/data/prefixes.js CHANGED
@@ -512,4 +512,20 @@
512
512
  });
513
513
  });
514
514
 
515
+ feature(require('caniuse-db/features-json/css-grid.json'), function(browsers) {
516
+ prefix('grid', 'inline-grid', {
517
+ props: ['display'],
518
+ browsers: browsers
519
+ });
520
+ return prefix('grid-template-columns', 'grid-template-rows', 'grid-template-columns', 'grid-column', 'grid-row', 'grid-column-end', 'grid-row-end', 'grid-column-start', 'grid-row-start', 'justify-items', 'grid-row-align', {
521
+ browsers: browsers
522
+ });
523
+ });
524
+
525
+ feature(require('caniuse-db/features-json/css-text-spacing.json'), function(browsers) {
526
+ return prefix('text-spacing', {
527
+ browsers: browsers
528
+ });
529
+ });
530
+
515
531
  }).call(this);
@@ -48,9 +48,10 @@
48
48
  reqs = options.browsers;
49
49
  }
50
50
  loadPrefixes = function(opts) {
51
- var browsers, key;
52
- browsers = new Browsers(module.exports.data.browsers, reqs, opts);
53
- key = browsers.selected.join(', ') + options.cascade;
51
+ var browsers, key, stats;
52
+ stats = options.stats;
53
+ browsers = new Browsers(module.exports.data.browsers, reqs, opts, stats);
54
+ key = browsers.selected.join(', ') + JSON.stringify(options);
54
55
  return cache[key] || (cache[key] = new Prefixes(module.exports.data.prefixes, browsers, options));
55
56
  };
56
57
  plugin = function(css, result) {
package/lib/browsers.js CHANGED
@@ -32,16 +32,18 @@
32
32
  return this.prefixesRegexp.test(value);
33
33
  };
34
34
 
35
- function Browsers(data1, requirements, options) {
35
+ function Browsers(data1, requirements, options, stats) {
36
36
  this.data = data1;
37
37
  this.options = options;
38
+ this.stats = stats;
38
39
  this.selected = this.parse(requirements);
39
40
  }
40
41
 
41
42
  Browsers.prototype.parse = function(requirements) {
42
43
  var ref;
43
44
  return browserslist(requirements, {
44
- path: (ref = this.options) != null ? ref.from : void 0
45
+ path: (ref = this.options) != null ? ref.from : void 0,
46
+ stats: this.stats
45
47
  });
46
48
  };
47
49
 
@@ -112,16 +112,21 @@
112
112
  return decl.parent.insertBefore(decl, cloned);
113
113
  };
114
114
 
115
- Declaration.prototype.add = function(decl, prefix, prefixes) {
116
- var already, prefixed;
117
- prefixed = this.prefixed(decl.prop, prefix);
115
+ Declaration.prototype.isAlready = function(decl, prefixed) {
116
+ var already;
118
117
  already = this.all.group(decl).up(function(i) {
119
118
  return i.prop === prefixed;
120
119
  });
121
120
  already || (already = this.all.group(decl).down(function(i) {
122
121
  return i.prop === prefixed;
123
122
  }));
124
- if (already || this.otherPrefixes(decl.value, prefix)) {
123
+ return already;
124
+ };
125
+
126
+ Declaration.prototype.add = function(decl, prefix, prefixes) {
127
+ var prefixed;
128
+ prefixed = this.prefixed(decl.prop, prefix);
129
+ if (this.isAlready(decl, prefixed) || this.otherPrefixes(decl.value, prefix)) {
125
130
  return;
126
131
  }
127
132
  return this.insert(decl, prefix, prefixes);
@@ -38,7 +38,7 @@
38
38
  }
39
39
 
40
40
  DisplayFlex.prototype.check = function(decl) {
41
- return decl.value === this.name;
41
+ return decl.prop === 'display' && decl.value === this.name;
42
42
  };
43
43
 
44
44
  DisplayFlex.prototype.prefixed = function(prefix) {
@@ -0,0 +1,46 @@
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;
5
+
6
+ Declaration = require('../declaration');
7
+
8
+ GridEnd = (function(superClass) {
9
+ extend(GridEnd, superClass);
10
+
11
+ function GridEnd() {
12
+ return GridEnd.__super__.constructor.apply(this, arguments);
13
+ }
14
+
15
+ GridEnd.names = ['grid-row-end', 'grid-column-end', 'grid-row-span', 'grid-column-span'];
16
+
17
+ GridEnd.prototype.check = function(decl) {
18
+ return decl.value.indexOf('span') !== -1;
19
+ };
20
+
21
+ GridEnd.prototype.normalize = function(prop) {
22
+ return prop.replace(/(-span|-end)/, '');
23
+ };
24
+
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
+ }
31
+ };
32
+
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);
38
+ };
39
+
40
+ return GridEnd;
41
+
42
+ })(Declaration);
43
+
44
+ module.exports = GridEnd;
45
+
46
+ }).call(this);
@@ -0,0 +1,31 @@
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;
5
+
6
+ Declaration = require('../declaration');
7
+
8
+ GridRowAlign = (function(superClass) {
9
+ extend(GridRowAlign, superClass);
10
+
11
+ function GridRowAlign() {
12
+ return GridRowAlign.__super__.constructor.apply(this, arguments);
13
+ }
14
+
15
+ GridRowAlign.names = ['grid-row-align'];
16
+
17
+ GridRowAlign.prototype.prefixed = function(prop, prefix) {
18
+ return prefix + 'grid-row-align';
19
+ };
20
+
21
+ GridRowAlign.prototype.normalize = function(prop) {
22
+ return 'align-items';
23
+ };
24
+
25
+ return GridRowAlign;
26
+
27
+ })(Declaration);
28
+
29
+ module.exports = GridRowAlign;
30
+
31
+ }).call(this);
@@ -0,0 +1,71 @@
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;
5
+
6
+ Declaration = require('../declaration');
7
+
8
+ GridStart = (function(superClass) {
9
+ extend(GridStart, superClass);
10
+
11
+ function GridStart() {
12
+ return GridStart.__super__.constructor.apply(this, arguments);
13
+ }
14
+
15
+ GridStart.names = ['grid-row-start', 'grid-column-start', 'grid-row', 'grid-column'];
16
+
17
+ GridStart.prototype.check = function(decl) {
18
+ return decl.value.indexOf('/') === -1 || decl.value.indexOf('span') !== -1;
19
+ };
20
+
21
+ GridStart.prototype.normalize = function(prop) {
22
+ return prop.replace('-start', '');
23
+ };
24
+
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
+
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);
43
+ };
44
+
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);
52
+ };
53
+
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+/);
58
+ if (parts.length === 2) {
59
+ return parts;
60
+ }
61
+ }
62
+ return false;
63
+ };
64
+
65
+ return GridStart;
66
+
67
+ })(Declaration);
68
+
69
+ module.exports = GridStart;
70
+
71
+ }).call(this);
@@ -0,0 +1,77 @@
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;
5
+
6
+ parser = require('postcss-value-parser');
7
+
8
+ Declaration = require('../declaration');
9
+
10
+ GridTemplate = (function(superClass) {
11
+ extend(GridTemplate, superClass);
12
+
13
+ function GridTemplate() {
14
+ return GridTemplate.__super__.constructor.apply(this, arguments);
15
+ }
16
+
17
+ GridTemplate.names = ['grid-template-rows', 'grid-template-columns', 'grid-rows', 'grid-columns'];
18
+
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
+ }
25
+ };
26
+
27
+ GridTemplate.prototype.normalize = function(prop) {
28
+ return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1');
29
+ };
30
+
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
+ }
52
+ }
53
+ }
54
+ return node.nodes = fixed;
55
+ };
56
+
57
+ GridTemplate.prototype.changeRepeat = function(value) {
58
+ var ast;
59
+ ast = parser(value);
60
+ this.walkRepeat(ast);
61
+ return ast.toString();
62
+ };
63
+
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);
69
+ };
70
+
71
+ return GridTemplate;
72
+
73
+ })(Declaration);
74
+
75
+ module.exports = GridTemplate;
76
+
77
+ }).call(this);
@@ -0,0 +1,31 @@
1
+ (function() {
2
+ var Declaration, JustifyItems,
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;
5
+
6
+ Declaration = require('../declaration');
7
+
8
+ JustifyItems = (function(superClass) {
9
+ extend(JustifyItems, superClass);
10
+
11
+ function JustifyItems() {
12
+ return JustifyItems.__super__.constructor.apply(this, arguments);
13
+ }
14
+
15
+ JustifyItems.names = ['justify-items', 'grid-column-align'];
16
+
17
+ JustifyItems.prototype.prefixed = function(prop, prefix) {
18
+ return prefix + (prefix === '-ms-' ? 'grid-column-align' : prop);
19
+ };
20
+
21
+ JustifyItems.prototype.normalize = function(prop) {
22
+ return 'justify-items';
23
+ };
24
+
25
+ return JustifyItems;
26
+
27
+ })(Declaration);
28
+
29
+ module.exports = JustifyItems;
30
+
31
+ }).call(this);
package/lib/prefixes.js CHANGED
@@ -33,12 +33,16 @@
33
33
 
34
34
  Declaration.hack(require('./hacks/filter'));
35
35
 
36
+ Declaration.hack(require('./hacks/grid-end'));
37
+
36
38
  Declaration.hack(require('./hacks/flex-flow'));
37
39
 
38
40
  Declaration.hack(require('./hacks/flex-grow'));
39
41
 
40
42
  Declaration.hack(require('./hacks/flex-wrap'));
41
43
 
44
+ Declaration.hack(require('./hacks/grid-start'));
45
+
42
46
  Declaration.hack(require('./hacks/align-self'));
43
47
 
44
48
  Declaration.hack(require('./hacks/flex-basis'));
@@ -55,14 +59,20 @@
55
59
 
56
60
  Declaration.hack(require('./hacks/border-image'));
57
61
 
62
+ Declaration.hack(require('./hacks/justify-items'));
63
+
58
64
  Declaration.hack(require('./hacks/align-content'));
59
65
 
60
66
  Declaration.hack(require('./hacks/border-radius'));
61
67
 
62
68
  Declaration.hack(require('./hacks/block-logical'));
63
69
 
70
+ Declaration.hack(require('./hacks/grid-template'));
71
+
64
72
  Declaration.hack(require('./hacks/inline-logical'));
65
73
 
74
+ Declaration.hack(require('./hacks/grid-row-align'));
75
+
66
76
  Declaration.hack(require('./hacks/transform-decl'));
67
77
 
68
78
  Declaration.hack(require('./hacks/flex-direction'));
@@ -157,6 +167,11 @@
157
167
  };
158
168
  })(this));
159
169
  add = this.sort(utils.uniq(add));
170
+ if (this.options.flexbox === 'no-2009') {
171
+ add = add.filter(function(i) {
172
+ return i.indexOf('2009') === -1;
173
+ });
174
+ }
160
175
  all = data.browsers.map((function(_this) {
161
176
  return function(i) {
162
177
  return _this.browsers.prefix(i);
@@ -301,7 +316,10 @@
301
316
  };
302
317
 
303
318
  Prefixes.prototype.unprefixed = function(prop) {
304
- prop = vendor.unprefixed(prop);
319
+ return this.normalize(vendor.unprefixed(prop));
320
+ };
321
+
322
+ Prefixes.prototype.normalize = function(prop) {
305
323
  return this.decl(prop).normalize(prop);
306
324
  };
307
325
 
package/lib/processor.js CHANGED
@@ -31,7 +31,7 @@
31
31
  return viewport != null ? viewport.process(rule) : void 0;
32
32
  }
33
33
  } else if (rule.name === 'supports') {
34
- if (!_this.disabled(rule)) {
34
+ if (_this.prefixes.options.supports !== false && !_this.disabled(rule)) {
35
35
  return supports.process(rule);
36
36
  }
37
37
  } else if (rule.name === 'media' && rule.params.indexOf('-resolution') !== -1) {
@@ -58,7 +58,7 @@
58
58
  })(this));
59
59
  css.walkDecls((function(_this) {
60
60
  return function(decl) {
61
- var prefixer;
61
+ var display, prefixer;
62
62
  if (_this.disabled(decl)) {
63
63
  return;
64
64
  }
@@ -87,8 +87,36 @@
87
87
  node: decl
88
88
  });
89
89
  }
90
+ if (_this.prefixes.options.flexbox !== false) {
91
+ if (decl.prop === 'grid-row-end' && decl.value.indexOf('span') === -1) {
92
+ result.warn('IE supports only grid-row-end with span. ' + 'You should add grid: false option to Autoprefixer ' + 'and use some JS grid polyfill for full spec support', {
93
+ node: decl
94
+ });
95
+ }
96
+ if (decl.prop === 'grid-row') {
97
+ if (decl.value.indexOf('/') !== -1 && decl.value.indexOf('span') === -1) {
98
+ result.warn('IE supports only grid-row with / and span. ' + 'You should add grid: false option to Autoprefixer ' + 'and use some JS grid polyfill for full spec support', {
99
+ node: decl
100
+ });
101
+ }
102
+ }
103
+ }
90
104
  if (decl.prop === 'transition' || decl.prop === 'transition-property') {
91
105
  return _this.prefixes.transition.add(decl, result);
106
+ } else if (decl.prop === 'align-items') {
107
+ display = _this.displayType(decl);
108
+ if (display !== 'grid' && _this.prefixes.options.flexbox !== false) {
109
+ prefixer = _this.prefixes.add['align-items'];
110
+ if (prefixer && prefixer.prefixes) {
111
+ prefixer.process(decl);
112
+ }
113
+ }
114
+ if (display !== 'flex' && _this.prefixes.options.grid !== false) {
115
+ prefixer = _this.prefixes.add['grid-row-align'];
116
+ if (prefixer && prefixer.prefixes) {
117
+ return prefixer.process(decl);
118
+ }
119
+ }
92
120
  } else {
93
121
  prefixer = _this.prefixes.add[decl.prop];
94
122
  if (prefixer && prefixer.prefixes) {
@@ -154,7 +182,7 @@
154
182
  }
155
183
  if ((ref1 = _this.prefixes.remove[decl.prop]) != null ? ref1.remove : void 0) {
156
184
  notHack = _this.prefixes.group(decl).down(function(other) {
157
- return other.prop === unprefixed;
185
+ return _this.prefixes.normalize(other.prop) === unprefixed;
158
186
  });
159
187
  if (notHack && !_this.withHackValue(decl)) {
160
188
  if (decl.raw('before').indexOf("\n") > -1) {
@@ -190,7 +218,24 @@
190
218
  };
191
219
 
192
220
  Processor.prototype.disabled = function(node) {
193
- var status;
221
+ var other, status;
222
+ if (this.prefixes.options.grid === false && node.type === 'decl') {
223
+ if (node.prop === 'display' && node.value.indexOf('grid') !== -1) {
224
+ return true;
225
+ }
226
+ if (node.prop.indexOf('grid') !== -1 || node.prop === 'justify-items') {
227
+ return true;
228
+ }
229
+ }
230
+ if (this.prefixes.options.flexbox === false && node.type === 'decl') {
231
+ if (node.prop === 'display' && node.value.indexOf('flex') !== -1) {
232
+ return true;
233
+ }
234
+ other = ['order', 'justify-content', 'align-self', 'align-content'];
235
+ if (node.prop.indexOf('flex') !== -1 || other.indexOf(node.prop) !== -1) {
236
+ return true;
237
+ }
238
+ }
194
239
  if (node._autoprefixerDisabled != null) {
195
240
  return node._autoprefixerDisabled;
196
241
  } else if (node.nodes) {
@@ -241,6 +286,22 @@
241
286
  });
242
287
  };
243
288
 
289
+ Processor.prototype.displayType = function(decl) {
290
+ var i, j, len, ref;
291
+ ref = decl.parent.nodes;
292
+ for (j = 0, len = ref.length; j < len; j++) {
293
+ i = ref[j];
294
+ if (i.prop === 'display') {
295
+ if (i.value.indexOf('flex') !== -1) {
296
+ return 'flex';
297
+ } else if (i.value.indexOf('grid') !== -1) {
298
+ return 'grid';
299
+ }
300
+ }
301
+ }
302
+ return false;
303
+ };
304
+
244
305
  return Processor;
245
306
 
246
307
  })();
package/lib/transition.js CHANGED
@@ -40,7 +40,9 @@
40
40
  prefix = ref1[k];
41
41
  prefixed = this.prefixes.prefixed(prop, prefix);
42
42
  if (prefixed !== '-ms-transform' && names.indexOf(prefixed) === -1) {
43
- added.push(this.clone(prefixed, param));
43
+ if (!this.disabled(prop, prefix)) {
44
+ added.push(this.clone(prefixed, param));
45
+ }
44
46
  }
45
47
  }
46
48
  }
@@ -145,7 +147,9 @@
145
147
  }
146
148
  }
147
149
  result.push(param);
148
- return result;
150
+ return result.filter(function(i) {
151
+ return i.length > 0;
152
+ });
149
153
  };
150
154
 
151
155
  Transition.prototype.stringify = function(params) {
@@ -235,6 +239,18 @@
235
239
  return result;
236
240
  };
237
241
 
242
+ Transition.prototype.disabled = function(prop, prefix) {
243
+ var other;
244
+ other = ['order', 'justify-content', 'align-self', 'align-content'];
245
+ if (prop.indexOf('flex') !== -1 || other.indexOf(prop) !== -1) {
246
+ if (this.prefixes.options.flexbox === false) {
247
+ return true;
248
+ } else if (this.prefixes.options.flexbox === 'no-2009') {
249
+ return prefix.indexOf('2009') !== -1;
250
+ }
251
+ }
252
+ };
253
+
238
254
  return Transition;
239
255
 
240
256
  })();
package/lib/value.js CHANGED
@@ -77,10 +77,18 @@
77
77
  return string.replace(this.regexp(), '$1' + prefix + '$2');
78
78
  };
79
79
 
80
+ Value.prototype.value = function(decl) {
81
+ if (decl.raws.value && decl.raws.value.value === decl.value) {
82
+ return decl.raws.value.raw;
83
+ } else {
84
+ return decl.value;
85
+ }
86
+ };
87
+
80
88
  Value.prototype.add = function(decl, prefix) {
81
- var ref, value;
89
+ var value;
82
90
  decl._autoprefixerValues || (decl._autoprefixerValues = {});
83
- value = decl._autoprefixerValues[prefix] || ((ref = decl.raws.value) != null ? ref.raw : void 0) || decl.value;
91
+ value = decl._autoprefixerValues[prefix] || this.value(decl);
84
92
  value = this.replace(value, prefix);
85
93
  if (value) {
86
94
  return decl._autoprefixerValues[prefix] = value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autoprefixer",
3
- "version": "6.2.1",
3
+ "version": "6.3.1",
4
4
  "description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
5
5
  "keywords": [
6
6
  "autoprefixer",
@@ -16,9 +16,9 @@
16
16
  "postcss-value-parser": "^3.2.3",
17
17
  "normalize-range": "^0.1.2",
18
18
  "num2fraction": "^1.2.2",
19
- "browserslist": "~1.0.1",
20
- "caniuse-db": "^1.0.30000379",
21
- "postcss": "^5.0.13"
19
+ "browserslist": "~1.1.1",
20
+ "caniuse-db": "^1.0.30000387",
21
+ "postcss": "^5.0.14"
22
22
  },
23
23
  "devDependencies": {
24
24
  "vinyl-source-stream": "1.1.0",
@@ -27,9 +27,9 @@
27
27
  "gulp-eslint": "1.1.1",
28
28
  "gulp-coffee": "2.3.1",
29
29
  "gulp-mocha": "2.2.0",
30
- "browserify": "12.0.1",
31
- "fs-extra": "0.26.3",
32
- "should": "8.0.2",
30
+ "browserify": "13.0.0",
31
+ "fs-extra": "0.26.4",
32
+ "should": "8.1.1",
33
33
  "mocha": "2.3.4",
34
34
  "gulp": "3.9.0",
35
35
  "coffee-script": "1.10.0"