{"_id":"postcss-browser-comments","_rev":"368761","name":"postcss-browser-comments","description":"Keep only the CSS you need based on comments and your browserslist","dist-tags":{"latest":"4.0.0"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"time":{"modified":"2021-07-26T06:48:16.000Z","created":"2018-06-16T05:22:17.713Z","4.0.0":"2021-04-29T07:36:37.267Z","3.0.0":"2019-05-24T12:59:04.490Z","2.0.0":"2018-09-06T12:22:05.050Z","1.0.0":"2018-06-16T05:22:17.713Z"},"users":{},"author":{"name":"Jonathan Neal","email":"csstools@hotmail.com"},"repository":{"type":"git","url":"git+https://github.com/csstools/postcss-browser-comments.git"},"versions":{"4.0.0":{"name":"postcss-browser-comments","version":"4.0.0","description":"Keep only the CSS you need based on comments and your browserslist","author":{"name":"Jonathan Neal","email":"csstools@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/csstools/postcss-browser-comments.git"},"homepage":"https://github.com/csstools/postcss-browser-comments#readme","bugs":{"url":"https://github.com/csstools/postcss-browser-comments/issues"},"main":"index.cjs","module":"index.mjs","scripts":{"prepublishOnly":"npm test","build":"rollup --config .rollup.js --silent","lint":"eslint *.js --cache --ignore-path .gitignore --quiet","test":"npm run lint && npm run build && npm run tape","tape":"postcss-tape"},"engines":{"node":">=8"},"peerDependencies":{"browserslist":">=4","postcss":">=8"},"devDependencies":{"@babel/core":"7.13.16","@babel/preset-env":"7.13.15","browserslist":"4.1.1","eslint":"7.25.0","postcss":"8.2.13","postcss-tape":"6.0.1","pre-commit":"1.2.2","rollup":"2.46.0","rollup-plugin-babel":"4.3.2"},"eslintConfig":{"extends":"eslint:recommended","parserOptions":{"ecmaVersion":12,"sourceType":"module","ecmaFeatures":{"modules":true}},"rules":{"semi":["error","never"]}},"keywords":["postcss","css","postcss-plugin","browserslists","browserlists","browsers","lists","support","caniuse","target"],"gitHead":"aa067de3153340ea85a7f993d1f1b8683080a6cc","_id":"postcss-browser-comments@4.0.0","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"shasum":"bcfc86134df5807f5d3c0eefa191d42136b5e72a","size":8897,"noattachment":false,"key":"/postcss-browser-comments/-/postcss-browser-comments-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/postcss-browser-comments/download/postcss-browser-comments-4.0.0.tgz"},"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"directories":{},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-browser-comments_4.0.0_1619681797139_0.11000168734239946"},"_hasShrinkwrap":false,"publish_time":1619681797267,"_cnpm_publish_time":1619681797267},"3.0.0":{"name":"postcss-browser-comments","version":"3.0.0","description":"Keep only the CSS you need based on comments and your browserslist","author":{"name":"Jonathan Neal","email":"csstools@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/csstools/postcss-browser-comments.git"},"homepage":"https://github.com/csstools/postcss-browser-comments#readme","bugs":{"url":"https://github.com/csstools/postcss-browser-comments/issues"},"main":"index.cjs.js","module":"index.es.js","scripts":{"prepublishOnly":"npm test","pretest":"rollup -c .rollup.js --silent","test":"npm run test:js && npm run test:tape","test:ec":"echint --ignore index.*.js test","test:js":"eslint *.js --cache --ignore-path .gitignore --quiet","test:tape":"postcss-tape"},"engines":{"node":">=8.0.0"},"dependencies":{"postcss":"^7"},"peerDependencies":{"browserslist":"^4"},"devDependencies":{"@babel/core":"^7.4.5","@babel/preset-env":"^7.4.5","babel-eslint":"^10.0.1","browserslist":"^4.1.1","eslint":"^5.16.0","postcss-tape":"^5.0.0","pre-commit":"^1.2.2","rollup":"^1.12.3","rollup-plugin-babel":"^4.3.2"},"eslintConfig":{"env":{"browser":true,"es6":true,"node":true},"extends":"eslint:recommended","parser":"babel-eslint","parserOptions":{"ecmaVersion":2018,"impliedStrict":true,"sourceType":"module"},"root":true},"keywords":["postcss","css","postcss-plugin","browserslists","browserlists","browsers","lists","support","caniuse","target"],"gitHead":"3d27200a7b3a75d5ce14fc3347878675d93a3783","_id":"postcss-browser-comments@3.0.0","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","dist":{"shasum":"1248d2d935fb72053c8e1f61a84a57292d9f65e9","size":6001,"noattachment":false,"key":"/postcss-browser-comments/-/postcss-browser-comments-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/postcss-browser-comments/download/postcss-browser-comments-3.0.0.tgz"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-browser-comments_3.0.0_1558702744397_0.6221317332004974"},"_hasShrinkwrap":false,"publish_time":1558702744490,"_cnpm_publish_time":1558702744490},"2.0.0":{"name":"postcss-browser-comments","version":"2.0.0","description":"Keep only the CSS you need based on comments and your browserslist","author":{"name":"Jonathan Neal","email":"csstools@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/csstools/postcss-browser-comments.git"},"homepage":"https://github.com/csstools/postcss-browser-comments#readme","bugs":{"url":"https://github.com/csstools/postcss-browser-comments/issues"},"main":"index.cjs.js","module":"index.es.js","scripts":{"prepublishOnly":"npm test","pretest":"rollup -c .rollup.js --silent","test":"echo 'Running tests...'; npm run test:js && npm run test:tape","test:ec":"echint --ignore index.*.js test","test:js":"eslint *.js --cache --ignore-path .gitignore --quiet","test:tape":"postcss-tape"},"engines":{"node":">=6.0.0"},"dependencies":{"postcss":"^7.0.2"},"peerDependencies":{"browserslist":"^4"},"devDependencies":{"@babel/core":"^7.0.0","@babel/preset-env":"^7.0.0","babel-eslint":"^9.0.0","browserslist":"^4.1.1","eslint":"^5.5.0","eslint-config-dev":"^2.0.0","postcss-tape":"^2.2.0","pre-commit":"^1.2.2","rollup":"^0.65.2","rollup-plugin-babel":"^4.0.3"},"eslintConfig":{"extends":"dev","parser":"babel-eslint"},"keywords":["postcss","css","postcss-plugin","browserslists","browserlists","browsers","lists","support","caniuse","target"],"gitHead":"79a73db246680c092c9b0e8fdd8360a8ee7bddf4","_id":"postcss-browser-comments@2.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.9.0","_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"dist":{"shasum":"dc48d6a8ddbff188a80a000b7393436cb18aed88","size":6117,"noattachment":false,"key":"/postcss-browser-comments/-/postcss-browser-comments-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/postcss-browser-comments/download/postcss-browser-comments-2.0.0.tgz"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-browser-comments_2.0.0_1536236524971_0.342778064381722"},"_hasShrinkwrap":false,"publish_time":1536236525050,"_cnpm_publish_time":1536236525050},"1.0.0":{"name":"postcss-browser-comments","version":"1.0.0","description":"Keep only the CSS you need based on comments and your browserslist","author":{"name":"Jonathan Neal","email":"csstools@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/csstools/postcss-browser-comments.git"},"homepage":"https://github.com/csstools/postcss-browser-comments#readme","bugs":{"url":"https://github.com/csstools/postcss-browser-comments/issues"},"main":"index.cjs.js","module":"index.es.js","files":["index.cjs.js","index.es.js"],"scripts":{"prepublishOnly":"npm test","pretest":"rollup -c .rollup.js --silent","test":"echo 'Running tests...'; npm run test:js && npm run test:tape","test:ec":"echint --ignore index.*.js test","test:js":"eslint *.js --cache --ignore-path .gitignore --quiet","test:tape":"postcss-tape"},"engines":{"node":">=6.0.0"},"dependencies":{"postcss":"^6.0.22"},"peerDependencies":{"browserslist":"^3"},"devDependencies":{"babel-core":"^6.26.3","babel-eslint":"^8.2.3","babel-preset-env":"^1.7.0","eslint":"^4.19.1","eslint-config-dev":"^2.0.0","postcss-tape":"^2.2.0","pre-commit":"^1.2.2","rollup":"^0.60.7","rollup-plugin-babel":"^3.0.4"},"eslintConfig":{"extends":"dev","parser":"babel-eslint"},"keywords":["postcss","css","postcss-plugin","browserslists","browserlists","browsers","lists","support","caniuse","target"],"gitHead":"ecfd48ff3a5fb2613380284050c2db1cd8f0e154","_id":"postcss-browser-comments@1.0.0","_npmVersion":"6.1.0","_nodeVersion":"10.4.0","_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"dist":{"shasum":"1189a566f8705369e32e30738d1534085bb8260e","size":6054,"noattachment":false,"key":"/postcss-browser-comments/-/postcss-browser-comments-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/postcss-browser-comments/download/postcss-browser-comments-1.0.0.tgz"},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/postcss-browser-comments_1.0.0_1529126537658_0.8892611010446341"},"_hasShrinkwrap":false,"publish_time":1529126537713,"_cnpm_publish_time":1529126537713}},"readme":"# PostCSS Browser Comments [<img src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS\" width=\"90\" height=\"90\" align=\"right\">][postcss]\n\n[![NPM Version][npm-img]][npm-url]\n[![Build Status][cli-img]][cli-url]\n[![Support Chat][git-img]][git-url]\n\n[PostCSS Browser Comments] lets you keep only the CSS you need based on\ncomments and your [browserslist].\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\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---\n\n[PostCSS Browser Comments] can remove rules based upon the comment above them,\nor it can remove declarations using numbered comments that reference the rule\nabove them. In the later case, when all of the numbered comments are removed,\nthen the entire rule and comment are also removed.\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 [PostCSS Browser Comments] to process your CSS:\n\n```js\nconst postcssBrowserComments = require('postcss-browser-comments');\n\npostcssBrowserComments.process(YOUR_CSS /*, processOptions, pluginOptions */);\n```\n\nOr use it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssBrowserComments = require('postcss-browser-comments');\n\npostcss([\n  postcssBrowserComments(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n[PostCSS Browser Comments] runs in all Node environments, with special instructions for:\n\n| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |\n| --- | --- | --- | --- | --- | --- |\n\n## Options\n\n### browsers\n\nThe `browsers` option overrides of the project’s browserslist.\n\n```js\npostcssBrowserComments({\n  browsers: 'last 2 versions'\n});\n```\n\n[cli-img]: https://img.shields.io/travis/csstools/postcss-browser-comments/main.svg\n[cli-url]: https://travis-ci.org/csstools/postcss-browser-comments\n[git-img]: https://img.shields.io/badge/support-chat-blue.svg\n[git-url]: https://gitter.im/postcss/postcss\n[npm-img]: https://img.shields.io/npm/v/postcss-browser-comments.svg\n[npm-url]: https://www.npmjs.com/package/postcss-browser-comments\n\n[browserslist]: https://github.com/browserslist/browserslist\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Browser Comments]: https://github.com/csstools/postcss-browser-comments\n","_attachments":{},"homepage":"https://github.com/csstools/postcss-browser-comments#readme","bugs":{"url":"https://github.com/csstools/postcss-browser-comments/issues"},"license":"CC0-1.0"}