postcss-normalize-positions 5.1.0 → 6.0.0
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/package.json +3 -4
- package/src/index.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postcss-normalize-positions",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Normalize keyword values for position into length values.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -29,13 +29,12 @@
|
|
|
29
29
|
"url": "https://github.com/cssnano/cssnano/issues"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
|
-
"node": "^
|
|
32
|
+
"node": "^14 || ^16 || >=18.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"postcss": "^8.2.15"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"postcss": "^8.2.15"
|
|
39
|
-
}
|
|
40
|
-
"readme": "# [postcss][postcss]-normalize-positions\n\n> Normalize positions with PostCSS.\n\n## Install\n\nWith [npm](https://npmjs.org/package/postcss-normalize-positions) do:\n\n```\nnpm install postcss-normalize-positions --save\n```\n\n## Example\n\n### Input\n\n```css\ndiv {\n background-position: bottom left;\n}\n```\n\n### Output\n\n```css\ndiv {\n background-position:0 100%;\n}\n``` \n\n## Usage\n\nSee the [PostCSS documentation](https://github.com/postcss/postcss#usage) for\nexamples for your environment.\n\n## Contributors\n\nSee [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).\n\n## License\n\nMIT © [Ben Briggs](http://beneb.info)\n\n[postcss]: https://github.com/postcss/postcss\n"
|
|
39
|
+
}
|
|
41
40
|
}
|
package/src/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const verticalValue = new Map([
|
|
|
13
13
|
['top', '0'],
|
|
14
14
|
]);
|
|
15
15
|
const mathFunctions = new Set(['calc', 'min', 'max', 'clamp']);
|
|
16
|
-
|
|
16
|
+
const variableFunctions = new Set(['var', 'env', 'constant']);
|
|
17
17
|
/**
|
|
18
18
|
* @param {valueParser.Node} node
|
|
19
19
|
* @return {boolean}
|
|
@@ -31,7 +31,7 @@ function isVariableFunctionNode(node) {
|
|
|
31
31
|
return false;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
return
|
|
34
|
+
return variableFunctions.has(node.value.toLowerCase());
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/**
|