{"name":"@csstools/postcss-stepped-value-functions","description":"Use round, rem and mod functions in CSS","version":"3.0.10","contributors":[{"name":"Antonio Laguna","email":"antonio@laguna.es","url":"https://antonio.laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"license":"MIT-0","funding":[{"type":"github","url":"https://github.com/sponsors/csstools"},{"type":"opencollective","url":"https://opencollective.com/csstools"}],"engines":{"node":"^14 || ^16 || >=18"},"type":"module","main":"dist/index.cjs","module":"dist/index.mjs","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"default":"./dist/index.cjs"}}},"dependencies":{"@csstools/css-calc":"^1.2.4","@csstools/css-parser-algorithms":"^2.7.1","@csstools/css-tokenizer":"^2.4.1"},"peerDependencies":{"postcss":"^8.4"},"scripts":{},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-stepped-value-functions#readme","repository":{"type":"git","url":"git+https://github.com/csstools/postcss-plugins.git","directory":"plugins/postcss-stepped-value-functions"},"bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"keywords":["css","modulus","postcss-plugin","remainder","round","stepped"],"_id":"@csstools/postcss-stepped-value-functions@3.0.10","gitHead":"a1c5434f9ebc627f758d5ff6321696a950e2c18a","types":"./dist/index.d.ts","_nodeVersion":"22.1.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-MZwo0D0TYrQhT5FQzMqfy/nGZ28D1iFtpN7Su1ck5BPHS95+/Y5O9S4kEvo76f2YOsqwYcT8ZGehSI1TnzuX2g==","shasum":"41cf7b2fc6abc9216b453137a35aeeeb056d70d9","tarball":"http://registry-npm.ywwl.com/@csstools/postcss-stepped-value-functions/download/@csstools/postcss-stepped-value-functions-3.0.10.tgz","fileCount":7,"unpackedSize":9886,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDe20Cvk8oq8NHZVsHb49Jy5E5m3iBPi473Io1uHeDJfwIhAMjN6DsytHEOSVNWqSZYnYLvueUWIvwCD/dF28XyYyzW"}],"size":3341,"noattachment":false,"key":"/@csstools/postcss-stepped-value-functions/-/@csstools/postcss-stepped-value-functions-3.0.10.tgz"},"_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-stepped-value-functions_3.0.10_1720258722058_0.3955618038852917"},"_hasShrinkwrap":false,"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[<img alt=\"npm version\" src=\"https://img.shields.io/npm/v/@csstools/postcss-stepped-value-functions.svg\" height=\"20\">][npm-url] [<img alt=\"Build Status\" src=\"https://github.com/csstools/postcss-plugins/workflows/test/badge.svg\" height=\"20\">][cli-url] [<img alt=\"Discord\" src=\"https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white\">][discord]<br><br>[<img alt=\"Baseline Status\" src=\"https://cssdb.org/images/badges-baseline/stepped-value-functions.svg\" height=\"20\">][css-url] [<img alt=\"CSS Standard Status\" src=\"https://cssdb.org/images/badges/stepped-value-functions.svg\" height=\"20\">][css-url] \n\n```bash\nnpm install @csstools/postcss-stepped-value-functions --save-dev\n```\n\n[PostCSS Stepped Value Functions] lets you use `round`, `rem` and `mod` stepped value functions, following the [CSS Values 4].\n\n```pcss\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 3px 1px calc(3px + 50%);\n\ttransform: rotate(-50deg);\n\ttop: 16px;\n\tright: 16px;\n\tbottom: 21px;\n\tleft: 12px;\n\twidth: 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[PostCSS Stepped Value Functions] runs in all Node environments, with special\ninstructions for:\n\n- [Node](INSTALL.md#node)\n- [PostCSS CLI](INSTALL.md#postcss-cli)\n- [PostCSS Load Config](INSTALL.md#postcss-load-config)\n- [Webpack](INSTALL.md#webpack)\n- [Next.js](INSTALL.md#nextjs)\n- [Gulp](INSTALL.md#gulp)\n- [Grunt](INSTALL.md#grunt)\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```pcss\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 3px 1px calc(3px + 50%);\n\tpadding: 8px mod(18px, 5px) 1px calc(rem(15px, 6px) + 50%);\n\ttransform: rotate(-50deg);\n\ttransform: rotate(mod(-140deg, -90deg));\n\ttop: 16px;\n\ttop: round(15px, 4px);\n\tright: 16px;\n\tright: round(nearest, 15px, 4px);\n\tbottom: 21px;\n\tbottom: round(up, 15px, 7px);\n\tleft: 12px;\n\tleft: round(down, 15px, 4px);\n\twidth: 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":1720258722235,"maintainers":[{"name":"romainmenke","email":"romainmenke@gmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_cnpm_publish_time":1720258722235,"dist-tags":{"latest":"5.0.10"}}