autoprefixer 10.4.15 → 10.4.17

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.
@@ -7,6 +7,11 @@ class UserSelect extends Declaration {
7
7
  insert(decl, prefix, prefixes) {
8
8
  if (decl.value === 'all' && prefix === '-ms-') {
9
9
  return undefined
10
+ } else if (
11
+ decl.value === 'contain' &&
12
+ (prefix === '-moz-' || prefix === '-webkit-')
13
+ ) {
14
+ return undefined
10
15
  } else {
11
16
  return super.insert(decl, prefix, prefixes)
12
17
  }
package/lib/processor.js CHANGED
@@ -458,12 +458,12 @@ class Processor {
458
458
  * Check for grid/flexbox options.
459
459
  */
460
460
  disabledDecl(node, result) {
461
- if (this.gridStatus(node, result) === false && node.type === 'decl') {
461
+ if (node.type === 'decl' && this.gridStatus(node, result) === false) {
462
462
  if (node.prop.includes('grid') || node.prop === 'justify-items') {
463
463
  return true
464
464
  }
465
465
  }
466
- if (this.prefixes.options.flexbox === false && node.type === 'decl') {
466
+ if (node.type === 'decl' && this.prefixes.options.flexbox === false) {
467
467
  let other = ['order', 'justify-content', 'align-items', 'align-content']
468
468
  if (node.prop.includes('flex') || other.includes(node.prop)) {
469
469
  return true
@@ -641,15 +641,16 @@ class Processor {
641
641
  })
642
642
 
643
643
  // Selectors
644
- for (let checker of this.prefixes.remove.selectors) {
645
- css.walkRules((rule, i) => {
644
+ css.walkRules((rule, i) => {
645
+ if (this.disabled(rule, result)) return
646
+
647
+ for (let checker of this.prefixes.remove.selectors) {
646
648
  if (checker.check(rule)) {
647
- if (!this.disabled(rule, result)) {
648
- rule.parent.removeChild(i)
649
- }
649
+ rule.parent.removeChild(i)
650
+ return
650
651
  }
651
- })
652
- }
652
+ }
653
+ })
653
654
 
654
655
  return css.walkDecls((decl, i) => {
655
656
  if (this.disabled(decl, result)) return
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "autoprefixer",
3
- "version": "10.4.15",
3
+ "version": "10.4.17",
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"
@@ -39,9 +39,9 @@
39
39
  "postcss": "^8.1.0"
40
40
  },
41
41
  "dependencies": {
42
- "browserslist": "^4.21.10",
43
- "caniuse-lite": "^1.0.30001520",
44
- "fraction.js": "^4.2.0",
42
+ "browserslist": "^4.22.2",
43
+ "caniuse-lite": "^1.0.30001578",
44
+ "fraction.js": "^4.3.7",
45
45
  "normalize-range": "^0.1.2",
46
46
  "picocolors": "^1.0.0",
47
47
  "postcss-value-parser": "^4.2.0"