{"name":"postcss-clamp","version":"1.1.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.29","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.1.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Ewoy/JBaW0mjEE1f1WAoOIpNEIW8Hpg6nWs4zWcStCYotphoLg2jy6N4osDNg4veV64wFetT43Fsblyshl62rQ==","shasum":"90a32ade1d3725f5bdca60e30b4298b82cf5f1a9","tarball":"http://registry-npm.ywwl.com/postcss-clamp/download/postcss-clamp-1.1.0.tgz","fileCount":7,"unpackedSize":14082,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetsc7CRA9TVsSAnZWagAA1OAP/2Q+FYSxC+r1gKueWWy6\ndDYiLoNQnlLbjto8BsWIDgks7QYvt/L0e61Ug2li2Km/O5U4LG3rDJZ4kaml\nGs3qXEj9ciyrUdBirjUwQJDtumbr125Kj2ei/Wt17oaIBk7dYPEMa68jWFDM\n+1doCyL/pywq6qSUhu+Pvv70xaUKiT6mpo3hw3TMrDcdI2vbot9CQhai1AMm\npI0vMUKkfCXvRyQHork/tV+A2Nb5oulMnl4AOwaHLR+DmgPPjYnXxLORJn0N\nXszQLn78ZuV0RdAapALbXTXPIyDeosuBHtoN/gSF7/t/LFMa7mD6tLb/P3kU\nC0366EPEHuYOXO9Dvo83TtDMxLRHPk62Myo77c7tGug12Q8868wRR5NlAeMy\n6zg46MIbxxREOUVuiQldgReN/EJSyx2YrqyU4A/mi0GTeFOxHOVPWI4cnw9R\nRgm0967VFwXze/yGCsj7Y67tOS15AeYiNETueK2tN64G/93B/duRr36IERyH\n1UNor/e7JidnE8rrKFhJOnW24VHpCcVJcoT2EbAxnhMoVSn3lI2KGJWO6OOq\nzkioVazy16ps0eSPpkVQfQxEUxBqDQ3FFSFrCWuN+VrEcDMzIuMeNsiHB91y\nmcvGrG9Y7pZPZ52xxV43UkdJK+jU8PxU/sv1bUEgAKgK5TH3+urHCk9L+FiI\nqwcE\r\n=omF6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICvOaVajhL+tfV73XJqRrsSB2GU/4pTkbOXQrmvffQ+3AiEAkujF+cw9oqPzcjof0RoB5Y1Waql5sV8WQFqEPjL1Kj4="}],"size":4125,"noattachment":false,"key":"/postcss-clamp/-/postcss-clamp-1.1.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.1.0_1589036859322_0.8816083188877881"},"_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":1589036859480,"_cnpm_publish_time":1589036859480,"dist-tags":{"latest":"4.1.0"}}