{"_id":"@csstools/postcss-mixins","_rev":"4266233","name":"@csstools/postcss-mixins","description":"Use mixins in CSS","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"alaguna","email":"a.laguna@funcion13.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"romainmenke","email":""}],"time":{"modified":"2026-04-06T16:28:51.000Z","created":"2026-01-14T18:09:39.127Z","1.0.0":"2026-01-14T18:09:39.127Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/csstools/postcss-plugins.git","directory":"plugins/postcss-mixins"},"versions":{"1.0.0":{"name":"@csstools/postcss-mixins","description":"Use mixins 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":"MIT-0","funding":[{"type":"github","url":"https://github.com/sponsors/csstools"},{"type":"opencollective","url":"https://opencollective.com/csstools"}],"engines":{"node":">=20.19.0"},"type":"module","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"}},"dependencies":{"@csstools/css-parser-algorithms":"^4.0.0","@csstools/css-tokenizer":"^4.0.0"},"peerDependencies":{"postcss":"^8.4"},"scripts":{},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-mixins#readme","repository":{"type":"git","url":"git+https://github.com/csstools/postcss-plugins.git","directory":"plugins/postcss-mixins"},"bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"keywords":["postcss-plugin"],"gitHead":"b67660b7a7af34cbfb48d2590d8b5cda5f3acf4c","_id":"@csstools/postcss-mixins@1.0.0","_nodeVersion":"25.1.0","_npmVersion":"11.6.2","dist":{"shasum":"c4e1f8dd5f2fa41a7ef6979e95b1621dadb46903","size":2912,"noattachment":false,"key":"/@csstools/postcss-mixins/-/@csstools/postcss-mixins-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@csstools/postcss-mixins/download/@csstools/postcss-mixins-1.0.0.tgz"},"_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"directories":{},"maintainers":[{"name":"alaguna","email":"a.laguna@funcion13.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"romainmenke","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postcss-mixins_1.0.0_1768414178963_0.538227254596126"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-01-14T18:09:39.127Z","publish_time":1768414179127,"_source_registry_name":"default","_cnpm_publish_time":1768414179127}},"readme":"# PostCSS Mixins [<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-mixins --save-dev`\n\n[PostCSS Mixins] lets you use `@mixin` and `@apply` following [CSS Mixins 1].\n\nSeveral specification aspects of CSS Mixins still need to be settled.  \nThis plugin is only a partial implementation to avoid conflicts with the final specification.\n\nUnsupported:\n- mixin arguments\n- `@contents` blocks\n- `@result` blocks\n- layered `@mixin` declarations\n- mixin overrides\n\n```css\n@mixin --foo() {\n\tcolor: green;\n}\n\n.foo {\n\t@apply --foo;\n}\n\n/* becomes */\n\n.foo {\n\tcolor: green;\n}\n```\n\n## Usage\n\nAdd [PostCSS Mixins] to your project:\n\n```bash\nnpm install postcss @csstools/postcss-mixins --save-dev\n```\n\nUse it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssMixins = require('@csstools/postcss-mixins');\n\npostcss([\n\tpostcssMixins(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n\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\npostcssMixins({ preserve: true })\n```\n\n```css\n@mixin --foo() {\n\tcolor: green;\n}\n\n.foo {\n\t@apply --foo;\n}\n\n/* becomes */\n\n@mixin --foo() {\n\tcolor: green;\n}\n\n.foo {\n\tcolor: green;\n\t@apply --foo;\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/#mixins\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/@csstools/postcss-mixins\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Mixins]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-mixins\n[CSS Mixins 1]: https://drafts.csswg.org/css-mixins/#mixin-rule\n","_attachments":{},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-mixins#readme","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"license":"MIT-0"}