autoprefixer 10.5.1 → 10.5.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.
- package/README.md +1 -1
- package/lib/brackets.js +7 -3
- package/lib/hacks/gradient.js +12 -2
- package/lib/hacks/intrinsic.js +9 -0
- package/package.json +3 -3
package/README.md
CHANGED
package/lib/brackets.js
CHANGED
|
@@ -19,9 +19,13 @@ let brackets = {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
if (sym === ')') {
|
|
22
|
-
stack.
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
if (stack.length > 1) {
|
|
23
|
+
stack.pop()
|
|
24
|
+
current = last(stack)
|
|
25
|
+
current.push('')
|
|
26
|
+
} else {
|
|
27
|
+
current[current.length - 1] += sym
|
|
28
|
+
}
|
|
25
29
|
continue
|
|
26
30
|
}
|
|
27
31
|
|
package/lib/hacks/gradient.js
CHANGED
|
@@ -55,6 +55,10 @@ class Gradient extends Value {
|
|
|
55
55
|
continue
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
if (param.length === 0) {
|
|
59
|
+
continue
|
|
60
|
+
}
|
|
61
|
+
|
|
58
62
|
let color = parser.stringify(param[0])
|
|
59
63
|
if (param[1] && param[1].type === 'word') {
|
|
60
64
|
pos = param[1].value
|
|
@@ -75,7 +79,7 @@ class Gradient extends Value {
|
|
|
75
79
|
|
|
76
80
|
let div = param[param.length - 1]
|
|
77
81
|
params[i] = [{ type: 'word', value: stop }]
|
|
78
|
-
if (div.type === 'div' && div.value === ',') {
|
|
82
|
+
if (div && div.type === 'div' && div.value === ',') {
|
|
79
83
|
item = params[i].push(div)
|
|
80
84
|
}
|
|
81
85
|
result.push(item)
|
|
@@ -184,6 +188,9 @@ class Gradient extends Value {
|
|
|
184
188
|
* Replace old direction to new
|
|
185
189
|
*/
|
|
186
190
|
newDirection(params) {
|
|
191
|
+
if (!params[0]) {
|
|
192
|
+
return params
|
|
193
|
+
}
|
|
187
194
|
if (params[0].value === 'to') {
|
|
188
195
|
return params
|
|
189
196
|
}
|
|
@@ -297,7 +304,7 @@ class Gradient extends Value {
|
|
|
297
304
|
oldDirection(params) {
|
|
298
305
|
let div = this.cloneDiv(params[0])
|
|
299
306
|
|
|
300
|
-
if (params[0][0].value !== 'to') {
|
|
307
|
+
if (!params[0][0] || params[0][0].value !== 'to') {
|
|
301
308
|
return params.unshift([
|
|
302
309
|
{ type: 'word', value: Gradient.oldDirections.bottom },
|
|
303
310
|
div
|
|
@@ -328,6 +335,9 @@ class Gradient extends Value {
|
|
|
328
335
|
if (this.name !== 'linear-gradient') {
|
|
329
336
|
return false
|
|
330
337
|
}
|
|
338
|
+
if (nodes.length === 0) {
|
|
339
|
+
return false
|
|
340
|
+
}
|
|
331
341
|
if (nodes[0] && nodes[0].value.includes('deg')) {
|
|
332
342
|
return false
|
|
333
343
|
}
|
package/lib/hacks/intrinsic.js
CHANGED
|
@@ -6,6 +6,15 @@ function regexp(name) {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
class Intrinsic extends Value {
|
|
9
|
+
constructor(name, prefixes, all) {
|
|
10
|
+
super(name, prefixes, all)
|
|
11
|
+
if (this.isStretch() && prefixes.includes('-moz-')) {
|
|
12
|
+
// Generate -moz-available before -webkit-fill-available
|
|
13
|
+
// since -webkit-fill-available is closer to spec and FF supports both
|
|
14
|
+
this.prefixes = ['-moz-'].concat(prefixes.filter(i => i !== '-moz-'))
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
add(decl, prefix) {
|
|
10
19
|
if (decl.prop.includes('grid') && prefix !== '-webkit-') {
|
|
11
20
|
return undefined
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autoprefixer",
|
|
3
|
-
"version": "10.5.
|
|
3
|
+
"version": "10.5.3",
|
|
4
4
|
"description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"autoprefixer",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"main": "lib/autoprefixer.js",
|
|
34
34
|
"types": "lib/autoprefixer.d.ts",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"browserslist": "^4.28.
|
|
37
|
-
"caniuse-lite": "^1.0.
|
|
36
|
+
"browserslist": "^4.28.6",
|
|
37
|
+
"caniuse-lite": "^1.0.30001805",
|
|
38
38
|
"fraction.js": "^5.3.4",
|
|
39
39
|
"picocolors": "^1.1.1",
|
|
40
40
|
"postcss-value-parser": "^4.2.0"
|