autoprefixer
Advanced tools
Comparing version 9.7.0 to 9.7.1
# Change Log | ||
This project adheres to [Semantic Versioning](http://semver.org/). | ||
## 9.7.1 | ||
* Avoid unnecessary transitions in prefixed selectors (by Andrey Alexandrov). | ||
* Fix `fit-content` for Firefox. | ||
## 9.7 “Ad Victoriam” | ||
@@ -5,0 +9,0 @@ * Add `AUTOPREFIXER_GRID` env variable to enable Grid Layout polyfill for IE. |
@@ -377,5 +377,6 @@ "use strict"; | ||
var sizeProps = ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size', 'grid', 'grid-template', 'grid-template-rows', 'grid-template-columns', 'grid-auto-columns', 'grid-auto-rows']; | ||
f(intrinsic, function (browsers) { | ||
return prefix(['max-content', 'min-content', 'fit-content'], { | ||
props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size', 'grid', 'grid-template', 'grid-template-rows', 'grid-template-columns', 'grid-auto-columns', 'grid-auto-rows'], | ||
return prefix(['max-content', 'min-content'], { | ||
props: sizeProps, | ||
feature: 'intrinsic-width', | ||
@@ -389,6 +390,15 @@ browsers: browsers | ||
return prefix(['fill', 'fill-available', 'stretch'], { | ||
props: ['width', 'min-width', 'max-width', 'height', 'min-height', 'max-height', 'inline-size', 'min-inline-size', 'max-inline-size', 'block-size', 'min-block-size', 'max-block-size', 'grid', 'grid-template', 'grid-template-rows', 'grid-template-columns', 'grid-auto-columns', 'grid-auto-rows'], | ||
props: sizeProps, | ||
feature: 'intrinsic-width', | ||
browsers: browsers | ||
}); | ||
}); | ||
f(intrinsic, { | ||
match: /x|\s#5/ | ||
}, function (browsers) { | ||
return prefix(['fit-content'], { | ||
props: sizeProps, | ||
feature: 'intrinsic-width', | ||
browsers: browsers | ||
}); | ||
}); // Zoom cursors | ||
@@ -395,0 +405,0 @@ |
@@ -11,2 +11,4 @@ "use strict"; | ||
var Browsers = require('./browsers'); | ||
var Transition = | ||
@@ -32,3 +34,4 @@ /*#__PURE__*/ | ||
var add = this.prefixes.add[decl.prop]; | ||
var declPrefixes = add && add.prefixes || []; | ||
var vendorPrefixes = this.ruleVendorPrefixes(decl); | ||
var declPrefixes = vendorPrefixes || add && add.prefixes || []; | ||
var params = this.parse(decl.value); | ||
@@ -74,2 +77,8 @@ var names = params.map(function (i) { | ||
if (vendorPrefixes && !vendorPrefixes.some(function (p) { | ||
return prefix.includes(p); | ||
})) { | ||
continue; | ||
} | ||
var prefixed = this.prefixes.prefixed(prop, prefix); | ||
@@ -479,2 +488,21 @@ | ||
return undefined; | ||
} | ||
/** | ||
* Check if transition prop is inside vendor specific rule | ||
*/ | ||
; | ||
_proto.ruleVendorPrefixes = function ruleVendorPrefixes(decl) { | ||
var parent = decl.parent; | ||
if (parent.type !== 'rule') { | ||
return false; | ||
} else if (!parent.selector.includes(':-')) { | ||
return false; | ||
} | ||
var selectors = Browsers.prefixes().filter(function (s) { | ||
return parent.selector.includes(':' + s); | ||
}); | ||
return selectors.length > 0 ? selectors : false; | ||
}; | ||
@@ -481,0 +509,0 @@ |
{ | ||
"name": "autoprefixer", | ||
"version": "9.7.0", | ||
"version": "9.7.1", | ||
"description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website", | ||
@@ -14,7 +14,7 @@ "keywords": ["autoprefixer", "css", "prefix", "postcss", "postcss-plugin"], | ||
"browserslist": "^4.7.2", | ||
"caniuse-lite": "^1.0.30001004", | ||
"caniuse-lite": "^1.0.30001006", | ||
"chalk": "^2.4.2", | ||
"normalize-range": "^0.1.2", | ||
"num2fraction": "^1.2.2", | ||
"postcss": "^7.0.19", | ||
"postcss": "^7.0.21", | ||
"postcss-value-parser": "^4.0.2" | ||
@@ -21,0 +21,0 @@ }, |
@@ -312,3 +312,3 @@ # Autoprefixer [![Cult Of Martians][cult-img]][cult] | ||
The best way to use PostCSS with CSS-in-JS is [`astroturf`]. | ||
Add it’s loader to your `webpack.config.js`: | ||
Add its loader to your `webpack.config.js`: | ||
@@ -315,0 +315,0 @@ ```js |
337286
7662
Updatedcaniuse-lite@^1.0.30001006
Updatedpostcss@^7.0.21