autoprefixer 9.3.1 → 9.4.3

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 (44) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +501 -89
  3. package/lib/at-rule.js +2 -2
  4. package/lib/browsers.js +6 -6
  5. package/lib/declaration.js +26 -26
  6. package/lib/hacks/align-content.js +4 -4
  7. package/lib/hacks/align-items.js +4 -4
  8. package/lib/hacks/align-self.js +14 -8
  9. package/lib/hacks/block-logical.js +2 -2
  10. package/lib/hacks/border-radius.js +2 -2
  11. package/lib/hacks/break-props.js +6 -6
  12. package/lib/hacks/color-adjust.js +2 -2
  13. package/lib/hacks/display-flex.js +6 -6
  14. package/lib/hacks/flex-basis.js +4 -4
  15. package/lib/hacks/flex-direction.js +4 -4
  16. package/lib/hacks/flex-grow.js +2 -2
  17. package/lib/hacks/flex-shrink.js +4 -4
  18. package/lib/hacks/flex.js +4 -4
  19. package/lib/hacks/gradient.js +32 -32
  20. package/lib/hacks/grid-column-align.js +4 -4
  21. package/lib/hacks/grid-row-align.js +4 -4
  22. package/lib/hacks/grid-rows-columns.js +93 -11
  23. package/lib/hacks/grid-start.js +4 -4
  24. package/lib/hacks/grid-template-areas.js +14 -62
  25. package/lib/hacks/grid-utils.js +129 -3
  26. package/lib/hacks/image-rendering.js +8 -8
  27. package/lib/hacks/inline-logical.js +2 -2
  28. package/lib/hacks/justify-content.js +4 -4
  29. package/lib/hacks/mask-border.js +2 -2
  30. package/lib/hacks/order.js +4 -4
  31. package/lib/hacks/overscroll-behavior.js +4 -4
  32. package/lib/hacks/pixelated.js +2 -2
  33. package/lib/hacks/placeholder.js +2 -2
  34. package/lib/hacks/transform-decl.js +6 -6
  35. package/lib/old-selector.js +2 -2
  36. package/lib/prefixer.js +8 -8
  37. package/lib/prefixes.js +18 -18
  38. package/lib/processor.js +88 -21
  39. package/lib/resolution.js +6 -6
  40. package/lib/selector.js +16 -16
  41. package/lib/supports.js +30 -30
  42. package/lib/transition.js +22 -22
  43. package/lib/value.js +12 -12
  44. package/package.json +4 -4
package/lib/selector.js CHANGED
@@ -37,19 +37,19 @@ function (_Prefixer) {
37
37
  }
38
38
 
39
39
  return false;
40
- };
40
+ }
41
41
  /**
42
42
  * Return prefixed version of selector
43
43
  */
44
-
44
+ ;
45
45
 
46
46
  _proto.prefixed = function prefixed(prefix) {
47
47
  return this.name.replace(/^([^\w]*)/, "$1" + prefix);
48
- };
48
+ }
49
49
  /**
50
50
  * Lazy loadRegExp for name
51
51
  */
52
-
52
+ ;
53
53
 
54
54
  _proto.regexp = function regexp(prefix) {
55
55
  if (this.regexpCache[prefix]) {
@@ -59,19 +59,19 @@ function (_Prefixer) {
59
59
  var name = prefix ? this.prefixed(prefix) : this.name;
60
60
  this.regexpCache[prefix] = new RegExp("(^|[^:\"'=])" + utils.escapeRegexp(name), 'gi');
61
61
  return this.regexpCache[prefix];
62
- };
62
+ }
63
63
  /**
64
64
  * All possible prefixes
65
65
  */
66
-
66
+ ;
67
67
 
68
68
  _proto.possible = function possible() {
69
69
  return Browsers.prefixes();
70
- };
70
+ }
71
71
  /**
72
72
  * Return all possible selector prefixes
73
73
  */
74
-
74
+ ;
75
75
 
76
76
  _proto.prefixeds = function prefixeds(rule) {
77
77
  if (rule._autoprefixerPrefixeds) {
@@ -98,11 +98,11 @@ function (_Prefixer) {
98
98
 
99
99
  rule._autoprefixerPrefixeds = prefixeds;
100
100
  return rule._autoprefixerPrefixeds;
101
- };
101
+ }
102
102
  /**
103
103
  * Is rule already prefixed before
104
104
  */
105
-
105
+ ;
106
106
 
107
107
  _proto.already = function already(rule, prefixeds, prefix) {
108
108
  var index = rule.parent.index(rule) - 1;
@@ -137,19 +137,19 @@ function (_Prefixer) {
137
137
  }
138
138
 
139
139
  return false;
140
- };
140
+ }
141
141
  /**
142
142
  * Replace selectors by prefixed one
143
143
  */
