autoprefixer 10.4.26 → 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 +1 -1
- package/README.md +5 -6
- package/data/prefixes.js +2 -0
- package/lib/autoprefixer.d.ts +1 -1
- package/lib/hacks/gradient.js +2 -2
- package/lib/hacks/grid-utils.js +1 -1
- package/lib/prefixes.js +2 -2
- package/lib/processor.js +12 -11
- package/lib/transition.js +1 -1
- package/package.json +19 -24
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright 2013 Andrey Sitnik <andrey@sitnik.
|
|
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]:
|
|
50
|
-
[Can I Use]:
|
|
51
|
-
[cult-img]:
|
|
52
|
-
[PostCSS]:
|
|
53
|
-
[cult]:
|
|
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
package/lib/autoprefixer.d.ts
CHANGED
package/lib/hacks/gradient.js
CHANGED
|
@@ -4,7 +4,7 @@ let OldValue = require('../old-value')
|
|
|
4
4
|
let utils = require('../utils')
|
|
5
5
|
let Value = require('../value')
|
|
6
6
|
|
|
7
|
-
|
|
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
|
|
package/lib/hacks/grid-utils.js
CHANGED
package/lib/prefixes.js
CHANGED
|
@@ -192,7 +192,7 @@ class Prefixes {
|
|
|
192
192
|
return true
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
if (step ===
|
|
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(
|
|
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
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autoprefixer",
|
|
3
|
-
"version": "10.
|
|
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
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
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,25 +29,20 @@
|
|
|
29
29
|
"url": "https://github.com/sponsors/ai"
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
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.
|
|
43
|
-
"caniuse-lite": "^1.0.
|
|
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"
|
|
47
41
|
},
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"postcss": "^8.1.0"
|
|
44
|
+
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": "^10 || ^12 || >=14"
|
|
52
47
|
}
|
|
53
48
|
}
|