{"name":"postcss-clamp","version":"0.2.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"},"bugs":{"url":"https://github.com/polemius/postcss-clamp/issues"},"homepage":"https://github.com/polemius/postcss-clamp#readme","_id":"postcss-clamp@0.2.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-plNs+pqEz5Bn8w7G5QIaNpQPBrPyKmInPR9hwuJDLkuU0LtSfpcmUFuZwrsMjZabr92OXKGF3NrF9iBwnpZ68w==","shasum":"fd8b4699c34d9d5a5d67739ba906fc80a9c88b0f","tarball":"http://registry-npm.ywwl.com/postcss-clamp/download/postcss-clamp-0.2.0.tgz","fileCount":7,"unpackedSize":8467,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJerw84CRA9TVsSAnZWagAAoPQP/jBWFt7j9DZZlFzr3A9i\nK587MGdPLcFhKMSNW/1mVsdyY4uGn+a/4OyCQFRom5Y/2d/bho4RlXiwYwWR\nSDxcKbRhLxZ+Wfc9ZOVmKjL13uoRaZVahhaRCwiOQu0hGsyn9qZdExWHSTTp\ntdo28BuzbLfCIy8z3gevYLOHcd+KidIz58PYsv11dL8xET0yUnC0fb3hUthA\nMcXZIhkO+VFaFOmXSq/kQwN0eeKMuN3108C+c0a52v/jADnw0fViX3ztPzqq\njR5QnS9SXy61Hfs3rnOI5S2hYJJHMEZL0TUd1aLIjUK4u3aC8k3Q2T+cbONP\n8P5SWnGnXjJpoSXBVFl3oDHPe+IWC2DJ29jV2HLstPkrnX+ybbamELNBD+Fw\nHPr3NP9NLcilCnsiKpNxEuOk3/W8ErQ9voIyFBtqteBrGJHlPtwLSpjDEUR1\nKkYk7fp6YWdJduJiqfVxMkqsF/CjbivZZ4K5O16Rx469G7K5+dKJiohK6PbQ\nzitB27VTAcQnuxGunFFRPMjYINpFgFTjDDpapyDNquheQytO90FtFYfTwKgY\nJDOuF/kk0yklV+cVspfigLdy+WlnNe2LgGWuswTDhOLWXwIBQKYpg0SdMRy2\nv721bPImI6zcjvgzF564HsyIHR8okHm8YNIHXxTwOlN7KEkE7/cavhcGdxA+\nzvo+\r\n=26Tb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXBenOGgxcts+qUw43etxif2DTTFTk+GJnsc3QgjWBZAIgKeWTabSvyV0h9kw5FzNvqxY31t9LYDFI9PXVTsN0PDA="}],"size":3120,"noattachment":false,"key":"/postcss-clamp/-/postcss-clamp-0.2.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_0.2.0_1588530999442_0.25116487674665433"},"_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":1588530999571,"_cnpm_publish_time":1588530999571,"dist-tags":{"latest":"4.1.0"}}