144
-
144
+ ;
145
145
 
146
146
  _proto.replace = function replace(selector, prefix) {
147
147
  return selector.replace(this.regexp(), "$1" + this.prefixed(prefix));
148
- };
148
+ }
149
149
  /**
150
150
  * Clone and add prefixes for at-rule
151
151
  */
152
-
152
+ ;
153
153
 
154
154
  _proto.add = function add(rule, prefix) {
155
155
  var prefixeds = this.prefixeds(rule);
@@ -162,11 +162,11 @@ function (_Prefixer) {
162
162
  selector: prefixeds[prefix]
163
163
  });
164
164
  rule.parent.insertBefore(rule, cloned);
165
- };
165
+ }
166
166
  /**
167
167
  * Return function to fast find prefixed selector
168
168
  */
169
-
169
+ ;
170
170
 
171
171
  _proto.old = function old(prefix) {
172
172
  return new OldSelector(this, prefix);
package/lib/supports.js CHANGED
@@ -51,11 +51,11 @@ function () {
51
51
  var browsers = new Browsers(this.all.browsers.data, filtered, this.all.options);
52
52
  this.prefixerCache = new this.Prefixes(this.all.data, browsers, this.all.options);
53
53
  return this.prefixerCache;
54
- };
54
+ }
55
55
  /**
56
56
  * Parse string into declaration property and value
57
57
  */
58
-
58
+ ;
59
59
 
60
60
  _proto.parse = function parse(str) {
61
61
  var parts = str.split(':');
@@ -63,11 +63,11 @@ function () {
63
63
  var value = parts[1];
64
64
  if (!value) value = '';
65
65
  return [prop.trim(), value.trim()];
66
- };
66
+ }
67
67
  /**
68
68
  * Create virtual rule to process it by prefixer
69
69
  */
70
-
70
+ ;
71
71
 
72
72
  _proto.virtual = function virtual(str) {
73
73
  var _this$parse = this.parse(str),
@@ -83,11 +83,11 @@ function () {
83
83
  }
84
84
  });
85
85
  return rule;
86
- };
86
+ }
87
87
  /**
88
88
  * Return array of Declaration with all necessary prefixes
89
89
  */
90
-
90
+ ;
91
91
 
92
92
  _proto.prefixed = function prefixed(str) {
93
93
  var rule = this.virtual(str);
@@ -138,44 +138,44 @@ function () {
138
138
  }
139
139
 
140
140
  return rule.nodes;
141
- };
141
+ }
142
142
  /**
143
143
  * Return true if brackets node is "not" word
144
144
  */
145
-
145
+ ;
146
146
 
147
147
  _proto.isNot = function isNot(node) {
148
148
  return typeof node === 'string' && /not\s*/i.test(node);
149
- };
149
+ }
150
150
  /**
151
151
  * Return true if brackets node is "or" word
152
152
  */
153
-
153
+ ;
154
154
 
155
155
  _proto.isOr = function isOr(node) {
156
156
  return typeof node === 'string' && /\s*or\s*/i.test(node);
157
- };
157
+ }
158
158
  /**
159
159
  * Return true if brackets node is (prop: value)
160
160
  */
161
-
161
+ ;
162
162
 
163
163
  _proto.isProp = function isProp(node) {
164
164
  return typeof node === 'object' && node.length === 1 && typeof node[0] === 'string';
165
- };
165
+ }
166
166
  /**
167
167
  * Return true if prefixed property has no unprefixed
168
168
  */
169
-
169
+ ;
170
170
 
171
171
  _proto.isHack = function isHack(all, unprefixed) {
172
172
  var check = new RegExp("(\\(|\\s)" + utils.escapeRegexp(unprefixed) + ":");
173
173
  return !check.test(all);
174
- };
174
+ }
175
175
  /**
176
176
  * Return true if we need to remove node
177
177
  */
178
-
178
+ ;
179
179
 
180
180
  _proto.toRemove = function toRemove(str, all) {
181
181
  var _this$parse2 = this.parse(str),
@@ -209,11 +209,11 @@ function () {
209
209
  }
210
210
 
211
211
  return false;
212
- };
212
+ }
213
213
  /**
214
214
  * Remove all unnecessary prefixes
215
215
  */
216
-
216
+ ;
217
217
 
218
218
  _proto.remove = function remove(nodes, all) {
219
219
  var i = 0;
@@ -237,11 +237,11 @@ function () {
237
237
  }
238
238
 
239
239
  return nodes;
240
- };
240
+ }
241
241
  /**
242
242
  * Clean brackets with one child
243
243
  */
244
-
244
+ ;
245
245
 
