{"name":"postcss-browser-comments","version":"6.0.2","keywords":["browserlists","browsers","browserslists","caniuse","css","lists","postcss","postcss-plugin","support","target"],"license":"MIT-0","_id":"postcss-browser-comments@6.0.2","maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"romainmenke","email":"romainmenke@gmail.com"}],"contributors":[{"url":"https://antonio.laguna.es","name":"Antonio Laguna","email":"antonio@laguna.es"},{"name":"Jonathan Neal","email":"csstools@hotmail.com"},{"name":"Romain Menke","email":"romainmenke@gmail.com"}],"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-browser-comments#readme","bugs":{"url":"https://github.com/csstools/postcss-plugins/issues"},"dist":{"shasum":"6fb4f12d4aba7037282c91fce4bd026959cabb8e","tarball":"http://registry-npm.ywwl.com/postcss-browser-comments/download/postcss-browser-comments-6.0.2.tgz","fileCount":7,"integrity":"sha512-bZFLM8UZupVsuZDR4zFbzrPtKN6Xqpgj+C+vaxlL8r5E0cyhSO4OD3z+MjKstoQsIaKiQS+/Xci5jBUGyo9HlA==","signatures":[{"sig":"MEUCIHQOHnz8Y4RfzClb+Fwy00vUEkfKbJJSx9FfW7/9BP4bAiEAmR8Ku9W9rK/c1uDYTU94Y7/P08JABV+yBVKi654g7Fs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8356,"size":3289,"noattachment":false,"key":"/postcss-browser-comments/-/postcss-browser-comments-6.0.2.tgz"},"main":"dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"default":"./dist/index.cjs"}}},"funding":[{"url":"https://github.com/sponsors/csstools","type":"github"},{"url":"https://opencollective.com/csstools","type":"opencollective"}],"gitHead":"4a7852f9736614dd10114cf4e665f3ca0d3774d4","scripts":{},"_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"repository":{"url":"git+https://github.com/csstools/postcss-plugins.git","type":"git","directory":"plugins/postcss-browser-comments"},"_npmVersion":"11.6.2","description":"Keep only the CSS you need based on comments and your browserslist","directories":{},"_nodeVersion":"25.1.0","_hasShrinkwrap":false,"peerDependencies":{"postcss":"^8.4","browserslist":"^4.28.0"},"_npmOperationalInternal":{"tmp":"tmp/postcss-browser-comments_6.0.2_1764155941603_0.33123137240119527","host":"s3://npm-registry-packages-npm-production"},"readme":"# PostCSS Browser Comments [<img src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\">][PostCSS]\n\n`npm install postcss-browser-comments --save-dev`\n\n[PostCSS Browser Comments] lets you keep only the CSS you need based on\ncomments and your [browserslist](https://github.com/browserslist/browserslist).\n\n\n```css\n/**\n * Prevent adjustments of font size after orientation changes in IE and iOS.\n */\n\nhtml {\n  -ms-text-size-adjust: 100%;\n  -webkit-text-size-adjust: 100%;\n}\n\n/* becomes */\n\n\n```\n\nThe comment and rule above would be removed with the following browserslist:\n\n```yml\nlast 2 chrome versions\n```\n\nThe rule below would be more carefully altered:\n\n```css\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n  box-sizing: content-box; /* 1 */\n  height: 0; /* 1 */\n  overflow: visible; /* 2 */\n}\n\n/* with a `last 2 firefox versions` browserslist becomes */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n  box-sizing: content-box; /* 1 */\n  height: 0; /* 1 */\n}\n```\n\n## Usage\n\nAdd [PostCSS Browser Comments] to your project:\n\n```bash\nnpm install postcss postcss-browser-comments --save-dev\n```\n\nUse it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssBrowserComments = require('postcss-browser-comments');\n\npostcss([\n\tpostcssBrowserComments(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n\n\n## Options\n\n### browsers\n\nThe `browsers` option overrides of the project’s browserslist.\n\n```js\npostcssBrowserComments({ browsers: 'last 2 versions' })\n```\n\n[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test\n\n[discord]: https://discord.gg/bUadyRwkJS\n[npm-url]: https://www.npmjs.com/package/postcss-browser-comments\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Browser Comments]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-browser-comments\n","publish_time":1764155941889,"_cnpm_publish_time":1764155941889,"dist-tags":{"latest":"7.0.0"}}