{"_id":"@csstools/postcss-stepped-value-functions@5.0.6","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"659ec6ef5d9d209d21fb7ded2257bcf83e29538f","tarball":"http://registry-npm.ywwl.com/@csstools/postcss-stepped-value-functions/download/@csstools/postcss-stepped-value-functions-5.0.6.tgz","fileCount":6,"integrity":"sha512-6z4fubLWFQbH4bIpK12utCpHaxTNi7npNq8xFxwfvCPeIp59RdnMznETZ2pb6H9/v0fhDvaFDLFJbI4sNdzznA==","signatures":[{"sig":"MEUCIFlpQVilRUFVpi2g3v8lvMkuGTDzFIXjExvfh1SdreqIAiEA02YaLvnoZPGuWgTaCQz8i02WsvHwtYVMBNixRWJBqoQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEECukKSCq/04HuQ4nA89+14dEKO7LwXvJ3RrxWO9gV2AiA0Vp6P5GZ3n4mKkSDYBOc/uPsQviD8yeaJLL50i79IWg=="}],"unpackedSize":6706,"size":2873,"noattachment":false,"key":"/@csstools/postcss-stepped-value-functions/-/@csstools/postcss-stepped-value-functions-5.0.6.tgz"},"name":"@csstools/postcss-stepped-value-functions","type":"module","engines":{"node":">=20.19.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"funding":[{"url":"https://github.com/sponsors/csstools","type":"github"},{"url":"https://opencollective.com/csstools","type":"opencollective"}],"gitHead":"f3e296f85625b65bde2a55e9dd96398973cf21c1","license":"MIT-0","scripts":{},"version":"5.0.6","_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-stepped-value-functions#readme","keywords":["css","modulus","postcss-plugin","remainder","round","stepped"],"repository":{"url":"git+https://github.com/csstools/postcss-plugins.git","type":"git","directory":"plugins/postcss-stepped-value-functions"},"_npmVersion":"11.13.0","description":"Use round, rem and mod functions in CSS","directories":{},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"romainmenke","email":"romainmenke@gmail.com"}],"_nodeVersion":"26.1.0","contributors":[{"url":"https://antonio.laguna.es","name":"Antonio Laguna","email":"antonio@laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"dependencies":{"@csstools/css-calc":"^3.4.0","@csstools/css-tokenizer":"^4.0.0","@csstools/css-parser-algorithms":"^4.0.0"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postcss-stepped-value-functions_5.0.6_1789286642501_0.9864642961473855"},"readme":"# PostCSS Stepped Value Functions [<img src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\">][PostCSS]\n\n`npm install @csstools/postcss-stepped-value-functions --save-dev`\n\n[PostCSS Stepped Value Functions] lets you use `round`, `rem` and `mod` stepped value functions, following the [CSS Values 4] specification.\n\n```css\n.test-functions {\n\tpadding: 8px mod(18px, 5px) 1px calc(rem(15px, 6px) + 50%);\n\ttransform: rotate(mod(-140deg, -90deg));\n\ttop: round(15px, 4px);\n\tright: round(nearest, 15px, 4px);\n\tbottom: round(up, 15px, 7px);\n\tleft: round(down, 15px, 4px);\n\twidth: round(to-zero, 15px, 4px);\n}\n\n/* becomes */\n\n.test-functions {\n\tpadding: 8px calc(3px) 1px calc(calc(3px) + 50%);\n\ttransform: rotate(calc(-50deg));\n\ttop: calc(16px);\n\tright: calc(16px);\n\tbottom: calc(21px);\n\tleft: calc(12px);\n\twidth: calc(12px);\n}\n```\n\n## Usage\n\nAdd [PostCSS Stepped Value Functions] to your project:\n\n```bash\nnpm install postcss @csstools/postcss-stepped-value-functions --save-dev\n```\n\nUse it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssSteppedValueFunctions = require('@csstools/postcss-stepped-value-functions');\n\npostcss([\n\tpostcssSteppedValueFunctions(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n\n\n## ⚠️ About custom properties\n\nGiven the dynamic nature of custom properties it's impossible to know what the variable value is, which means the plugin can't compute a final value for the stylesheet. \n\nBecause of that, any usage that contains a `var` is skipped.\n\n## Options\n\n### preserve\n\nThe `preserve` option determines whether the original notation\nis preserved. By default, it is not preserved.\n\n```js\npostcssSteppedValueFunctions({ preserve: true })\n```\n\n```css\n.test-functions {\n\tpadding: 8px mod(18px, 5px) 1px calc(rem(15px, 6px) + 50%);\n\ttransform: rotate(mod(-140deg, -90deg));\n\ttop: round(15px, 4px);\n\tright: round(nearest, 15px, 4px);\n\tbottom: round(up, 15px, 7px);\n\tleft: round(down, 15px, 4px);\n\twidth: round(to-zero, 15px, 4px);\n}\n\n/* becomes */\n\n.test-functions {\n\tpadding: 8px calc(3px) 1px calc(calc(3px) + 50%);\n\tpadding: 8px mod(18px, 5px) 1px calc(rem(15px, 6px) + 50%);\n\ttransform: rotate(calc(-50deg));\n\ttransform: rotate(mod(-140deg, -90deg));\n\ttop: calc(16px);\n\ttop: round(15px, 4px);\n\tright: calc(16px);\n\tright: round(nearest, 15px, 4px);\n\tbottom: calc(21px);\n\tbottom: round(up, 15px, 7px);\n\tleft: calc(12px);\n\tleft: round(down, 15px, 4px);\n\twidth: calc(12px);\n\twidth: round(to-zero, 15px, 4px);\n}\n```\n\n[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test\n[css-url]: https://cssdb.org/#stepped-value-functions\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/@csstools/postcss-stepped-value-functions\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Stepped Value Functions]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-stepped-value-functions\n[CSS Values 4]: https://www.w3.org/TR/css-values-4/#round-func\n","publish_time":1789286642581,"_cnpm_publish_time":1789286642581,"dist-tags":{"latest":"5.0.10"}}