postcss-minify-params 1.2.1 → 1.2.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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 1.2.2
2
+
3
+ * Resolves an issue where `all and` would be removed from
4
+ `@media not all and (conditions) {}`, causing an invalid media query to
5
+ be output.
6
+
1
7
  # 1.2.1
2
8
 
3
9
  * Resolves an issue where `1.2.0` would throw on empty function parentheses.
package/dist/index.js CHANGED
@@ -73,7 +73,12 @@ module.exports = postcss.plugin('postcss-minify-params', function () {
73
73
  } else if (node.type === 'space') {
74
74
  node.value = ' ';
75
75
  } else if (node.type === 'word') {
76
- if (node.value === 'all' && rule.name === 'media') {
76
+ var prevWord = params.nodes[index - 2];
77
+ if (
78
+ node.value === 'all' &&
79
+ rule.name === 'media' &&
80
+ !prevWord
81
+ ) {
77
82
  var nextSpace = params.nodes[index + 1];
78
83
  var nextWord = params.nodes[index + 2];
79
84
  var secondSpace = params.nodes[index + 3];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-minify-params",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Minify at-rule params with PostCSS",
5
5
  "keywords": [
6
6
  "postcss",