autoprefixer 10.2.2 → 10.2.6

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 (79) hide show
  1. package/README.md +3 -3
  2. package/data/prefixes.js +187 -91
  3. package/lib/at-rule.js +2 -2
  4. package/lib/autoprefixer.d.ts +3 -3
  5. package/lib/autoprefixer.js +28 -18
  6. package/lib/brackets.js +3 -3
  7. package/lib/browsers.js +6 -6
  8. package/lib/declaration.js +14 -14
  9. package/lib/hacks/align-content.js +3 -3
  10. package/lib/hacks/align-items.js +3 -3
  11. package/lib/hacks/align-self.js +4 -4
  12. package/lib/hacks/animation.js +1 -1
  13. package/lib/hacks/appearance.js +1 -1
  14. package/lib/hacks/backdrop-filter.js +1 -1
  15. package/lib/hacks/background-clip.js +2 -2
  16. package/lib/hacks/background-size.js +1 -1
  17. package/lib/hacks/block-logical.js +2 -2
  18. package/lib/hacks/border-image.js +1 -1
  19. package/lib/hacks/border-radius.js +2 -2
  20. package/lib/hacks/break-props.js +4 -4
  21. package/lib/hacks/color-adjust.js +2 -2
  22. package/lib/hacks/cross-fade.js +1 -1
  23. package/lib/hacks/display-flex.js +5 -5
  24. package/lib/hacks/display-grid.js +2 -2
  25. package/lib/hacks/filter-value.js +1 -1
  26. package/lib/hacks/filter.js +1 -1
  27. package/lib/hacks/flex-basis.js +3 -3
  28. package/lib/hacks/flex-direction.js +3 -3
  29. package/lib/hacks/flex-flow.js +1 -1
  30. package/lib/hacks/flex-grow.js +2 -2
  31. package/lib/hacks/flex-shrink.js +3 -3
  32. package/lib/hacks/flex-wrap.js +1 -1
  33. package/lib/hacks/flex.js +3 -3
  34. package/lib/hacks/fullscreen.js +1 -1
  35. package/lib/hacks/gradient.js +18 -18
  36. package/lib/hacks/grid-area.js +1 -1
  37. package/lib/hacks/grid-column-align.js +3 -3
  38. package/lib/hacks/grid-end.js +1 -1
  39. package/lib/hacks/grid-row-align.js +3 -3
  40. package/lib/hacks/grid-row-column.js +1 -1
  41. package/lib/hacks/grid-rows-columns.js +3 -3
  42. package/lib/hacks/grid-start.js +3 -3
  43. package/lib/hacks/grid-template-areas.js +2 -2
  44. package/lib/hacks/grid-template.js +1 -1
  45. package/lib/hacks/grid-utils.js +60 -48
  46. package/lib/hacks/image-rendering.js +5 -5
  47. package/lib/hacks/image-set.js +1 -1
  48. package/lib/hacks/inline-logical.js +2 -2
  49. package/lib/hacks/intrinsic.js +6 -6
  50. package/lib/hacks/justify-content.js +3 -3
  51. package/lib/hacks/mask-border.js +2 -2
  52. package/lib/hacks/mask-composite.js +1 -1
  53. package/lib/hacks/order.js +3 -3
  54. package/lib/hacks/overscroll-behavior.js +3 -3
  55. package/lib/hacks/pixelated.js +2 -2
  56. package/lib/hacks/place-self.js +1 -1
  57. package/lib/hacks/placeholder-shown.js +1 -1
  58. package/lib/hacks/placeholder.js +2 -2
  59. package/lib/hacks/text-decoration-skip-ink.js +1 -1
  60. package/lib/hacks/text-decoration.js +1 -1
  61. package/lib/hacks/text-emphasis-position.js +1 -1
  62. package/lib/hacks/transform-decl.js +4 -4
  63. package/lib/hacks/user-select.js +2 -2
  64. package/lib/hacks/writing-mode.js +1 -1
  65. package/lib/info.js +8 -4
  66. package/lib/old-selector.js +3 -3
  67. package/lib/old-value.js +2 -2
  68. package/lib/prefixer.js +13 -9
  69. package/lib/prefixes.js +124 -68
  70. package/lib/processor.js +14 -14
  71. package/lib/resolution.js +6 -6
  72. package/lib/selector.js +10 -10
  73. package/lib/supports.js +28 -20
  74. package/lib/transition.js +15 -15
  75. package/lib/utils.js +65 -67
  76. package/lib/value.js +7 -7
  77. package/lib/vendor.js +2 -2
  78. package/package.json +5 -5
  79. package/CHANGELOG.md +0 -1019
