autoprefixer 10.4.27 → 10.5.0

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright 2013 Andrey Sitnik <andrey@sitnik.ru>
3
+ Copyright 2013 Andrey Sitnik <andrey@sitnik.es>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
package/README.md CHANGED
@@ -46,12 +46,11 @@ Twitter account for news and releases: [@autoprefixer].
46
46
  </a>
47
47
 
48
48
  [interactive demo]: https://autoprefixer.github.io/
49
- [@autoprefixer]: https://twitter.com/autoprefixer
50
- [Can I Use]: https://caniuse.com/
51
- [cult-img]: https://cultofmartians.com/assets/badges/badge.svg
52
- [PostCSS]: https://github.com/postcss/postcss
53
- [cult]: https://cultofmartians.com/tasks/autoprefixer-grid.html
54
-
49
+ [@autoprefixer]: https://twitter.com/autoprefixer
50
+ [Can I Use]: https://caniuse.com/
51
+ [cult-img]: https://cultofmartians.com/assets/badges/badge.svg
52
+ [PostCSS]: https://github.com/postcss/postcss
53
+ [cult]: https://cultofmartians.com/tasks/autoprefixer-grid.html
55
54
 
56
55
  ## Docs
57
56
  Read full docs **[here](https://github.com/postcss/autoprefixer#readme)**.
package/data/prefixes.js CHANGED
@@ -750,6 +750,8 @@ f(prefixCssMasks, browsers => {
750
750
  [
751
751
  'mask',
752
752
  'mask-position',
753
+ 'mask-position-x',
754
+ 'mask-position-y',
753
755
  'mask-size',
754
756
  'mask-border',
755
757
  'mask-border-outset',
@@ -1,5 +1,5 @@
1
- import { Plugin } from 'postcss'
2
1
  import { Stats } from 'browserslist'
2
+ import { Plugin } from 'postcss'
3
3
 
4
4
  declare function autoprefixer<T extends string[]>(
5
5
  ...args: [...T, autoprefixer.Options]
@@ -4,7 +4,7 @@ let OldValue = require('../old-value')
4
4
  let utils = require('../utils')
5
5
  let Value = require('../value')
6
6
 
7
- let IS_DIRECTION = /top|left|right|bottom/gi
7
+ const IS_DIRECTION = /top|left|right|bottom/gi
8
8
 
9
9
  class Gradient extends Value {
10
10
  /**
@@ -229,7 +229,7 @@ class Gradient extends Value {
229
229
  nodes[0].value = this.normalizeUnit(nodes[0].value, 1)
230
230
  } else if (nodes[0].value.includes('deg')) {
231
231
  let num = parseFloat(nodes[0].value)
232
- num = (num % 360 + 360) % 360
232
+ num = ((num % 360) + 360) % 360
233
233
  nodes[0].value = `${num}deg`
234
234
  }
235
235
 
@@ -164,7 +164,7 @@ function prefixTrackValue({ gap, value }) {
164
164
 
165
165
  // Parse grid-template-areas
166
166
 
167
- let DOTS = /^\.+$/
167
+ const DOTS = /^\.+$/
168
168
 
169
169
  function track(start, end) {
170
170
  return { end, span: end - start, start }
package/lib/prefixes.js CHANGED
@@ -192,7 +192,7 @@ class Prefixes {
192
192
  return true
193
193
  }
194
194
 
195
- if (step === +1 && other.prop === unprefixed) {
195
+ if (step === 1 && other.prop === unprefixed) {
196
196
  if (!Browsers.withPrefix(other.value)) {
197
197
  break
198
198
  }
@@ -206,7 +206,7 @@ class Prefixes {
206
206
 
207
207
  return {
208
208
  down(callback) {
209
- return checker(+1, callback)
209
+ return checker(1, callback)
210
210
  },
211
211
  up(callback) {
212
212
  return checker(-1, callback)
package/lib/processor.js CHANGED
@@ -35,6 +35,17 @@ function hasRowsAndColumns(decl) {
35
35
  return hasRows && hasColumns
36
36
  }
37
37
 
38
+ function insideGrid(decl) {
39
+ return decl.parent.nodes.some(node => {
40
+ if (node.type !== 'decl') return false
41
+ let displayGrid =
42
+ node.prop === 'display' && /(inline-)?grid/.test(node.value)
43
+ let gridTemplate = node.prop.startsWith('grid-template')
44
+ let gridGap = /^grid-([A-z]+-)?gap/.test(node.prop)
45
+ return displayGrid || gridTemplate || gridGap
46
+ })
47
+ }
48
+
38
49
  class Processor {
39
50
  constructor(prefixes) {
40
51
  this.prefixes = prefixes
@@ -84,17 +95,6 @@ class Processor {
84
95
  })
85
96
  })
86
97
 
87
- function insideGrid(decl) {
88
- return decl.parent.nodes.some(node => {
89
- if (node.type !== 'decl') return false
90
- let displayGrid =
91
- node.prop === 'display' && /(inline-)?grid/.test(node.value)
92
- let gridTemplate = node.prop.startsWith('grid-template')
93
- let gridGap = /^grid-([A-z]+-)?gap/.test(node.prop)
94
- return displayGrid || gridTemplate || gridGap
95
- })
96
- }
97
-
98
98
  let gridPrefixes =
99
99
  this.gridStatus(css, result) &&
100
100
  this.prefixes.add['grid-area'] &&
@@ -586,6 +586,7 @@ class Processor {
586
586
 
587
587
  let parts = decl.raw('before').split('\n')
588
588
  let prevMin = parts[parts.length - 1].length
589
+ /** @type {number|false} */
589
590
  let diff = false
590
591
 
591
592
  this.prefixes.group(decl).down(other => {
package/lib/transition.js CHANGED
@@ -320,7 +320,7 @@ class Transition {
320
320
  nodes = nodes.slice(1)
321
321
  }
322
322
  if (nodes[nodes.length - 1].type === 'div') {
323
- nodes = nodes.slice(0, +-2 + 1 || undefined)
323
+ nodes = nodes.slice(0, -1)
324
324
  }
325
325
  return parser.stringify({ nodes })
326
326
  }
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "autoprefixer",
3
- "version": "10.4.27",
3
+ "version": "10.5.0",
4
4
  "description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
5
- "engines": {
6
- "node": "^10 || ^12 || >=14"
7
- },
8
5
  "keywords": [
9
6
  "autoprefixer",
10
7
  "css",
11
- "prefix",
12
8
  "postcss",
13
- "postcss-plugin"
9
+ "postcss-plugin",
10
+ "prefix"
14
11
  ],
15
- "main": "lib/autoprefixer.js",
16
- "bin": "bin/autoprefixer",
17
- "types": "lib/autoprefixer.d.ts",
12
+ "bugs": {
13
+ "url": "https://github.com/postcss/autoprefixer/issues"
14
+ },
15
+ "license": "MIT",
16
+ "author": "Andrey Sitnik <andrey@sitnik.es>",
17
+ "repository": "postcss/autoprefixer",
18
18
  "funding": [
19
19
  {
20
20
  "type": "opencollective",
@@ -29,20 +29,20 @@
29
29
  "url": "https://github.com/sponsors/ai"
30
30
  }
31
31
  ],
32
- "author": "Andrey Sitnik <andrey@sitnik.ru>",
33
- "license": "MIT",
34
- "repository": "postcss/autoprefixer",
35
- "bugs": {
36
- "url": "https://github.com/postcss/autoprefixer/issues"
37
- },
38
- "peerDependencies": {
39
- "postcss": "^8.1.0"
40
- },
32
+ "bin": "bin/autoprefixer",
33
+ "main": "lib/autoprefixer.js",
34
+ "types": "lib/autoprefixer.d.ts",
41
35
  "dependencies": {
42
- "browserslist": "^4.28.1",
43
- "caniuse-lite": "^1.0.30001774",
36
+ "browserslist": "^4.28.2",
37
+ "caniuse-lite": "^1.0.30001787",
44
38
  "fraction.js": "^5.3.4",
45
39
  "picocolors": "^1.1.1",
46
40
  "postcss-value-parser": "^4.2.0"
41
+ },
42
+ "peerDependencies": {
43
+ "postcss": "^8.1.0"
44
+ },
45
+ "engines": {
46
+ "node": "^10 || ^12 || >=14"
47
47
  }
48
48
  }