{"name":"postcss-clamp","version":"4.0.0","description":"PostCSS plugin to transform clamp() to combination of min/max","keywords":["postcss","css","postcss-plugin","clamp","min","max"],"main":"index.js","repository":{"type":"git","url":"git+https://github.com/polemius/postcss-clamp.git"},"author":{"name":"Ivan Menshykov","email":"ivan.menshykov@gmail.com"},"license":"MIT","dependencies":{"postcss-value-parser":"^4.2.0"},"peerDependencies":{"postcss":"^8.4.6"},"engines":{"node":">=7.6.0"},"gitHead":"c5950ff10c6d7852cec4cbfc2cc94b73eab2ec66","bugs":{"url":"https://github.com/polemius/postcss-clamp/issues"},"homepage":"https://github.com/polemius/postcss-clamp#readme","_id":"postcss-clamp@4.0.0","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-FsMmeBZtymFN7Jtlnw9is8I4nB+qEEb/qS0ZLTIqcKiwZyHBq44Yhv29Q+VQsTGHYFqIr/s/9tqvNM7j+j1d+g==","shasum":"766d3dbaa2dc56e8bea1b690291b632c0c5bf728","tarball":"http://registry-npm.ywwl.com/postcss-clamp/download/postcss-clamp-4.0.0.tgz","fileCount":6,"unpackedSize":16591,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiDU5+CRA9TVsSAnZWagAApocP/iOs/XZefAtsW6Efkjb7\nCItAKr8hDSaOEChOxoAFiDfVvYaiRRtOFpfAm29vN2wHG9JQqWNN8MbIEtQ+\nBDLrZtz4TS6dmVU3SunTbDg3VVD/HN1Xip1cX46bu9kLG2ao7MJ6D5/PZ4cS\nodm4UR0+VmocYdzbp6FaTkj0wpdq822Oi8bzci/Smf55UIEwq52oJD0Kxcpd\nQxuIXm5z5KOaEyeL8/S6MfEsmNEZmlSlN5FTNHp8YWssW8zws5L47SO6r4y8\nygTpeKRS70pr0oF0yPgGi+vmYs7d34bDOAwLqO1w6g27PP6KLnsc7Z5iAxdp\nTmcvos5oIBXfroaENHi/O40rvnOp2M4Mabcuc7g+k5KV5/kBblWJKZIP9AU8\nqp8VmkcoW/VnxsTBdnZxuSAWYKu6BGLX3JLoTxfI0/fmDKMrjTvNDrDxCuO3\nPjf5CuAH7tKcmO58ZzJI2UNl6OPhF3/icimKr3Y0vtqua3NTwYilyCAnKGkk\nu3QbvHFn4EdWfy3y6tbN2ds6YeYrRZrXP3DIowIaRM7ht0W4w7wgaQ5w3WJ7\nekDFM5HMZrUt3rqxYhJUU6J7GsNOcTLMGU1QZhkydZDPDxhta5iLiqh0TpdP\nSqjgS5trYuisYU1Po5L4Z18bIvsIQzLEkssJliW85xU/EGBZEq9I7RuTkybJ\nQxfr\r\n=ouRV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6/opSPEs+8ZR8RBgC0KI7etHMkbejqdPWIAuc0yRoqAIgf4cjhDc1C2qzcWqXEqW7Xs17EM2pLo0LKKa/DO9KTik="}],"size":4397,"noattachment":false,"key":"/postcss-clamp/-/postcss-clamp-4.0.0.tgz"},"_npmUser":{"name":"polemius","email":"ivan.menshykov@gmail.com"},"directories":{},"maintainers":[{"name":"polemius","email":"ivan.menshykov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-clamp_4.0.0_1645039230541_0.1969272388772818"},"_hasShrinkwrap":false,"readme":"# PostCSS Clamp\n[![Build Status][ci-img]][ci] [![codecov.io][cov-img]][cov]\n\n[PostCSS] plugin to transform `clamp()` to combination of `min/max`.\n\n[PostCSS]:    https://github.com/postcss/postcss\n[ci-img]:     https://travis-ci.com/polemius/postcss-clamp.svg?branch=master\n[ci]:         https://travis-ci.com/polemius/postcss-clamp\n[cov-img]: https://codecov.io/github/polemius/postcss-clamp/coverage.svg?branch=master\n[cov]:        https://codecov.io/github/polemius/postcss-clamp?branch=master\n\nThis plugin transform this css:\n\n```css\n.foo {\n  width: clamp(10px, 4em, 80px);\n}\n```\n\ninto this:\n\n```css\n.foo {\n  width: max(10px, min(4em, 80px));\n}\n```\n\nOr with enabled options `precalculate`:\n\n```css\n.foo {\n  width: clamp(10em, 4px, 10px);\n}\n\n/* becomes */\n\n.foo {\n  width: max(10em, 14px);\n}\n```\n\n[!['Can I use' table](https://caniuse.bitsofco.de/image/css-math-functions.png)](https://caniuse.com/#feat=css-math-functions)\n\n## Instalation\n\n```bash\n$ npm install postcss postcss-clamp --save-dev\nor\n$ yarn add --dev postcss postcss-clamp\n```\n\n## Usage\n\nUse [PostCSS Clamp] as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssClamp = require('postcss-clamp');\n\npostcss([\n  postcssClamp(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n[PostCSS Clamp] runs in all Node environments, with special instructions for:\n\n| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |\n| --- | --- | --- | --- | --- | --- |\n\nSee [PostCSS] docs for examples for your environment.\n\n## Options\n\n### precalculate\n\nThe `precalculate` option determines whether values with the same unit\nshould be precalculated. By default, these are not precalculation.\n\n```js\npostcssColorHexAlpha({\n  precalculate: true\n});\n```\n\nThe second and third value has the same unit (`px`):\n\n```css\n.foo {\n  width: clamp(10em, 4px, 10px);\n}\n\n/* becomes */\n\n.foo {\n  width: max(10em, 14px);\n}\n```\n\nHere all values have the same unit:\n\n```css\n.foo {\n  width: clamp(10px, 4px, 10px);\n}\n\n/* becomes */\n\n.foo {\n  width: 24px;\n}\n```\n\n## LICENSE\n\nSee [LICENSE](LICENSE)\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Clamp]: https://github.com/polemius/postcss-clamp\n","publish_time":1645039230678,"_cnpm_publish_time":1645039230678,"dist-tags":{"latest":"4.1.0"}}