{"_id":"@csstools/postcss-stepped-value-functions","_rev":"259775","name":"@csstools/postcss-stepped-value-functions","description":"Use round, rem and mod functions in CSS","dist-tags":{"latest":"2.1.0"},"maintainers":[{"name":"alaguna","email":""},{"name":"jonathantneal","email":""}],"time":{"modified":"2023-03-27T17:09:30.000Z","created":"2022-05-02T12:06:36.264Z","2.1.0":"2023-02-21T16:24:53.392Z","2.0.1":"2023-01-28T07:59:35.723Z","2.0.0":"2023-01-24T09:17:39.677Z","1.0.1":"2022-07-08T17:08:04.573Z","1.0.0":"2022-05-02T12:06:36.264Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/csstools/postcss-plugins.git","directory":"plugins/postcss-stepped-value-functions"},"versions":{"2.1.0":{"name":"@csstools/postcss-stepped-value-functions","description":"Use round, rem and mod functions in CSS","version":"2.1.0","contributors":[{"name":"Antonio Laguna","email":"antonio@laguna.es","url":"https://antonio.laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"license":"CC0-1.0","funding":{"type":"opencollective","url":"https://opencollective.com/csstools"},"engines":{"node":"^14 || ^16 || >=18"},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs","default":"./dist/index.mjs"}},"dependencies":{"@csstools/css-calc":"^1.0.0","@csstools/css-parser-algorithms":"^2.0.1","@csstools/css-tokenizer":"^2.0.1"},"peerDependencies":{"postcss":"^8.4"},"scripts":{"prebuild":"npm run clean","build":"rollup -c ../../rollup/default.mjs","clean":"node -e \"fs.rmSync('./dist', { recursive: true, force: true }); fs.mkdirSync('./dist');\"","docs":"node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs","lint":"npm run lint:eslint && npm run lint:package-json","lint:eslint":"eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern","lint:package-json":"node ../../.github/bin/format-package-json.mjs","prepublishOnly":"npm run clean && npm run build && npm run test","test":"node .tape.mjs && npm run test:exports","test:exports":"node ./test/_import.mjs && node ./test/_require.cjs","test:rewrite-expects":"REWRITE_EXPECTS=true node .tape.mjs"},"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"],"csstools":{"cssdbId":"stepped-value-functions","exportName":"postcssSteppedValueFunctions","humanReadableName":"PostCSS Stepped Value Functions","specUrl":"https://www.w3.org/TR/css-values-4/#round-func"},"volta":{"extends":"../../package.json"},"gitHead":"b2f6224986cdd29b8d106a8873fe88a52cb794ab","_id":"@csstools/postcss-stepped-value-functions@2.1.0","_nodeVersion":"18.13.0","_npmVersion":"9.4.1","dist":{"shasum":"8ca134a7f70e00b14f5796fb32ed33a656ba0b1b","size":6216,"noattachment":false,"key":"/@csstools/postcss-stepped-value-functions/-/@csstools/postcss-stepped-value-functions-2.1.0.tgz","tarball":"http://name.csiicloud.com:7001/@csstools/postcss-stepped-value-functions/download/@csstools/postcss-stepped-value-functions-2.1.0.tgz"},"_npmUser":{"name":"alaguna","email":"sombragriselros@gmail.com"},"directories":{},"maintainers":[{"name":"alaguna","email":""},{"name":"jonathantneal","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-stepped-value-functions_2.1.0_1676996693234_0.05183055866743169"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-21T16:24:53.392Z","publish_time":1676996693392,"_cnpm_publish_time":1676996693392},"2.0.1":{"name":"@csstools/postcss-stepped-value-functions","description":"Use round, rem and mod functions in CSS","version":"2.0.1","contributors":[{"name":"Antonio Laguna","email":"antonio@laguna.es","url":"https://antonio.laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"license":"CC0-1.0","funding":{"type":"opencollective","url":"https://opencollective.com/csstools"},"engines":{"node":"^14 || ^16 || >=18"},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs","default":"./dist/index.mjs"}},"dependencies":{"postcss-value-parser":"^4.2.0"},"peerDependencies":{"postcss":"^8.4"},"scripts":{"prebuild":"npm run clean","build":"rollup -c ../../rollup/default.mjs","clean":"node -e \"fs.rmSync('./dist', { recursive: true, force: true }); fs.mkdirSync('./dist');\"","docs":"node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs","lint":"npm run lint:eslint && npm run lint:package-json","lint:eslint":"eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern","lint:package-json":"node ../../.github/bin/format-package-json.mjs","prepublishOnly":"npm run clean && npm run build && npm run test","test":"node .tape.mjs && npm run test:exports","test:exports":"node ./test/_import.mjs && node ./test/_require.cjs","test:rewrite-expects":"REWRITE_EXPECTS=true node .tape.mjs"},"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"],"csstools":{"cssdbId":"stepped-value-functions","exportName":"postcssSteppedValueFunctions","humanReadableName":"PostCSS Stepped Value Functions","specUrl":"https://www.w3.org/TR/css-values-4/#round-func"},"volta":{"extends":"../../package.json"},"gitHead":"c9f96e03617a2ca3daba02b2b224cc13fa0ce99e","_id":"@csstools/postcss-stepped-value-functions@2.0.1","_nodeVersion":"18.8.0","_npmVersion":"8.18.0","dist":{"shasum":"674bfca93d063d9ea3262c773d0e1cec3e07d2eb","size":7158,"noattachment":false,"key":"/@csstools/postcss-stepped-value-functions/-/@csstools/postcss-stepped-value-functions-2.0.1.tgz","tarball":"http://name.csiicloud.com:7001/@csstools/postcss-stepped-value-functions/download/@csstools/postcss-stepped-value-functions-2.0.1.tgz"},"_npmUser":{"name":"alaguna","email":"sombragriselros@gmail.com"},"directories":{},"maintainers":[{"name":"alaguna","email":""},{"name":"jonathantneal","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-stepped-value-functions_2.0.1_1674892775546_0.27352639163290804"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-28T07:59:35.723Z","publish_time":1674892775723,"_cnpm_publish_time":1674892775723},"2.0.0":{"name":"@csstools/postcss-stepped-value-functions","description":"Use round, rem and mod functions in CSS","version":"2.0.0","contributors":[{"name":"Antonio Laguna","email":"antonio@laguna.es","url":"https://antonio.laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"license":"CC0-1.0","funding":{"type":"opencollective","url":"https://opencollective.com/csstools"},"engines":{"node":"^14 || ^16 || >=18"},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","default":"./dist/index.mjs"}},"dependencies":{"postcss-value-parser":"^4.2.0"},"peerDependencies":{"postcss":"^8.4"},"scripts":{"prebuild":"npm run clean","build":"rollup -c ../../rollup/default.mjs","clean":"node -e \"fs.rmSync('./dist', { recursive: true, force: true }); fs.mkdirSync('./dist');\"","docs":"node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs","lint":"npm run lint:eslint && npm run lint:package-json","lint:eslint":"eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern","lint:package-json":"node ../../.github/bin/format-package-json.mjs","prepublishOnly":"npm run clean && npm run build && npm run test","test":"node .tape.mjs && npm run test:exports","test:exports":"node ./test/_import.mjs && node ./test/_require.cjs","test:rewrite-expects":"REWRITE_EXPECTS=true node .tape.mjs"},"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"],"csstools":{"cssdbId":"stepped-value-functions","exportName":"postcssSteppedValueFunctions","humanReadableName":"PostCSS Stepped Value Functions","specUrl":"https://www.w3.org/TR/css-values-4/#round-func"},"volta":{"extends":"../../package.json"},"gitHead":"217319b6b507597104b0a0304c470ec610a30982","_id":"@csstools/postcss-stepped-value-functions@2.0.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"shasum":"7bc749e0709d57999d944b33c01308f533114ae8","size":7126,"noattachment":false,"key":"/@csstools/postcss-stepped-value-functions/-/@csstools/postcss-stepped-value-functions-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/@csstools/postcss-stepped-value-functions/download/@csstools/postcss-stepped-value-functions-2.0.0.tgz"},"_npmUser":{"name":"alaguna","email":"sombragriselros@gmail.com"},"directories":{},"maintainers":[{"name":"alaguna","email":""},{"name":"jonathantneal","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-stepped-value-functions_2.0.0_1674551859549_0.4435062323263379"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-01-24T09:17:39.677Z","publish_time":1674551859677,"_cnpm_publish_time":1674551859677},"1.0.1":{"name":"@csstools/postcss-stepped-value-functions","description":"Use round, rem and mod functions in CSS","version":"1.0.1","contributors":[{"name":"Antonio Laguna","email":"antonio@laguna.es","url":"https://antonio.laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"license":"CC0-1.0","funding":{"type":"opencollective","url":"https://opencollective.com/csstools"},"engines":{"node":"^12 || ^14 || >=16"},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","default":"./dist/index.mjs"}},"dependencies":{"postcss-value-parser":"^4.2.0"},"peerDependencies":{"postcss":"^8.2"},"scripts":{"build":"rollup -c ../../rollup/default.js","clean":"node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"","docs":"node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs","lint":"npm run lint:eslint && npm run lint:package-json","lint:eslint":"eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern","lint:package-json":"node ../../.github/bin/format-package-json.mjs","prepublishOnly":"npm run clean && npm run build && npm run test","test":"node .tape.mjs && npm run test:exports","test:exports":"node ./test/_import.mjs && node ./test/_require.cjs","test:rewrite-expects":"REWRITE_EXPECTS=true node .tape.mjs"},"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"],"csstools":{"cssdbId":"stepped-value-functions","exportName":"postcssSteppedValueFunctions","humanReadableName":"PostCSS Stepped Value Functions","specUrl":"https://www.w3.org/TR/css-values-4/#round-func"},"volta":{"extends":"../../package.json"},"gitHead":"c4db85e08e331c9969f725d1adbb4ce6455b9c5a","_id":"@csstools/postcss-stepped-value-functions@1.0.1","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"shasum":"f8772c3681cc2befed695e2b0b1d68e22f08c4f4","size":7290,"noattachment":false,"key":"/@csstools/postcss-stepped-value-functions/-/@csstools/postcss-stepped-value-functions-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/@csstools/postcss-stepped-value-functions/download/@csstools/postcss-stepped-value-functions-1.0.1.tgz"},"_npmUser":{"name":"alaguna","email":"sombragriselros@gmail.com"},"directories":{},"maintainers":[{"name":"alaguna","email":""},{"name":"jonathantneal","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-stepped-value-functions_1.0.1_1657300084382_0.6495762131920844"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-07-08T17:26:01.136Z","publish_time":1657300084573,"_cnpm_publish_time":1657300084573},"1.0.0":{"name":"@csstools/postcss-stepped-value-functions","description":"Use round, rem and mod functions in CSS","version":"1.0.0","contributors":[{"name":"Antonio Laguna","email":"antonio@laguna.es","url":"https://antonio.laguna.es"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"license":"CC0-1.0","funding":{"type":"opencollective","url":"https://opencollective.com/csstools"},"engines":{"node":"^12 || ^14 || >=16"},"main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.cjs","default":"./dist/index.mjs"}},"dependencies":{"postcss-value-parser":"^4.2.0"},"peerDependencies":{"postcss":"^8.3"},"scripts":{"build":"rollup -c ../../rollup/default.js","clean":"node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"","docs":"node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs","lint":"npm run lint:eslint && npm run lint:package-json","lint:eslint":"eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern","lint:package-json":"node ../../.github/bin/format-package-json.mjs","prepublishOnly":"npm run clean && npm run build && npm run test","test":"node .tape.mjs && npm run test:exports","test:exports":"node ./test/_import.mjs && node ./test/_require.cjs","test:rewrite-expects":"REWRITE_EXPECTS=true node .tape.mjs"},"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"],"csstools":{"cssdbId":"stepped-value-functions","exportName":"postcssSteppedValueFunctions","humanReadableName":"PostCSS Stepped Value Functions","specUrl":"https://www.w3.org/TR/css-values-4/#round-func"},"volta":{"extends":"../../package.json"},"gitHead":"820e7f35b03e394d2d868b3f74b461b90a93cb00","_id":"@csstools/postcss-stepped-value-functions@1.0.0","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"shasum":"f8ffc05e163ba7bcbefc5fdcaf264ce9fd408c16","size":7319,"noattachment":false,"key":"/@csstools/postcss-stepped-value-functions/-/@csstools/postcss-stepped-value-functions-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/@csstools/postcss-stepped-value-functions/download/@csstools/postcss-stepped-value-functions-1.0.0.tgz"},"_npmUser":{"name":"alaguna","email":"sombragriselros@gmail.com"},"directories":{},"maintainers":[{"name":"alaguna","email":""},{"name":"jonathantneal","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-stepped-value-functions_1.0.0_1651493196124_0.05433294817951917"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-05-02T12:06:43.403Z","publish_time":1651493196264,"_cnpm_publish_time":1651493196264}},"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=\"CSS Standard Status\" src=\"https://cssdb.org/images/badges/stepped-value-functions.svg\" height=\"20\">][css-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]\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","_attachments":{},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-stepped-value-functions#readme","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"license":"CC0-1.0"}