@@ -4,7 +4,7 @@ class Filter extends Declaration {
4
4
  /**
5
5
  * Check is it Internet Explorer filter
6
6
  */
7
- check (decl) {
7
+ check(decl) {
8
8
  let v = decl.value
9
9
  return (
10
10
  !v.toLowerCase().includes('alpha(') &&
@@ -5,14 +5,14 @@ class FlexBasis extends Declaration {
5
5
  /**
6
6
  * Return property name by final spec
7
7
  */
8
- normalize () {
8
+ normalize() {
9
9
  return 'flex-basis'
10
10
  }
11
11
 
12
12
  /**
13
13
  * Return flex property for 2012 spec
14
14
  */
15
- prefixed (prop, prefix) {
15
+ prefixed(prop, prefix) {
16
16
  let spec
17
17
  ;[spec, prefix] = flexSpec(prefix)
18
18
  if (spec === 2012) {
@@ -24,7 +24,7 @@ class FlexBasis extends Declaration {
24
24
  /**
25
25
  * Ignore 2009 spec and use flex property for 2012
26
26
  */
27
- set (decl, prefix) {
27
+ set(decl, prefix) {
28
28
  let spec
29
29
  ;[spec, prefix] = flexSpec(prefix)
30
30
  if (spec === 2012 || spec === 'final') {
@@ -5,14 +5,14 @@ class FlexDirection extends Declaration {
5
5
  /**
6
6
  * Return property name by final spec
7
7
  */
8
- normalize () {
8
+ normalize() {
9
9
  return 'flex-direction'
10
10
  }
11
11
 
12
12
  /**
13
13
  * Use two properties for 2009 spec
14
14
  */
15
- insert (decl, prefix, prefixes) {
15
+ insert(decl, prefix, prefixes) {
16
16
  let spec
17
17
  ;[spec, prefix] = flexSpec(prefix)
18
18
  if (spec !== 2009) {
@@ -56,7 +56,7 @@ class FlexDirection extends Declaration {
56
56
  /**
57
57
  * Clean two properties for 2009 spec
58
58
  */
59
- old (prop, prefix) {
59
+ old(prop, prefix) {
60
60
  let spec
61
61
  ;[spec, prefix] = flexSpec(prefix)
62
62
  if (spec === 2009) {
@@ -5,7 +5,7 @@ class FlexFlow extends Declaration {
5
5
  /**
6
6
  * Use two properties for 2009 spec
7
7
  */
8
- insert (decl, prefix, prefixes) {
8
+ insert(decl, prefix, prefixes) {
9
9
  let spec
10
10
  ;[spec, prefix] = flexSpec(prefix)
11
11
  if (spec !== 2009) {
@@ -5,14 +5,14 @@ class Flex extends Declaration {
5
5
  /**
6
6
  * Return property name by final spec
7
7
  */
8
- normalize () {
8
+ normalize() {
9
9
  return 'flex'
10
10
  }
11
11
 
12
12
  /**
13
13
  * Return flex property for 2009 and 2012 specs
14
14
  */
15
- prefixed (prop, prefix) {
15
+ prefixed(prop, prefix) {
16
16
  let spec
17
17
  ;[spec, prefix] = flexSpec(prefix)
18
18
  if (spec === 2009) {
@@ -5,14 +5,14 @@ class FlexShrink extends Declaration {
5
5
  /**
6
6
  * Return property name by final spec
7
7
  */
8
- normalize () {
8
+ normalize() {
9
9
  return 'flex-shrink'
10
10
  }
11
11
 
12
12
  /**
13
13
  * Return flex property for 2012 spec
14
14
  */
15
- prefixed (prop, prefix) {
15
+ prefixed(prop, prefix) {
16
16
  let spec
17
17
  ;[spec, prefix] = flexSpec(prefix)
18
18
  if (spec === 2012) {
@@ -24,7 +24,7 @@ class FlexShrink extends Declaration {
24
24
  /**
25
25
  * Ignore 2009 spec and use flex property for 2012
26
26
  */
27
- set (decl, prefix) {
27
+ set(decl, prefix) {
28
28
  let spec
29
29
  ;[spec, prefix] = flexSpec(prefix)
30
30
  if (spec === 2012 || spec === 'final') {
@@ -5,7 +5,7 @@ class FlexWrap extends Declaration {
5
5
  /**
6
6
  * Don't add prefix for 2009 spec
7
7
  */
8
- set (decl, prefix) {
8
+ set(decl, prefix) {
9
9
  let spec = flexSpec(prefix)[0]
10
10
  if (spec !== 2009) {
11
11
  return super.set(decl, prefix)
package/lib/hacks/flex.js CHANGED
@@ -7,7 +7,7 @@ class Flex extends Declaration {
7
7
  /**
8
8
  * Change property name for 2009 spec
9
9
  */
10
- prefixed (prop, prefix) {
10
+ prefixed(prop, prefix) {
11
11
  let spec
12
12
  ;[spec, prefix] = flexSpec(prefix)
13
13
  if (spec === 2009) {
@@ -19,7 +19,7 @@ class Flex extends Declaration {
19
19
  /**
20
20
  * Return property name by final spec
21
21
  */
22
- normalize () {
22
+ normalize() {
23
23
  return 'flex'
24
24
  }
25
25
 
@@ -27,7 +27,7 @@ class Flex extends Declaration {
27
27
  * Spec 2009 supports only first argument
28
28
  * Spec 2012 disallows unitless basis
29
29
  */
30
- set (decl, prefix) {
30
+ set(decl, prefix) {
31
31
  let spec = flexSpec(prefix)[0]
32
32
  if (spec === 2009) {
33
33
  decl.value = list.space(decl.value)[0]
@@ -4,7 +4,7 @@ class Fullscreen extends Selector {
4
4
  /**
5
5
  * Return different selectors depend on prefix
6
6
  */
7
- prefixed (prefix) {
7
+ prefixed(prefix) {
8
8
  if (prefix === '-webkit-') {
9
9
  return ':-webkit-full-screen'
10
10
  }
@@ -11,7 +11,7 @@ class Gradient extends Value {
11
11
  /**
12
12
  * Change degrees for webkit prefix
13
13
  */
14
- replace (string, prefix) {
14
+ replace(string, prefix) {
15
15
  let ast = parser(string)
16
16
  for (let node of ast.nodes) {
17
17
  if (node.type === 'function' && node.value === this.name) {
@@ -34,7 +34,7 @@ class Gradient extends Value {
34
34
  /**
35
35
  * Replace first token
36
36
  */
37
- replaceFirst (params, ...words) {
37
+ replaceFirst(params, ...words) {
38
38
  let prefix = words.map(i => {
39
39
  if (i === ' ') {
40
40
  return { type: 'space', value: i }
@@ -47,7 +47,7 @@ class Gradient extends Value {
47
47
  /**
48
48
  * Convert angle unit to deg
49
49
  */
50
- normalizeUnit (str, full) {
50
+ normalizeUnit(str, full) {
51
51
  let num = parseFloat(str)
52
52
  let deg = (num / full) * 360
53
53
  return `${deg}deg`
@@ -56,7 +56,7 @@ class Gradient extends Value {
56
56
  /**
57
57
  * Normalize angle
58
58
  */
59
- normalize (nodes) {
59
+ normalize(nodes) {
60
60
  if (!nodes[0]) return nodes
61
61
 
62
62
  if (/-?\d+(.\d+)?grad/.test(nodes[0].value)) {
@@ -87,7 +87,7 @@ class Gradient extends Value {
87
87
  /**
88
88
  * Replace old direction to new
89
89
  */
90
- newDirection (params) {
90
+ newDirection(params) {
91
91
  if (params[0].value === 'to') {
92
92
  return params
93
93
  }
@@ -122,7 +122,7 @@ class Gradient extends Value {
122
122
  /**
123
123
  * Look for at word
124
124
  */
125
- isRadial (params) {
125
+ isRadial(params) {
126
126
  let state = 'before'
127
127
  for (let param of params) {
128
128
  if (state === 'before' && param.type === 'space') {
@@ -143,7 +143,7 @@ class Gradient extends Value {
143
143
  /**
144
144
  * Change new direction to old
145
145
  */
146
- convertDirection (params) {
146
+ convertDirection(params) {
147
147
  if (params.length > 0) {
148
148
  if (params[0].value === 'to') {
149
149
  this.fixDirection(params)
@@ -159,7 +159,7 @@ class Gradient extends Value {
159
159
  /**
160
160
  * Replace `to top left` to `bottom right`
161
161
  */
162
- fixDirection (params) {
162
+ fixDirection(params) {
163
163
  params.splice(0, 2)
164
164
 
165
165
  for (let param of params) {
@@ -175,7 +175,7 @@ class Gradient extends Value {
175
175
  /**
176
176
  * Add 90 degrees
177
177
  */
178
- fixAngle (params) {
178
+ fixAngle(params) {
179
179
  let first = params[0].value
180
180
  first = parseFloat(first)
181
181
  first = Math.abs(450 - first) % 360
@@ -186,7 +186,7 @@ class Gradient extends Value {
186
186
  /**
187
187
  * Fix radial direction syntax
188
188
  */
189
- fixRadial (params) {
189
+ fixRadial(params) {
190
190
  let first = []
191
191
  let second = []
192
192
  let a, b, c, i, next
@@ -216,21 +216,21 @@ class Gradient extends Value {
216
216
  params.splice(0, i, ...second, div, ...first)
217
217
  }
218
218
 
219
- revertDirection (word) {
219
+ revertDirection(word) {
220
220
  return Gradient.directions[word.toLowerCase()] || word
221
221
  }
222
222
 
223
223
  /**
224
224
  * Round float and save digits under dot
225
225
  */
226
- roundFloat (float, digits) {
226
+ roundFloat(float, digits) {
227
227
  return parseFloat(float.toFixed(digits))
228
228
  }
229
229
 
230
230
  /**
231
231
  * Convert to old webkit syntax
232
232
  */
233
- oldWebkit (node) {
233
+ oldWebkit(node) {
234
234
  let { nodes } = node
235
235
  let string = parser.stringify(node.nodes)
236
236
 
@@ -276,7 +276,7 @@ class Gradient extends Value {
276
276
  /**
277
277
  * Change direction syntax to old webkit
278
278
  */
279
- oldDirection (params) {
279
+ oldDirection(params) {
280
280
  let div = this.cloneDiv(params[0])
281
281
 
282
282
  if (params[0][0].value !== 'to') {
@@ -303,7 +303,7 @@ class Gradient extends Value {
303
303
  /**
304
304
  * Get div token from exists parameters
305
305
  */
306
- cloneDiv (params) {
306
+ cloneDiv(params) {
307
307
  for (let i of params) {
308
308
  if (i.type === 'div' && i.value === ',') {
309
309
  return i
@@ -315,7 +315,7 @@ class Gradient extends Value {
315
315
  /**
316
316
  * Change colors syntax to old webkit
317
317
  */
318
- colorStops (params) {
318
+ colorStops(params) {
319
319
  let result = []
320
320
  for (let i = 0; i < params.length; i++) {
321
321
  let pos
@@ -356,7 +356,7 @@ class Gradient extends Value {
356
356
  /**
357
357
  * Remove old WebKit gradient too
358
358
  */
359
- old (prefix) {
359
+ old(prefix) {
360
360
  if (prefix === '-webkit-') {
361
361
  let type = this.name === 'linear-gradient' ? 'linear' : 'radial'
362
362
  let string = '-gradient'
@@ -374,7 +374,7 @@ class Gradient extends Value {
374
374
  /**
375
375
  * Do not add non-webkit prefixes for list-style and object
376
376
  */
377
- add (decl, prefix) {
377
+ add(decl, prefix) {
378
378
  let p = decl.prop
379
379
  if (p.includes('mask')) {
380
380
  if (prefix === '-webkit-' || prefix === '-webkit- old') {
@@ -5,7 +5,7 @@ class GridArea extends Declaration {
5
5
  /**
6
6
  * Translate grid-area to separate -ms- prefixed properties
7
7
  */
8
- insert (decl, prefix, prefixes, result) {
8
+ insert(decl, prefix, prefixes, result) {
9
9
  if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
10
10
 
11
11
  let values = utils.parse(decl)
@@ -4,21 +4,21 @@ class GridColumnAlign extends Declaration {
4
4
  /**
5
5
  * Do not prefix flexbox values
6
6
  */
7
- check (decl) {
7
+ check(decl) {
8
8
  return !decl.value.includes('flex-') && decl.value !== 'baseline'
9
9
  }
10
10
 
11
11
  /**
12
12
  * Change property name for IE
13
13
  */
14
- prefixed (prop, prefix) {
14
+ prefixed(prop, prefix) {
15
15
  return prefix + 'grid-column-align'
16
16
  }
17
17
 
18
18
  /**
19
19
  * Change IE property back
20
20
  */
21
- normalize () {
21
+ normalize() {
22
22
  return 'justify-self'
23
23
  }
24
24
  }
@@ -4,7 +4,7 @@ class GridEnd extends Declaration {
4
4
  /**
5
5
  * Change repeating syntax for IE
6
6
  */
7
- insert (decl, prefix, prefixes, result) {
7
+ insert(decl, prefix, prefixes, result) {
8
8
  if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
9
9
 
10
10
  let clonedDecl = this.clone(decl)
@@ -4,21 +4,21 @@ class GridRowAlign extends Declaration {
4
4
  /**
5
5
  * Do not prefix flexbox values
6
6
  */
7
- check (decl) {
7
+ check(decl) {
8
8
  return !decl.value.includes('flex-') && decl.value !== 'baseline'
9
9
  }
10
10
 
11
11
  /**
12
12
  * Change property name for IE
13
13
  */
14
- prefixed (prop, prefix) {
14
+ prefixed(prop, prefix) {
15
15
  return prefix + 'grid-row-align'
16
16
  }
17
17
 
18
18
  /**
19
19
  * Change IE property back
20
20
  */
21
- normalize () {
21
+ normalize() {
22
22
  return 'align-self'
23
23
  }
24
24
  }
@@ -5,7 +5,7 @@ class GridRowColumn extends Declaration {
5
5
  /**
6
6
  * Translate grid-row / grid-column to separate -ms- prefixed properties
7
7
  */
8
- insert (decl, prefix, prefixes) {
8
+ insert(decl, prefix, prefixes) {
9
9
  if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
10
10
 
11
11
  let values = utils.parse(decl)
@@ -12,7 +12,7 @@ class GridRowsColumns extends Declaration {
12
12
  /**
13
13
  * Change property name for IE
14
14
  */
15
- prefixed (prop, prefix) {
15
+ prefixed(prop, prefix) {
16
16
  if (prefix === '-ms-') {
17
17
  return prefixTrackProp({ prop, prefix })
18
18
  }
@@ -22,11 +22,11 @@ class GridRowsColumns extends Declaration {
22
22
  /**
23
23
  * Change IE property back
24
24
  */
25
- normalize (prop) {
25
+ normalize(prop) {
26
26
  return prop.replace(/^grid-(rows|columns)/, 'grid-template-$1')
27
27
  }
28
28
 
29
- insert (decl, prefix, prefixes, result) {
29
+ insert(decl, prefix, prefixes, result) {
30
30
  if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
31
31
 
32
32
  let { parent, prop, value } = decl
@@ -4,7 +4,7 @@ class GridStart extends Declaration {
4
4
  /**
5
5
  * Do not add prefix for unsupported value in IE
6
6
  */
7
- check (decl) {
7
+ check(decl) {
8
8
  let value = decl.value
9
9
  return !value.includes('/') || value.includes('span')
10
10
  }
@@ -12,14 +12,14 @@ class GridStart extends Declaration {
12
12
  /**
13
13
  * Return a final spec property
14
14
  */
15
- normalize (prop) {
15
+ normalize(prop) {
16
16
  return prop.replace('-start', '')
17
17
  }
18
18
 
19
19
  /**
20
20
  * Change property name for IE
21
21
  */
22
- prefixed (prop, prefix) {
22
+ prefixed(prop, prefix) {
23
23
  let result = super.prefixed(prop, prefix)
24
24
  if (prefix === '-ms-') {
25
25
  result = result.replace('-start', '')
@@ -9,7 +9,7 @@ let {
9
9
  inheritGridGap
10
10
  } = require('./grid-utils')
11
11
 
12
- function getGridRows (tpl) {
12
+ function getGridRows(tpl) {
13
13
  return tpl
14
14
  .trim()
15
15
  .slice(1, -1)
@@ -20,7 +20,7 @@ class GridTemplateAreas extends Declaration {
20
20
  /**
21
21
  * Translate grid-template-areas to separate -ms- prefixed properties
22
22
  */
23
- insert (decl, prefix, prefixes, result) {
23
+ insert(decl, prefix, prefixes, result) {
24
24
  if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
25
25
 
26
26
  let hasColumns = false
@@ -11,7 +11,7 @@ class GridTemplate extends Declaration {
11
11
  /**
12
12
  * Translate grid-template to separate -ms- prefixed properties
13
13
  */
14
- insert (decl, prefix, prefixes, result) {
14
+ insert(decl, prefix, prefixes, result) {
15
15
  if (prefix !== '-ms-') return super.insert(decl, prefix, prefixes)
16
16
 
17
17
  if (decl.parent.some(i => i.prop === '-ms-grid-rows')) {