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
@@ -5,7 +5,7 @@ let uniq = require('../utils').uniq
5
5
  let escapeRegexp = require('../utils').escapeRegexp
6
6
  let splitSelector = require('../utils').splitSelector
7
7
 
8
- function convert (value) {
8
+ function convert(value) {
9
9
  if (
10
10
  value &&
11
11
  value.length === 2 &&
@@ -22,7 +22,9 @@ function convert (value) {
22
22
  return [false, false]
23
23
  }
24
24
 
25
- function translate (values, startIndex, endIndex) {
25
+ exports.translate = translate
26
+
27
+ function translate(values, startIndex, endIndex) {
26
28
  let startValue = values[startIndex]
27
29
  let endValue = values[endIndex]
28
30
 
@@ -52,7 +54,9 @@ function translate (values, startIndex, endIndex) {
52
54
  return [false, false]
53
55
  }
54
56
 
55
- function parse (decl) {
57
+ exports.parse = parse
58
+
59
+ function parse(decl) {
56
60
  let node = parser(decl.value)
57
61
 
58
62
  let values = []
@@ -71,7 +75,9 @@ function parse (decl) {
71
75
  return values
72
76
  }
73
77
 
74
- function insertDecl (decl, prop, value) {
78
+ exports.insertDecl = insertDecl
79
+
80
+ function insertDecl(decl, prop, value) {
75
81
  if (value && !decl.parent.some(i => i.prop === `-ms-${prop}`)) {
76
82
  decl.cloneBefore({
77
83
  prop: `-ms-${prop}`,
@@ -82,11 +88,13 @@ function insertDecl (decl, prop, value) {
82
88
 
83
89
  // Track transforms
84
90
 
85
- function prefixTrackProp ({ prop, prefix }) {
91
+ exports.prefixTrackProp = prefixTrackProp
92
+
93
+ function prefixTrackProp({ prop, prefix }) {
86
94
  return prefix + prop.replace('template-', '')
87
95
  }
88
96
 
89
- function transformRepeat ({ nodes }, { gap }) {
97
+ function transformRepeat({ nodes }, { gap }) {
90
98
  let { count, size } = nodes.reduce(
91
99
  (result, node) => {
92
100
  if (node.type === 'div' && node.value === ',') {
@@ -122,7 +130,9 @@ function transformRepeat ({ nodes }, { gap }) {
122
130
  return `(${size.join('')})[${count.join('')}]`
123
131
  }
124
132
 
125
- function prefixTrackValue ({ value, gap }) {
133
+ exports.prefixTrackValue = prefixTrackValue
134
+
135
+ function prefixTrackValue({ value, gap }) {
126
136
  let result = parser(value).nodes.reduce((nodes, node) => {
127
137
  if (node.type === 'function' && node.value === 'repeat') {
128
138
  return nodes.concat({
@@ -153,15 +163,17 @@ function prefixTrackValue ({ value, gap }) {
153
163
 
154
164
  let DOTS = /^\.+$/
155
165
 
156
- function track (start, end) {
166
+ function track(start, end) {
157
167
  return { start, end, span: end - start }
158
168
  }
159
169
 
160
- function getColumns (line) {
170
+ function getColumns(line) {
161
171
  return line.trim().split(/\s+/g)
162
172
  }
163
173
 
164
- function parseGridAreas ({ rows, gap }) {
174
+ exports.parseGridAreas = parseGridAreas
175
+
176
+ function parseGridAreas({ rows, gap }) {
165
177
  return rows.reduce((areas, line, rowIndex) => {
166
178
  if (gap.row) rowIndex *= 2
167
179
 
@@ -196,18 +208,20 @@ function parseGridAreas ({ rows, gap }) {
196
208
 
197
209
  // Parse grid-template
198
210
 
199
- function testTrack (node) {
211
+ function testTrack(node) {
200
212
  return node.type === 'word' && /^\[.+]$/.test(node.value)
201
213
  }
202
214
 
203
- function verifyRowSize (result) {
215
+ function verifyRowSize(result) {
204
216
  if (result.areas.length > result.rows.length) {
205
217
  result.rows.push('auto')
206
218
  }
207
219
  return result
208
220
  }
209
221
 
210
- function parseTemplate ({ decl, gap }) {
222
+ exports.parseTemplate = parseTemplate
223
+
224
+ function parseTemplate({ decl, gap }) {
211
225
  let gridTemplate = parser(decl.value).nodes.reduce(
212
226
  (result, node) => {
213
227
  let { type, value } = node
@@ -266,7 +280,7 @@ function parseTemplate ({ decl, gap }) {
266
280
  * @param {Boolean} [addColumnSpan] should we add grid-column-span value?
267
281
  * @return {Array<Object>}
268
282
  */
269
- function getMSDecls (area, addRowSpan = false, addColumnSpan = false) {
283
+ function getMSDecls(area, addRowSpan = false, addColumnSpan = false) {
270
284
  let result = [
271
285
  {
272
286
  prop: '-ms-grid-row',
@@ -292,7 +306,7 @@ function getMSDecls (area, addRowSpan = false, addColumnSpan = false) {
292
306
  return result
293
307
  }
294
308
 
295
- function getParentMedia (parent) {
309
+ function getParentMedia(parent) {
296
310
  if (parent.type === 'atrule' && parent.name === 'media') {
297
311
  return parent
298
312
  }
@@ -308,7 +322,7 @@ function getParentMedia (parent) {
308
322
  * @param {Array<String>} templateSelectors
309
323
  * @return {Array<Rule>} rules with changed selectors
310
324
  */
311
- function changeDuplicateAreaSelectors (ruleSelectors, templateSelectors) {
325
+ function changeDuplicateAreaSelectors(ruleSelectors, templateSelectors) {
312
326
  ruleSelectors = ruleSelectors.map(selector => {
313
327
  let selectorBySpace = list.space(selector)
314
328
  let selectorByComma = list.comma(selector)
@@ -335,9 +349,9 @@ function changeDuplicateAreaSelectors (ruleSelectors, templateSelectors) {
335
349
  * @param {Rule} ruleB
336
350
  * @return {Boolean}
337
351
  */
338
- function selectorsEqual (ruleA, ruleB) {
352
+ function selectorsEqual(ruleA, ruleB) {
339
353
  return ruleA.selectors.some(sel => {
340
- return ruleB.selectors.some(s => s === sel)
354
+ return ruleB.selectors.includes(sel)
341
355
  })
342
356
  }
343
357
 
@@ -346,7 +360,7 @@ function selectorsEqual (ruleA, ruleB) {
346
360
  * @param {Root} css css root
347
361
  * @return {Object} parsed data
348
362
  */
349
- function parseGridTemplatesData (css) {
363
+ function parseGridTemplatesData(css) {
350
364
  let parsed = []
351
365
 
352
366
  // we walk through every grid-template(-areas) declaration and store
@@ -453,7 +467,9 @@ function parseGridTemplatesData (css) {
453
467
  * @param {Function} isDisabled check if the rule is disabled
454
468
  * @return {void}
455
469
  */
456
- function insertAreas (css, isDisabled) {
470
+ exports.insertAreas = insertAreas
471
+
472
+ function insertAreas(css, isDisabled) {
457
473
  // parse grid-template declarations
458
474
  let gridTemplatesData = parseGridTemplatesData(css)
459
475
 
@@ -670,7 +686,9 @@ function insertAreas (css, isDisabled) {
670
686
  * @param {Result} result
671
687
  * @return {void}
672
688
  */
673
- function warnMissedAreas (areas, decl, result) {
689
+ exports.warnMissedAreas = warnMissedAreas
690
+
691
+ function warnMissedAreas(areas, decl, result) {
674
692
  let missed = Object.keys(areas)
675
693
 
676
694
  decl.root().walkDecls('grid-area', gridArea => {
@@ -692,7 +710,9 @@ function warnMissedAreas (areas, decl, result) {
692
710
  * @param {Result} result
693
711
  * @return {void}
694
712
  */
695
- function warnTemplateSelectorNotFound (decl, result) {
713
+ exports.warnTemplateSelectorNotFound = warnTemplateSelectorNotFound
714
+
715
+ function warnTemplateSelectorNotFound(decl, result) {
696
716
  let rule = decl.parent
697
717
  let root = decl.root()
698
718
  let duplicatesFound = false
@@ -763,7 +783,9 @@ function warnTemplateSelectorNotFound (decl, result) {
763
783
  * @param {Result} result
764
784
  * @return {void}
765
785
  */
766
- function warnIfGridRowColumnExists (decl, result) {
786
+ exports.warnIfGridRowColumnExists = warnIfGridRowColumnExists
787
+
788
+ function warnIfGridRowColumnExists(decl, result) {
767
789
  let rule = decl.parent
768
790
  let decls = []
769
791
  rule.walkDecls(/^grid-(row|column)/, d => {
@@ -790,7 +812,9 @@ function warnIfGridRowColumnExists (decl, result) {
790
812
 
791
813
  // Gap utils
792
814
 
793
- function getGridGap (decl) {
815
+ exports.getGridGap = getGridGap
816
+
817
+ function getGridGap(decl) {
794
818
  let gap = {}
795
819
 
796
820
  // try to find gap
@@ -814,7 +838,7 @@ function getGridGap (decl) {
814
838
  * @param {String} params parameter to parse
815
839
  * @return {}
816
840
  */
817
- function parseMediaParams (params) {
841
+ function parseMediaParams(params) {
818
842
  if (!params) {
819
843
  return []
820
844
  }
@@ -840,7 +864,7 @@ function parseMediaParams (params) {
840
864
  * @type {String} selB
841
865
  * @return {Boolean}
842
866
  */
843
- function shouldInheritGap (selA, selB) {
867
+ function shouldInheritGap(selA, selB) {
844
868
  let result
845
869
 
846
870
  // get arrays of selector split in 3-deep array
@@ -894,7 +918,9 @@ function shouldInheritGap (selA, selB) {
894
918
  * @param {Object} gap gap values
895
919
  * @return {Object | Boolean} return gap values or false (if not found)
896
920
  */
897
- function inheritGridGap (decl, gap) {
921
+ exports.inheritGridGap = inheritGridGap
922
+
923
+ function inheritGridGap(decl, gap) {
898
924
  let rule = decl.parent
899
925
  let mediaRule = getParentMedia(rule)
900
926
  let root = rule.root()
@@ -965,7 +991,9 @@ function inheritGridGap (decl, gap) {
965
991
  return false
966
992
  }
967
993
 
968
- function warnGridGap ({ gap, hasColumns, decl, result }) {
994
+ exports.warnGridGap = warnGridGap
995
+
996
+ function warnGridGap({ gap, hasColumns, decl, result }) {
969
997
  let hasBothGaps = gap.row && gap.column
970
998
  if (!hasColumns && (hasBothGaps || (gap.column && !gap.row))) {
971
999
  delete gap.column
@@ -984,7 +1012,7 @@ function warnGridGap ({ gap, hasColumns, decl, result }) {
984
1012
  * let normalized = normalizeRowColumn('1fr repeat(2, 20px 50px) 1fr')
985
1013
  * normalized // <= ['1fr', '20px', '50px', '20px', '50px', '1fr']
986
1014
  */
987
- function normalizeRowColumn (str) {
1015
+ function normalizeRowColumn(str) {
988
1016
  let normalized = parser(str).nodes.reduce((result, node) => {
989
1017
  if (node.type === 'function' && node.value === 'repeat') {
990
1018
  let key = 'count'
@@ -1024,6 +1052,8 @@ function normalizeRowColumn (str) {
1024
1052
  return normalized
1025
1053
  }
1026
1054
 
1055
+ exports.autoplaceGridItems = autoplaceGridItems
1056
+
1027
1057
  /**
1028
1058
  * Autoplace grid items
1029
1059
  * @param {Declaration} decl
@@ -1033,7 +1063,7 @@ function normalizeRowColumn (str) {
1033
1063
  * @return {void}
1034
1064
  * @see https://github.com/postcss/autoprefixer/issues/1148
1035
1065
  */
1036
- function autoplaceGridItems (decl, result, gap, autoflowValue = 'row') {
1066
+ function autoplaceGridItems(decl, result, gap, autoflowValue = 'row') {
1037
1067
  let { parent } = decl
1038
1068
 
1039
1069
  let rowDecl = parent.nodes.find(i => i.prop === 'grid-template-rows')
@@ -1081,21 +1111,3 @@ function autoplaceGridItems (decl, result, gap, autoflowValue = 'row') {
1081
1111
 
1082
1112
  return undefined
1083
1113
  }
1084
-
1085
- module.exports = {
1086
- parse,
1087
- translate,
1088
- parseTemplate,
1089
- parseGridAreas,
1090
- warnMissedAreas,
1091
- insertAreas,
1092
- insertDecl,
1093
- prefixTrackProp,
1094
- prefixTrackValue,
1095
- getGridGap,
1096
- warnGridGap,
1097
- warnTemplateSelectorNotFound,
1098
- warnIfGridRowColumnExists,
1099
- inheritGridGap,
1100
- autoplaceGridItems
1101
- }
@@ -4,14 +4,14 @@ class ImageRendering extends Declaration {
4
4
  /**
5
5
  * Add hack only for crisp-edges
6
6
  */
7
- check (decl) {
7
+ check(decl) {
8
8
  return decl.value === 'pixelated'
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
  if (prefix === '-ms-') {
16
16
  return '-ms-interpolation-mode'
17
17
  }
@@ -21,7 +21,7 @@ class ImageRendering extends Declaration {
21
21
  /**
22
22
  * Change property and value for IE
23
23
  */
24
- set (decl, prefix) {
24
+ set(decl, prefix) {
25
25
  if (prefix !== '-ms-') return super.set(decl, prefix)
26
26
  decl.prop = '-ms-interpolation-mode'
27
27
  decl.value = 'nearest-neighbor'
@@ -31,14 +31,14 @@ class ImageRendering extends Declaration {
31
31
  /**
32
32
  * Return property name by spec
33
33
  */
34
- normalize () {
34
+ normalize() {
35
35
  return 'image-rendering'
36
36
  }
37
37
 
38
38
  /**
39
39
  * Warn on old value
40
40
  */
41
- process (node, result) {
41
+ process(node, result) {
42
42
  return super.process(node, result)
43
43
  }
44
44
  }
@@ -4,7 +4,7 @@ class ImageSet extends Value {
4
4
  /**
5
5
  * Use non-standard name for WebKit and Firefox
6
6
  */
7
- replace (string, prefix) {
7
+ replace(string, prefix) {
8
8
  let fixed = super.replace(string, prefix)
9
9
  if (prefix === '-webkit-') {
10
10
  fixed = fixed.replace(/("[^"]+"|'[^']+')(\s+\d+\w)/gi, 'url($1)$2')
@@ -4,14 +4,14 @@ class InlineLogical extends Declaration {
4
4
  /**
5
5
  * Use old syntax for -moz- and -webkit-
6
6
  */
7
- prefixed (prop, prefix) {
7
+ prefixed(prop, prefix) {
8
8
  return prefix + prop.replace('-inline', '')
9
9
  }
10
10
 
11
11
  /**
12
12
  * Return property name by spec
13
13
  */
14
- normalize (prop) {
14
+ normalize(prop) {
15
15
  return prop.replace(/(margin|padding|border)-(start|end)/, '$1-inline-$2')
16
16
  }
17
17
  }
@@ -1,17 +1,17 @@
1
1
  let OldValue = require('../old-value')
2
2
  let Value = require('../value')
3
3
 
4
- function regexp (name) {
4
+ function regexp(name) {
5
5
  return new RegExp(`(^|[\\s,(])(${name}($|[\\s),]))`, 'gi')
6
6
  }
7
7
 
8
8
  class Intrinsic extends Value {
9
- regexp () {
9
+ regexp() {
10
10
  if (!this.regexpCache) this.regexpCache = regexp(this.name)
11
11
  return this.regexpCache
12
12
  }
13
13
 
14
- isStretch () {
14
+ isStretch() {
15
15
  return (
16
16
  this.name === 'stretch' ||
17
17
  this.name === 'fill' ||
@@ -19,7 +19,7 @@ class Intrinsic extends Value {
19
19
  )
20
20
  }
21
21
 
22
- replace (string, prefix) {
22
+ replace(string, prefix) {
23
23
  if (prefix === '-moz-' && this.isStretch()) {
24
24
  return string.replace(this.regexp(), '$1-moz-available$3')
25
25
  }
@@ -29,7 +29,7 @@ class Intrinsic extends Value {
29
29
  return super.replace(string, prefix)
30
30
  }
31
31
 
32
- old (prefix) {
32
+ old(prefix) {
33
33
  let prefixed = prefix + this.name
34
34
  if (this.isStretch()) {
35
35
  if (prefix === '-moz-') {
@@ -41,7 +41,7 @@ class Intrinsic extends Value {
41
41
  return new OldValue(this.name, prefixed, prefixed, regexp(prefixed))
42
42
  }
43
43
 
44
- add (decl, prefix) {
44
+ add(decl, prefix) {
45
45
  if (decl.prop.includes('grid') && prefix !== '-webkit-') {
46
46
  return undefined
47
47
  }
@@ -5,7 +5,7 @@ class JustifyContent extends Declaration {
5
5
  /**
6
6
  * Change property name for 2009 and 2012 specs
7
7
  */
8
- prefixed (prop, prefix) {
8
+ prefixed(prop, prefix) {
9
9
  let spec
10
10
  ;[spec, prefix] = flexSpec(prefix)
11
11
  if (spec === 2009) {
@@ -20,14 +20,14 @@ class JustifyContent extends Declaration {
20
20
  /**
21
21
  * Return property name by final spec
22
22
  */
23
- normalize () {
23
+ normalize() {
24
24
  return 'justify-content'
25
25
  }
26
26
 
27
27
  /**
28
28
  * Change value for 2009 and 2012 specs
29
29
  */
30
- set (decl, prefix) {
30
+ set(decl, prefix) {
31
31
  let spec = flexSpec(prefix)[0]
32
32
  if (spec === 2009 || spec === 2012) {
33
33
  let value = JustifyContent.oldValues[decl.value] || decl.value
@@ -4,14 +4,14 @@ class MaskBorder extends Declaration {
4
4
  /**
5
5
  * Return property name by final spec
6
6
  */
7
- normalize () {
7
+ normalize() {
8
8
  return this.name.replace('box-image', 'border')
9
9
  }
10
10
 
11
11
  /**
12
12
  * Return flex property for 2012 spec
13
13
  */
14
- prefixed (prop, prefix) {
14
+ prefixed(prop, prefix) {
15
15
  let result = super.prefixed(prop, prefix)
16
16
  if (prefix === '-webkit-') {
17
17
  result = result.replace('border', 'box-image')
@@ -4,7 +4,7 @@ class MaskComposite extends Declaration {
4
4
  /**
5
5
  * Prefix mask-composite for webkit
6
6
  */
7
- insert (decl, prefix, prefixes) {
7
+ insert(decl, prefix, prefixes) {
8
8
  let isCompositeProp = decl.prop === 'mask-composite'
9
9
 
10
10
  let compositeValues
@@ -5,7 +5,7 @@ class Order extends Declaration {
5
5
  /**
6
6
  * Change property name for 2009 and 2012 specs
7
7
  */
8
- prefixed (prop, prefix) {
8
+ prefixed(prop, prefix) {
9
9
  let spec
10
10
  ;[spec, prefix] = flexSpec(prefix)
11
11
  if (spec === 2009) {
@@ -20,14 +20,14 @@ class Order extends Declaration {
20
20
  /**
21
21
  * Return property name by final spec
22
22
  */
23
- normalize () {
23
+ normalize() {
24
24
  return 'order'
25
25
  }
26
26
 
27
27
  /**
28
28
  * Fix value for 2009 spec
29
29
  */
30
- set (decl, prefix) {
30
+ set(decl, prefix) {
31
31
  let spec = flexSpec(prefix)[0]
32
32
  if (spec === 2009 && /\d/.test(decl.value)) {
33
33
  decl.value = (parseInt(decl.value) + 1).toString()
@@ -4,21 +4,21 @@ class OverscrollBehavior extends Declaration {
4
4
  /**
5
5
  * Change property name for IE
6
6
  */
7
- prefixed (prop, prefix) {
7
+ prefixed(prop, prefix) {
8
8
  return prefix + 'scroll-chaining'
9
9
  }
10
10
 
11
11
  /**
12
12
  * Return property name by spec
13
13
  */
14
- normalize () {
14
+ normalize() {
15
15
  return 'overscroll-behavior'
16
16
  }
17
17
 
18
18
  /**
19
19
  * Change value for IE
20
20
  */
21
- set (decl, prefix) {
21
+ set(decl, prefix) {
22
22
  if (decl.value === 'auto') {
23
23
  decl.value = 'chained'
24
24
  } else if (decl.value === 'none' || decl.value === 'contain') {
@@ -5,7 +5,7 @@ class Pixelated extends Value {
5
5
  /**
6
6
  * Use non-standard name for WebKit and Firefox
7
7
  */
8
- replace (string, prefix) {
8
+ replace(string, prefix) {
9
9
  if (prefix === '-webkit-') {
10
10
  return string.replace(this.regexp(), '$1-webkit-optimize-contrast')
11
11
  }
@@ -18,7 +18,7 @@ class Pixelated extends Value {
18
18
  /**
19
19
  * Different name for WebKit and Firefox
20
20
  */
21
- old (prefix) {
21
+ old(prefix) {
22
22
  if (prefix === '-webkit-') {
23
23
  return new OldValue(this.name, '-webkit-optimize-contrast')
24
24
  }
@@ -5,7 +5,7 @@ class PlaceSelf extends Declaration {
5
5
  /**
6
6
  * Translate place-self 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
  // prevent doubling of prefixes
@@ -4,7 +4,7 @@ class PlaceholderShown extends Selector {
4
4
  /**
5
5
  * Return different selectors depend on prefix
6
6
  */
7
- prefixed (prefix) {
7
+ prefixed(prefix) {
8
8
  if (prefix === '-ms-') {
9
9
  return ':-ms-input-placeholder'
10
10
  }
@@ -4,14 +4,14 @@ class Placeholder extends Selector {
4
4
  /**
5
5
  * Add old mozilla to possible prefixes
6
6
  */
7
- possible () {
7
+ possible() {
8
8
  return super.possible().concat(['-moz- old', '-ms- old'])
9
9
  }
10
10
 
11
11
  /**
12
12
  * Return different selectors depend on prefix
13
13
  */
14
- prefixed (prefix) {
14
+ prefixed(prefix) {
15
15
  if (prefix === '-webkit-') {
16
16
  return '::-webkit-input-placeholder'
17
17
  }
@@ -4,7 +4,7 @@ class TextDecorationSkipInk extends Declaration {
4
4
  /**
5
5
  * Change prefix for ink value
6
6
  */
7
- set (decl, prefix) {
7
+ set(decl, prefix) {
8
8
  if (decl.prop === 'text-decoration-skip-ink' && decl.value === 'auto') {
9
9
  decl.prop = prefix + 'text-decoration-skip'
10
10
  decl.value = 'ink'
@@ -15,7 +15,7 @@ class TextDecoration extends Declaration {
15
15
  /**
16
16
  * Do not add prefixes for basic values.
17
17
  */
18
- check (decl) {
18
+ check(decl) {
19
19
  return decl.value.split(/\s+/).some(i => !BASIC.includes(i))
20
20
  }
21
21
  }
@@ -1,7 +1,7 @@
1
1
  let Declaration = require('../declaration')
2
2
 
3
3
  class TextEmphasisPosition extends Declaration {
4
- set (decl, prefix) {
4
+ set(decl, prefix) {
5
5
  if (prefix === '-webkit-') {
6
6
  decl.value = decl.value.replace(/\s*(right|left)\s*/i, '')
7
7
  }
@@ -4,7 +4,7 @@ class TransformDecl extends Declaration {
4
4
  /**
5
5
  * Recursively check all parents for @keyframes
6
6
  */
7
- keyframeParents (decl) {
7
+ keyframeParents(decl) {
8
8
  let { parent } = decl
9
9
  while (parent) {
10
10
  if (parent.type === 'atrule' && parent.name === 'keyframes') {
@@ -18,7 +18,7 @@ class TransformDecl extends Declaration {
18
18
  /**
19
19
  * Is transform contain 3D commands
20
20
  */
21
- contain3d (decl) {
21
+ contain3d(decl) {
22
22
  if (decl.prop === 'transform-origin') {
23
23
  return false
24
24
  }
@@ -35,7 +35,7 @@ class TransformDecl extends Declaration {
35
35
  /**
36
36
  * Replace rotateZ to rotate for IE 9
37
37
  */
38
- set (decl, prefix) {
38
+ set(decl, prefix) {
39
39
  decl = super.set(decl, prefix)
40
40
  if (prefix === '-ms-') {
41
41
  decl.value = decl.value.replace(/rotatez/gi, 'rotate')
@@ -46,7 +46,7 @@ class TransformDecl extends Declaration {
46
46
  /**
47
47
  * Don't add prefix for IE in keyframes
48
48
  */
49
- insert (decl, prefix, prefixes) {
49
+ insert(decl, prefix, prefixes) {
50
50
  if (prefix === '-ms-') {
51
51
  if (!this.contain3d(decl) && !this.keyframeParents(decl)) {
52
52
  return super.insert(decl, prefix, prefixes)
@@ -4,7 +4,7 @@ class UserSelect extends Declaration {
4
4
  /**
5
5
  * Change prefixed value for IE
6
6
  */
7
- set (decl, prefix) {
7
+ set(decl, prefix) {
8
8
  if (prefix === '-ms-' && decl.value === 'contain') {
9
9
  decl.value = 'element'
10
10
  }
@@ -14,7 +14,7 @@ class UserSelect extends Declaration {
14
14
  /**
15
15
  * Avoid prefixing all in IE
16
16
  */
17
- insert (decl, prefix, prefixes) {
17
+ insert(decl, prefix, prefixes) {
18
18
  if (decl.value === 'all' && prefix === '-ms-') {
19
19
  return undefined
20
20
  } else {
@@ -1,7 +1,7 @@
1
1
  let Declaration = require('../declaration')
2
2
 
3
3
  class WritingMode extends Declaration {
4
- insert (decl, prefix, prefixes) {
4
+ insert(decl, prefix, prefixes) {
5
5
  if (prefix === '-ms-') {
6
6
  let cloned = this.set(this.clone(decl), prefix)
7
7