postcss-flexbugs-fixes
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -20,7 +20,26 @@ var postcss = require('postcss'); | ||
var values = postcss.list.space(decl.value); | ||
var flexGrow = values[0]; | ||
var flexShrink = values[1] || '1'; | ||
var flexBasis = values[2] || '0%'; | ||
// set default values | ||
var flexGrow = '0'; | ||
var flexShrink = '1'; | ||
var flexBasis = '0%'; | ||
if (values[0]) { | ||
flexGrow = values[0]; | ||
} | ||
if (values[1]) { | ||
if (!isNaN(values[1])) { | ||
flexShrink = values[1]; | ||
} else { | ||
flexBasis = values[1]; | ||
} | ||
} | ||
if (values[2]) { | ||
flexBasis = values[2]; | ||
} | ||
decl.value = flexGrow + ' ' + flexShrink + ' ' + properBasis(flexBasis); | ||
} | ||
}; |
@@ -0,1 +1,4 @@ | ||
## 3.2.0 | ||
* Set flex basis if second value is not a number [#41](https://github.com/luisrudge/postcss-flexbugs-fixes/pull/41) | ||
## 3.1.0 | ||
@@ -2,0 +5,0 @@ * Fix safari issues with flex-basis [#38](https://github.com/luisrudge/postcss-flexbugs-fixes/pull/38) |
{ | ||
"name": "postcss-flexbugs-fixes", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "PostCSS plugin This project tries to fix all of flexbug's issues", | ||
@@ -5,0 +5,0 @@ "keywords": ["postcss", "css", "postcss-plugin", "flexbugs", "flexbox", "flex"], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7225
98