postcss-minify-params
Advanced tools
Comparing version 5.1.2 to 5.1.3
{ | ||
"name": "postcss-minify-params", | ||
"version": "5.1.2", | ||
"version": "5.1.3", | ||
"description": "Minify at-rule params with PostCSS", | ||
@@ -40,4 +40,3 @@ "keywords": [ | ||
"postcss": "^8.2.15" | ||
}, | ||
"readme": "# postcss-minify-params [![Build Status][ci-img]][ci]\n\n> Minify at-rule params with PostCSS.\n\n```css\n@media only screen and ( min-width: 400px, min-height: 500px ) {\n h2{\n color:blue\n }\n}\n```\n\n```css\n@media only screen and (min-width:400px,min-height:500px) {\n h2{\n color:blue\n }\n}\n```\n\n## Usage\n\n```js\npostcss([ require('postcss-minify-params') ])\n```\n\nSee [PostCSS] docs for examples for your environment.\n\n## Contributors\n\nSee [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).\n\n## License\n\nMIT © [Bogdan Chadkin](mailto:trysound@yandex.ru)\n\n[PostCSS]: https://github.com/postcss/postcss\n[ci-img]: https://travis-ci.org/cssnano/postcss-minify-params.svg\n[ci]: https://travis-ci.org/cssnano/postcss-minify-params\n" | ||
} | ||
} |
@@ -133,9 +133,3 @@ 'use strict'; | ||
/** | ||
* @param {string} browser | ||
* @return {boolean} | ||
*/ | ||
function hasAllBug(browser) { | ||
return ['ie 10', 'ie 11'].includes(browser); | ||
} | ||
const allBugBrowers = new Set(['ie 10', 'ie 11']); | ||
@@ -154,2 +148,3 @@ /** | ||
const hasAllBug = browsers.some((browser) => allBugBrowers.has(browser)); | ||
return { | ||
@@ -159,3 +154,3 @@ postcssPlugin: 'postcss-minify-params', | ||
OnceExit(css) { | ||
css.walkAtRules(transform.bind(null, browsers.some(hasAllBug))); | ||
css.walkAtRules((rule) => transform(hasAllBug, rule)); | ||
}, | ||
@@ -162,0 +157,0 @@ }; |
6692
147