{"_id":"@csstools/postcss-content-alt-text@3.0.8","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"54d105fd0039afb0195b99a3efaf6c32627bb36a","tarball":"http://registry-npm.ywwl.com/@csstools/postcss-content-alt-text/download/@csstools/postcss-content-alt-text-3.0.8.tgz","fileCount":6,"integrity":"sha512-DjVAcITXMwRuMCSofTctbvwLUPG6XwqIJ0T3YubQ6vKn4hiXfi4kuAUsGAsxXiOz9yZB69eRL7OjOpi4iL62VA==","signatures":[{"sig":"MEUCIFQPJgGs1muwCg+9lhql0nEE5uwA5R25P+JnpUh6F5MiAiEAiq8lUrRbksxK1/Tq6bAfbRnQdtOeN9e5Rzr9bgIakT0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCICRgv4XF8YZGzWV2v3UhRDEiyDetSVkhI5DOxf0Kha7OAiEA9mPU/v6gv3btNPHVfgFRvIIIaKGoQJvcbwmdE6c1cBQ="}],"unpackedSize":7802,"size":3130,"noattachment":false,"key":"/@csstools/postcss-content-alt-text/-/@csstools/postcss-content-alt-text-3.0.8.tgz"},"name":"@csstools/postcss-content-alt-text","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":"2b307eec61ce219b2ff15afb9293d164ca1c15c6","license":"MIT-0","scripts":{},"version":"3.0.8","_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-content-alt-text#readme","keywords":["accessibility","alt","content","css","csswg","fallback","postcss","postcss-plugin","w3c"],"repository":{"url":"git+https://github.com/csstools/postcss-plugins.git","type":"git","directory":"plugins/postcss-content-alt-text"},"_npmVersion":"11.13.0","description":"Generate fallback values for content with alt text","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/utilities":"^3.0.0","@csstools/css-tokenizer":"^4.0.2","@csstools/css-parser-algorithms":"^4.0.2","@csstools/postcss-progressive-custom-properties":"^5.1.5"},"_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/postcss-content-alt-text_3.0.8_1793293613636_0.6727289624072698"},"readme":"# PostCSS Content Alt Text [<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-content-alt-text --save-dev`\n\n[PostCSS Content Alt Text] generates fallback values for `content` with alt text following the [CSS Generated Content Module].\n\n```css\n.foo {\n\tcontent: url(tree.jpg) / \"A beautiful tree in a dark forest\";\n}\n\n.bar {\n\tcontent: \">\" / \"\";\n}\n\n/* becomes */\n\n.foo {\n\tcontent: url(tree.jpg)  \"A beautiful tree in a dark forest\";\n\tcontent: url(tree.jpg) / \"A beautiful tree in a dark forest\";\n}\n\n.bar {\n\tcontent: \">\" ;\n\tcontent: \">\" / \"\";\n}\n```\n\n## Usage\n\nAdd [PostCSS Content Alt Text] to your project:\n\n```bash\nnpm install postcss @csstools/postcss-content-alt-text --save-dev\n```\n\nUse it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssContentAltText = require('@csstools/postcss-content-alt-text');\n\npostcss([\n\tpostcssContentAltText(/* 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 preserved.\n\n```js\npostcssContentAltText({ preserve: false })\n```\n\n```css\n.foo {\n\tcontent: url(tree.jpg) / \"A beautiful tree in a dark forest\";\n}\n\n.bar {\n\tcontent: \">\" / \"\";\n}\n\n/* becomes */\n\n.foo {\n\tcontent: url(tree.jpg)  \"A beautiful tree in a dark forest\";\n}\n\n.bar {\n\tcontent: \">\" ;\n}\n```\n\n### stripAltText\n\nThe `stripAltText` option determines whether the alt text is removed from the value.  \nBy default, it is not removed.  \nInstead it is added to the `content` value itself to ensure content is accessible.\n\nOnly set this to `true` if you are sure the alt text is not needed.\n\n```js\npostcssContentAltText({ stripAltText: true })\n```\n\n```css\n.foo {\n\tcontent: url(tree.jpg) / \"A beautiful tree in a dark forest\";\n}\n\n.bar {\n\tcontent: \">\" / \"\";\n}\n\n/* becomes */\n\n.foo {\n\tcontent: url(tree.jpg) ;\n\tcontent: url(tree.jpg) / \"A beautiful tree in a dark forest\";\n}\n\n.bar {\n\tcontent: \">\" ;\n\tcontent: \">\" / \"\";\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/#content-alt-text\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/@csstools/postcss-content-alt-text\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Content Alt Text]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-content-alt-text\n[CSS Generated Content Module]: https://drafts.csswg.org/css-content/#content-property\n","publish_time":1793293613726,"_cnpm_publish_time":1793293613726,"dist-tags":{"latest":"3.0.9"}}