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 CHANGED
@@ -522,23 +522,26 @@ f(prefixFullscreen, { match: /x(\s#2|$)/ }, browsers =>
522
522
  )
523
523
 
524
524
  // File selector button
525
- prefix(['::file-selector-button'], {
526
- selector: true,
527
- feature: 'fullscreen',
528
- browsers: [
529
- 'chrome 89',
530
- 'edge 89',
531
- 'firefox 82',
532
- 'opera 75',
533
- 'safari 14.1',
534
- 'android 89',
535
- 'and_chr 89',
536
- 'op_mob 63',
537
- 'and_ff 82',
538
- 'ios_saf 14.5',
539
- 'samsung 15.0'
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(['stretch'], {
597
+ prefix(['fit-content'], {
595
598
  props: sizeProps,
596
599
  feature: 'intrinsic-width',
597
600
  browsers
598
601
  })
599
602
  )
600
603
 
601
- f(prefixIntrinsic, { match: /x|\s#5/ }, browsers =>
602
- prefix(['fit-content'], {
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: 'intrinsic-width',
611
+ feature: 'css-width-stretch',
605
612
  browsers
606
613
  })
607
614
  )
@@ -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
@@ -532,7 +532,7 @@ function insertAreas(css, isDisabled) {
532
532
  if (lastRule) {
533
533
  lastRuleIndex = css.index(lastRule)
534
534
  } else {
535
- /* istanbul ignore next */
535
+ /* c8 ignore next 2 */
536
536
  lastRuleIndex = -1
537
537
  }
538
538
 
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.6",
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.17.1",
30
- "caniuse-lite": "^1.0.30001260",
31
- "fraction.js": "^4.1.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
- "postcss-value-parser": "^4.1.0"
36
+ "picocolors": "^1.0.0",
37
+ "postcss-value-parser": "^4.2.0"
35
38
  }
36
39
  }
package/tsconfig.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2018",
4
- "module": "commonjs",
5
- "allowJs": true,
6
- "strict": true,
7
- "noEmit": true,
8
- "esModuleInterop": true
9
- }
10
- }