{"_id":"@csstools/postcss-content-alt-text@3.0.9","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"c436c72c0219eff18d09789b9b621c5072005163","tarball":"http://registry-npm.ywwl.com/@csstools/postcss-content-alt-text/download/@csstools/postcss-content-alt-text-3.0.9.tgz","fileCount":6,"integrity":"sha512-Z2oQIpor9GK4CDJVZ1xt/KZemR+d+lnuDditL65NxAwv4C0CUL2FCq00Gd7bL/A9QxeP/jU5kEBNoo3uZEvL8w==","signatures":[{"sig":"MEUCIQD61oLstJDA7JPHYDeX+UbdvlT+63FcNqEkSKsc79iUfAIgUkx0Wqu85SVr+7H3xn0mrEX8ZA8NslykfsvifQ/I82M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDgkGn5beJcjXnWKZ3zs9uqEmN+OHQmha748CD0uqO3kAIhAIKDBGkUBQ4xj8x/7c97doxuAVG96Q0E9/5tSPIG8qjC"}],"unpackedSize":7989,"size":3152,"noattachment":false,"key":"/@csstools/postcss-content-alt-text/-/@csstools/postcss-content-alt-text-3.0.9.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":"911b11e2403f9a30b179f7219a2a37ba0c355fa5","license":"MIT-0","scripts":{},"version":"3.0.9","_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.3","@csstools/css-parser-algorithms":"^4.0.3","@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.9_1794919777514_0.5055782172933307"},"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":1794919777612,"_cnpm_publish_time":1794919777612,"dist-tags":{"latest":"3.0.9"}}