246
246
  _proto.cleanBrackets = function cleanBrackets(nodes) {
247
247
  var _this = this;
@@ -257,11 +257,11 @@ function () {
257
257
 
258
258
  return _this.cleanBrackets(i);
259
259
  });
260
- };
260
+ }
261
261
  /**
262
262
  * Add " or " between properties and convert it to brackets format
263
263
  */
264
-
264
+ ;
265
265
 
266
266
  _proto.convert = function convert(progress) {
267
267
  var result = [''];
@@ -285,11 +285,11 @@ function () {
285
285
 
286
286
  result[result.length - 1] = '';
287
287
  return result;
288
- };
288
+ }
289
289
  /**
290
290
  * Compress value functions into a string nodes
291
291
  */
292
-
292
+ ;
293
293
 
294
294
  _proto.normalize = function normalize(nodes) {
295
295
  var _this2 = this;
@@ -309,11 +309,11 @@ function () {
309
309
  return nodes.map(function (i) {
310
310
  return _this2.normalize(i);
311
311
  });
312
- };
312
+ }
313
313
  /**
314
314
  * Add prefixes
315
315
  */
316
-
316
+ ;
317
317
 
318
318
  _proto.add = function add(nodes, all) {
319
319
  var _this3 = this;
@@ -335,11 +335,11 @@ function () {
335
335
 
336
336
  return i;
337
337
  });
338
- };
338
+ }
339
339
  /**
340
340
  * Add prefixed declaration
341
341
  */
342
-
342
+ ;
343
343
 
344
344
  _proto.process = function process(rule) {
345
345
  var ast = brackets.parse(rule.params);
@@ -348,11 +348,11 @@ function () {
348
348
  ast = this.add(ast, rule.params);
349
349
  ast = this.cleanBrackets(ast);
350
350
  rule.params = brackets.stringify(ast);
351
- };
351
+ }
352
352
  /**
353
353
  * Check global options
354
354
  */
355
-
355
+ ;
356
356
 
357
357
  _proto.disabled = function disabled(node) {
358
358
  if (!this.all.options.grid) {
package/lib/transition.js CHANGED
@@ -115,11 +115,11 @@ function () {
115
115
  decl.cloneBefore();
116
116
  decl.value = value;
117
117
  }
118
- };
118
+ }
119
119
  /**
120
120
  * Find property name
121
121
  */
122
-
122
+ ;
123
123
 
124
124
  _proto.findProp = function findProp(param) {
125
125
  var prop = param[0].value;
@@ -135,21 +135,21 @@ function () {
135
135
  }
136
136
 
137
137
  return prop;
138
- };
138
+ }
139
139
  /**
140
140
  * Does we already have this declaration
141
141
  */
142
-
142
+ ;
143
143
 
144
144
  _proto.already = function already(decl, prop, value) {
145
145
  return decl.parent.some(function (i) {
146
146
  return i.prop === prop && i.value === value;
147
147
  });
148
- };
148
+ }
149
149
  /**
150
150
  * Add declaration if it is not exist
151
151
  */
152
-
152
+ ;
153
153
 
154
154
  _proto.cloneBefore = function cloneBefore(decl, prop, value) {
155
155
  if (!this.already(decl, prop, value)) {
@@ -158,11 +158,11 @@ function () {
158
158
  value: value
159
159
  });
160
160
  }
161
- };
161
+ }
162
162
  /**
163
163
  * Show transition-property warning
164
164
  */
165
-
165
+ ;
166
166
 
167
167
  _proto.checkForWarning = function checkForWarning(result, decl) {
168
168
  if (decl.prop !== 'transition-property') {
@@ -188,11 +188,11 @@ function () {
188
188
 
189
189
  return false;
190
190
  });
191
- };
191
+ }
192
192
  /**
193
193
  * Process transition and remove all unnecessary properties
194
194
  */
195
-
195
+ ;
196
196
 
197
197
  _proto.remove = function remove(decl) {
198
198
  var _this2 = this;
@@ -227,11 +227,11 @@ function () {
227
227
  }
228
228
 
229
229
  decl.value = value;
230
- };
230
+ }
231
231
  /**
232
232
  * Parse properties list to array
233
233
  */
234
-
234
+ ;
235
235
 
236
236
  _proto.parse = function parse(value) {
237
237
  var ast = parser(value);
@@ -263,11 +263,11 @@ function () {
263
263
  return result.filter(function (i) {
264
264
  return i.length > 0;
265
265
  });
266
- };
266
+ }
267
267
  /**
268
268
  * Return properties string from array
269
269
  */
270
-
270
+ ;
271
271
 
