{"name":"postcss-clamp","version":"1.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":"^7.0.28","postcss-value-parser":"^4.1.0"},"engines":{"node":">=7.6.0"},"bugs":{"url":"https://github.com/polemius/postcss-clamp/issues"},"homepage":"https://github.com/polemius/postcss-clamp#readme","_id":"postcss-clamp@1.0.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-hhuLCLw2dhExWw59wpMY9j2K33reA6oxyT2iQk+LXZyXpBqLG6i4wWpnOY2MHvfO+Hz6O3vECFK60CbcrdL71w==","shasum":"4061b304fe19d6788b2d8ba8c37e816d7256463c","tarball":"http://registry-npm.ywwl.com/postcss-clamp/download/postcss-clamp-1.0.0.tgz","fileCount":7,"unpackedSize":14022,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesaPoCRA9TVsSAnZWagAAuJgP/3tbD88+tOZy6Djt9Kr1\niIRHIKVMxvfyPKmSiTFeFy6g5AAukqz1RFSh0ecF9T2xKFZsn28dq16nTPQa\nVFIbyYu/7hJQ0KO0aLQfzmjjCzQMeiWJVZGS7HFblEyGOqk5j6sgOQYP2oTc\ngIIe5foC2lgEVgWy5V+SEwmMdJaj5ptXAm1qrSPBr9fGZ88mLmGSTMLBlDfi\nKgAYsy9+pUgEb/0N1HwVWGYThczvt65Tov7rW5Ol/hHT0A+sT8i2XUMkRrUH\n+avUOY4gaZAm/bSV++tvb1QchSLXipN1fnDCePavk4kKR1b9Q9z4/HrDUmZd\n2dHqoO6/GoANaC8fcrT1V50DNR92Q2/g+5hqG8AEAt8wtSyhxa18pr1KK5g/\nD6dwfK8KFI1KuouoKq5nVs/5rAdnXq+kMDRV/q6TJVQctPreJ5mjMiL7/3YQ\nr8eZ1TxWCNLdCVwOnFXIZHVjyOZ4sh25MIrheXOt8olVvwNj7234NGfGuPh0\na1o/DskZ9GSO7AMrmEpelcYGJOBuV2fT1Neh1AXAFLPKA5NPsFIyf31y1Evm\nT511oqSzldo1qi0dlzZJ2j2XkvkBHmGho5ROTybuWOHiAZd5Ecb0G8zV5O+M\nO683fTmy3PlF05YnwMwjkZx6SZk7OyJppjeZp7Rwxu5NpL8/xXnvqQaR1RQH\nMpZX\r\n=XVRM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBYh4Y55h3Lb/hOFnJLJ7puqb2lQ3uJGIvSB9pm+9UMPAiEAio+dYc5uUx4+BW/z4WCl/gR7vcA9rbOmOSH2Ct8ivno="}],"size":4100,"noattachment":false,"key":"/postcss-clamp/-/postcss-clamp-1.0.0.tgz"},"maintainers":[{"name":"polemius","email":"ivan.menshykov@gmail.com"}],"_npmUser":{"name":"polemius","email":"ivan.menshykov@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-clamp_1.0.0_1588700134299_0.692331078552459"},"_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":1588700134413,"_cnpm_publish_time":1588700134413,"dist-tags":{"latest":"4.1.0"}}