autoprefixer 10.3.6 → 10.4.2
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/data/prefixes.js +28 -21
- package/lib/autoprefixer.js +3 -4
- package/lib/hacks/autofill.js +30 -0
- package/lib/hacks/grid-utils.js +1 -1
- package/lib/prefixes.js +2 -0
- package/package.json +9 -6
- package/tsconfig.json +0 -10
package/data/prefixes.js
CHANGED
|
@@ -522,23 +522,26 @@ f(prefixFullscreen, { match: /x(\s#2|$)/ }, browsers =>
|
|
|
522
522
|
)
|
|
523
523
|
|
|
524
524
|
// File selector button
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
525
|
+
let prefixFileSelectorButton = require('caniuse-lite/data/features/css-file-selector-button')
|
|
526
|
+
|
|
527
|
+
f(prefixFileSelectorButton, browsers =>
|
|
528
|
+
prefix(['::file-selector-button'], {
|
|
529
|
+
selector: true,
|
|
530
|
+
feature: 'file-selector-button',
|
|
531
|
+
browsers
|
|
532
|
+
})
|
|
533
|
+
)
|
|
534
|
+
|
|
535
|
+
// :autofill
|
|
536
|
+
let prefixAutofill = require('caniuse-lite/data/features/css-autofill')
|
|
537
|
+
|
|
538
|
+
f(prefixAutofill, browsers =>
|
|
539
|
+
prefix([':autofill'], {
|
|
540
|
+
selector: true,
|
|
541
|
+
feature: 'css-autofill',
|
|
542
|
+
browsers
|
|
543
|
+
})
|
|
544
|
+
)
|
|
542
545
|
|
|
543
546
|
// Tab size
|
|
544
547
|
let prefixTabsize = require('caniuse-lite/data/features/css3-tabsize')
|
|
@@ -591,17 +594,21 @@ f(prefixIntrinsic, { match: /x|\s#4/ }, browsers =>
|
|
|
591
594
|
)
|
|
592
595
|
|
|
593
596
|
f(prefixIntrinsic, { match: /x|\s#5/ }, browsers =>
|
|
594
|
-
prefix(['
|
|
597
|
+
prefix(['fit-content'], {
|
|
595
598
|
props: sizeProps,
|
|
596
599
|
feature: 'intrinsic-width',
|
|
597
600
|
browsers
|
|
598
601
|
})
|
|
599
602
|
)
|
|
600
603
|
|
|
601
|
-
|
|
602
|
-
|
|
604
|
+
// Stretch value
|
|
605
|
+
|
|
606
|
+
let prefixStretch = require('caniuse-lite/data/features/css-width-stretch')
|
|
607
|
+
|
|
608
|
+
f(prefixStretch, browsers =>
|
|
609
|
+
prefix(['stretch'], {
|
|
603
610
|
props: sizeProps,
|
|
604
|
-
feature: '
|
|
611
|
+
feature: 'css-width-stretch',
|
|
605
612
|
browsers
|
|
606
613
|
})
|
|
607
614
|
)
|
package/lib/autoprefixer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
let { yellow, red } = require('nanocolors')
|
|
2
1
|
let browserslist = require('browserslist')
|
|
3
2
|
let { agents } = require('caniuse-lite')
|
|
3
|
+
let pico = require('picocolors')
|
|
4
4
|
|
|
5
5
|
let Browsers = require('./browsers')
|
|
6
6
|
let Prefixes = require('./prefixes')
|
|
@@ -40,8 +40,7 @@ function timeCapsule(result, prefixes) {
|
|
|
40
40
|
if (Object.keys(prefixes.add).length > 2) {
|
|
41
41
|
return
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
/* istanbul ignore next */
|
|
43
|
+
/* c8 ignore next 11 */
|
|
45
44
|
result.warn(
|
|
46
45
|
'Autoprefixer target browsers do not need any prefixes.' +
|
|
47
46
|
'You do not need Autoprefixer anymore.\n' +
|
|
@@ -90,7 +89,7 @@ function plugin(...reqs) {
|
|
|
90
89
|
} else if (options.browsers) {
|
|
91
90
|
if (typeof console !== 'undefined' && console.warn) {
|
|
92
91
|
console.warn(
|
|
93
|
-
red(WARNING.replace(/`[^`]+`/g, i => yellow(i.slice(1, -1))))
|
|
92
|
+
pico.red(WARNING.replace(/`[^`]+`/g, i => pico.yellow(i.slice(1, -1))))
|
|
94
93
|
)
|
|
95
94
|
}
|
|
96
95
|
reqs = options.browsers
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
let Selector = require('../selector')
|
|
2
|
+
let utils = require('../utils')
|
|
3
|
+
|
|
4
|
+
class Autofill extends Selector {
|
|
5
|
+
constructor(name, prefixes, all) {
|
|
6
|
+
super(name, prefixes, all)
|
|
7
|
+
|
|
8
|
+
if (this.prefixes) {
|
|
9
|
+
this.prefixes = utils.uniq(
|
|
10
|
+
this.prefixes.map(i => {
|
|
11
|
+
return '-webkit-'
|
|
12
|
+
})
|
|
13
|
+
)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Return different selectors depend on prefix
|
|
19
|
+
*/
|
|
20
|
+
prefixed(prefix) {
|
|
21
|
+
if (prefix === '-webkit-') {
|
|
22
|
+
return ':-webkit-autofill'
|
|
23
|
+
}
|
|
24
|
+
return `:${prefix}autofill`
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
Autofill.names = [':autofill']
|
|
29
|
+
|
|
30
|
+
module.exports = Autofill
|
package/lib/hacks/grid-utils.js
CHANGED
package/lib/prefixes.js
CHANGED
|
@@ -65,7 +65,9 @@ let hackCrossFade = require('./hacks/cross-fade')
|
|
|
65
65
|
let hackDisplayFlex = require('./hacks/display-flex')
|
|
66
66
|
let hackDisplayGrid = require('./hacks/display-grid')
|
|
67
67
|
let hackFilterValue = require('./hacks/filter-value')
|
|
68
|
+
let hackAutofill = require('./hacks/autofill')
|
|
68
69
|
|
|
70
|
+
Selector.hack(hackAutofill)
|
|
69
71
|
Selector.hack(hackFullscreen)
|
|
70
72
|
Selector.hack(hackPlaceholder)
|
|
71
73
|
Selector.hack(hackPlaceholderShown)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autoprefixer",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.4.2",
|
|
4
4
|
"description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": "^10 || ^12 || >=14"
|
|
@@ -22,15 +22,18 @@
|
|
|
22
22
|
"author": "Andrey Sitnik <andrey@sitnik.ru>",
|
|
23
23
|
"license": "MIT",
|
|
24
24
|
"repository": "postcss/autoprefixer",
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/postcss/autoprefixer/issues"
|
|
27
|
+
},
|
|
25
28
|
"peerDependencies": {
|
|
26
29
|
"postcss": "^8.1.0"
|
|
27
30
|
},
|
|
28
31
|
"dependencies": {
|
|
29
|
-
"browserslist": "^4.
|
|
30
|
-
"caniuse-lite": "^1.0.
|
|
31
|
-
"fraction.js": "^4.1.
|
|
32
|
-
"nanocolors": "^0.2.8",
|
|
32
|
+
"browserslist": "^4.19.1",
|
|
33
|
+
"caniuse-lite": "^1.0.30001297",
|
|
34
|
+
"fraction.js": "^4.1.2",
|
|
33
35
|
"normalize-range": "^0.1.2",
|
|
34
|
-
"
|
|
36
|
+
"picocolors": "^1.0.0",
|
|
37
|
+
"postcss-value-parser": "^4.2.0"
|
|
35
38
|
}
|
|
36
39
|
}
|