{"_id":"postcss-less@7.0.1","bugs":{"url":"https://github.com/prettier/postcss-less/issues"},"dist":{"shasum":"b60a0ac8b854ea970f05a5be332f5e2e541d6f12","tarball":"http://registry-npm.ywwl.com/postcss-less/download/postcss-less-7.0.1.tgz","fileCount":11,"integrity":"sha512-ZLZPw5JIJUDoY9IVp/rBb5daDI1wChnw5+G9RMyA3MVydkLwR+yfYJD3et1fbxPJMthZsBKA5qWKtwrGZuJVQQ==","signatures":[{"sig":"MEYCIQCHURYSDJYQlvcQeeHNtvbCmC9xWqK4jx8R07NPwR2e9gIhALt/BIkQ51p4HonSkw137sHIlhxNyZO44SsRuxX3cxNo","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDOgxWjbgTwBsS+vX6fs7ivdGeFeMUyqMSqtcENh4022QIge31E31IPnsnVDBrq8NQxY3ENFXX4UZ04EsDxzzr4t5E="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/postcss-less@7.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":21033,"size":7320,"noattachment":false,"key":"/postcss-less/-/postcss-less-7.0.1.tgz"},"name":"postcss-less","type":"module","author":{"name":"Denys Kniazevych","email":"webschik@gmail.com"},"engines":{"node":">=22"},"exports":"./lib/index.js","gitHead":"953e5847449f38c783f634a60a59da47a69ce793","license":"MIT","version":"7.0.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"9400e68a-1aaa-4021-acb6-0ad9d000d162"}},"homepage":"https://github.com/prettier/postcss-less","keywords":["css","postcss","postcss-syntax","parser","less"],"maintainer":"Andrew Powell <andrew@shellscape.org>","repository":{"url":"git+https://github.com/prettier/postcss-less.git","type":"git"},"_npmVersion":"11.19.1","description":"LESS parser for PostCSS","directories":{},"maintainers":[{"name":"fisker","email":"lionkay@gmail.com"},{"name":"shellscape","email":"andrew@shellscape.org"}],"sideEffects":false,"_nodeVersion":"24.22.1","_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.5.32"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postcss-less_7.0.1_1793174761909_0.056312722789684466"},"readme":"[coverage_badge]: https://img.shields.io/codecov/c/github/prettier/postcss-less.svg?style=flat-square\n[coverage_link]: https://app.codecov.io/gh/prettier/postcss-less\n[license_badge]: https://img.shields.io/npm/l/postcss-less.svg?style=flat-square\n[license_link]: https://github.com/prettier/postcss-less/blob/main/license\n[package_version_badge]: https://img.shields.io/npm/v/postcss-less.svg?style=flat-square\n[package_link]: https://www.npmjs.com/package/postcss-less\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS-SCSS]: https://github.com/postcss/postcss-scss\n[LESS]: https://lesscss.org/\n[Autoprefixer]: https://github.com/postcss/autoprefixer\n[Stylelint]: http://stylelint.io/\n\n# postcss-less\n\n[![Npm Version][package_version_badge]][package_link]\n[![MIT License][license_badge]][license_link]\n[![Coverage][coverage_badge]][coverage_link]\n\nA [PostCSS] Syntax for parsing [LESS]\n\n_Note: This module requires Node v6.14.4+. `poscss-less` is not a LESS compiler. For compiling LESS, please use the official toolset for LESS._\n\n## Install\n\nUsing npm:\n\n```console\nnpm install postcss-less --save-dev\n```\n\n<a href=\"https://www.patreon.com/shellscape\">\n  <img src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" width=\"160\">\n</a>\n\nPlease consider [becoming a patron](https://www.patreon.com/shellscape) if you find this module useful.\n\n## Usage\n\nThe most common use of `postcss-less` is for applying PostCSS transformations directly to LESS source. eg. ia theme written in LESS which uses [Autoprefixer] to add appropriate vendor prefixes.\n\n```js\nimport postcss from 'postcss';\nimport syntax from 'postcss-less';\n\nconst result = await postcss().process(lessText, { syntax: syntax });\n\nresult.content; // LESS with transformations\n```\n\n## LESS Specific Parsing\n\n### `@import`\n\nParsing of LESS-specific `@import` statements and options are supported.\n\n```less\n@import (option) 'file.less';\n```\n\nThe AST will contain an `AtRule` node with:\n\n- an `import: true` property\n- a `filename: <String>` property containing the imported filename\n- an `options: <String>` property containing any [import options](http://lesscss.org/features/#import-atrules-feature-import-options) specified\n\n### Inline Comments\n\nParsing of single-line comments in CSS is supported.\n\n```less\n:root {\n  // Main theme color\n  --color: red;\n}\n```\n\nThe AST will contain a `Comment` node with an `inline: true` property.\n\n### Mixins\n\nParsing of LESS mixins is supported.\n\n```less\n.my-mixin {\n  color: black;\n}\n```\n\nThe AST will contain an `AtRule` node with a `mixin: true` property.\n\n#### `!important`\n\nMixins that declare `!important` will contain an `important: true` property on their respective node.\n\n### Variables\n\nParsing of LESS variables is supported.\n\n```less\n@link-color: #428bca;\n```\n\nThe AST will contain an `AtRule` node with a `variable: true` property.\n\n_Note: LESS variables are strictly parsed - a colon (`:`) must immediately follow a variable name._\n\n## Stringifying\n\nTo process LESS code without PostCSS transformations, custom stringifier\nshould be provided.\n\n```js\nimport postcss from 'postcss';\nimport syntax from 'postcss-less';\n\nconst less = `\n    // inline comment\n\n    .container {\n        .mixin-1();\n        .mixin-2;\n        .mixin-3 (@width: 100px) {\n            width: @width;\n        }\n    }\n\n    .rotation(@deg:5deg){\n      .transform(rotate(@deg));\n    }\n`;\n\nconst result = await postcss().process(less, { syntax });\n\n// will contain the value of `less`\nconst { content } = result;\n```\n\n## Use Cases\n\n- Lint LESS code with 3rd-party plugins.\n- Apply PostCSS transformations (such as [Autoprefixer](https://github.com/postcss/autoprefixer)) directly to the LESS source code\n\n## Meta\n\n[CONTRIBUTING](./.github/CONTRIBUTING)\n\n[LICENSE (MIT)](./LICENSE)\n","publish_time":1793174761992,"_cnpm_publish_time":1793174761992,"dist-tags":{"latest":"7.0.1"}}