272
272
  _proto.stringify = function stringify(params) {
273
273
  if (params.length === 0) {
@@ -308,11 +308,11 @@ function () {
308
308
  return parser.stringify({
309
309
  nodes: nodes
310
310
  });
311
- };
311
+ }
312
312
  /**
313
313
  * Return new param array with different name
314
314
  */
315
-
315
+ ;
316
316
 
317
317
  _proto.clone = function clone(origin, name, param) {
318
318
  var result = [];
@@ -344,11 +344,11 @@ function () {
344
344
  }
345
345
 
346
346
  return result;
347
- };
347
+ }
348
348
  /**
349
349
  * Find or create separator
350
350
  */
351
-
351
+ ;
352
352
 
353
353
  _proto.div = function div(params) {
354
354
  for (var _iterator7 = params, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) {
@@ -399,11 +399,11 @@ function () {
399
399
  var current = vendor.prefix(_this3.findProp(param));
400
400
  return current === '' || current === prefix;
401
401
  });
402
- };
402
+ }
403
403
  /**
404
404
  * Remove all non-webkit prefixes and unprefixed params if we have prefixed
405
405
  */
406
-
406
+ ;
407
407
 
408
408
  _proto.cleanFromUnprefixed = function cleanFromUnprefixed(params, prefix) {
409
409
  var _this4 = this;
@@ -439,11 +439,11 @@ function () {
439
439
  }
440
440
 
441
441
  return result;
442
- };
442
+ }
443
443
  /**
444
444
  * Check property for disabled by option
445
445
  */
446
-
446
+ ;
447
447
 
448
448
  _proto.disabled = function disabled(prop, prefix) {
449
449
  var other = ['order', 'justify-content', 'align-self', 'align-content'];
package/lib/value.js CHANGED
@@ -85,11 +85,11 @@ function (_Prefixer) {
85
85
  }
86
86
 
87
87
  return result;
88
- };
88
+ }
89
89
  /**
90
90
  * Is declaration need to be prefixed
91
91
  */
92
-
92
+ ;
93
93
 
94
94
  var _proto = Value.prototype;
95
95
 
@@ -101,27 +101,27 @@ function (_Prefixer) {
101
101
  }
102
102
 
103
103
  return !!value.match(this.regexp());
104
- };
104
+ }
105
105
  /**
106
106
  * Lazy regexp loading
107
107
  */
108
-
108
+ ;
109
109
 
110
110
  _proto.regexp = function regexp() {
111
111
  return this.regexpCache || (this.regexpCache = utils.regexp(this.name));
112
- };
112
+ }
113
113
  /**
114
114
  * Add prefix to values in string
115
115
  */
116
-
116
+ ;
117
117
 
118
118
  _proto.replace = function replace(string, prefix) {
119
119
  return string.replace(this.regexp(), "$1" + prefix + "$2");
120
- };
120
+ }
121
121
  /**
122
122
  * Get value with comments if it was not changed
123
123
  */
124
-
124
+ ;
125
125
 
126
126
  _proto.value = function value(decl) {
127
127
  if (decl.raws.value && decl.raws.value.value === decl.value) {
@@ -129,11 +129,11 @@ function (_Prefixer) {
129
129
  } else {
130
130
  return decl.value;
131
131
  }
132
- };
132
+ }
133
133
  /**
134
134
  * Save values with next prefixed token
135
135
  */
136
-
136
+ ;
137
137
 
138
138
  _proto.add = function add(decl, prefix) {
139
139
  if (!decl._autoprefixerValues) {
@@ -150,11 +150,11 @@ function (_Prefixer) {
150
150
  } while (value !== before);
151
151
 
152
152
  decl._autoprefixerValues[prefix] = value;
153
- };
153
+ }
154
154
  /**
155
155
  * Return function to fast find prefixed value
156
156
  */
157
-
157
+ ;
158
158
 
159
159
  _proto.old = function old(prefix) {
160
160
  return new OldValue(this.name, prefix + this.name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autoprefixer",
3
- "version": "9.3.1",
3
+ "version": "9.4.3",
4
4
  "description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
5
5
  "keywords": ["autoprefixer", "css", "prefix", "postcss", "postcss-plugin"],
6
6
  "author": "Andrey Sitnik <andrey@sitnik.ru>",
@@ -10,11 +10,11 @@
10
10
  "node": ">=6.0.0"
11
11
  },
12
12
  "dependencies": {
13
- "browserslist": "^4.3.3",
14
- "caniuse-lite": "^1.0.30000898",
13
+ "browserslist": "^4.3.6",
14
+ "caniuse-lite": "^1.0.30000921",
15
15
  "normalize-range": "^0.1.2",
16
16
  "num2fraction": "^1.2.2",
17
- "postcss": "^7.0.5",
17
+ "postcss": "^7.0.6",
18
18
  "postcss-value-parser": "^3.3.1"
19
19
  },
20
20
  "bin": {