{"id":16484546,"url":"https://github.com/winston0410/postcss-sparrow-values-filter","last_synced_at":"2026-05-10T12:02:39.804Z","repository":{"id":45045978,"uuid":"294022010","full_name":"winston0410/postcss-sparrow-values-filter","owner":"winston0410","description":"A PostCSS Sparrow plugin that helps you search CSS declarations by values.","archived":false,"fork":false,"pushed_at":"2024-09-06T07:42:00.000Z","size":307,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T13:26:33.237Z","etag":null,"topics":["postcss","postcss-plugin","postcss-sparrow"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/winston0410.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-09T06:22:39.000Z","updated_at":"2020-09-18T15:49:36.000Z","dependencies_parsed_at":"2024-11-12T13:51:47.377Z","dependency_job_id":null,"html_url":"https://github.com/winston0410/postcss-sparrow-values-filter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston0410%2Fpostcss-sparrow-values-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston0410%2Fpostcss-sparrow-values-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston0410%2Fpostcss-sparrow-values-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winston0410%2Fpostcss-sparrow-values-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winston0410","download_url":"https://codeload.github.com/winston0410/postcss-sparrow-values-filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241241197,"owners_count":19932700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["postcss","postcss-plugin","postcss-sparrow"],"created_at":"2024-10-11T13:17:27.510Z","updated_at":"2026-05-10T12:02:39.690Z","avatar_url":"https://github.com/winston0410.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS Sparrow Values Filter\n\n[![Known Vulnerabilities](https://snyk.io/test/github/winston0410/postcss-sparrow-values-filter/badge.svg?targetFile=package.json)](https://snyk.io/test/github/winston0410/postcss-sparrow-values-filter?targetFile=package.json) [![Maintainability](https://api.codeclimate.com/v1/badges/2148862d1ec07fd2f8f2/maintainability)](https://codeclimate.com/github/winston0410/postcss-sparrow-values-filter/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/2148862d1ec07fd2f8f2/test_coverage)](https://codeclimate.com/github/winston0410/postcss-sparrow-values-filter/test_coverage) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/08ffa6d6de2a4e1db2a461911104c641)](https://www.codacy.com/manual/winston0410/postcss-sparrow-values-filter?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=winston0410/postcss-sparrow-values-filter\u0026amp;utm_campaign=Badge_Grade)\n\nA PostCSS Sparrow plugin that helps you **search CSS declarations** by **values**.\n\nThis plugin is designed to be used with [PostCSS Sparrow](https://www.npmjs.com/package/postcss-sparrow), which helps you filter CSS declarations by **selectors**.  By using these two plugins together, you can **easily get the declarations you need**.\n\n## Made in Hong Kong :free: :free:\n\nThis plugin is made with love by a Hong Konger.\n\n## Installation\n\nThis plugin require you to use [PostCSS Sparrow](https://www.npmjs.com/package/postcss-sparrow) for matching with selectors you want.\n\nDownload both `postcss-sparrow` and this plugin through NPM.\n\n```shell\n\nnpm i postcss-sparrow postcss-sparrow-values-filter\n\n```\n\nThen import this plugin as the callback for [PostCSS Sparrow](https://www.npmjs.com/package/postcss-sparrow).\n\n```javascript\n//postcss.config.js\nmodule.exports = {\n  plugins: [\n    //Other plugins...\n\n    require('postcss-sparrow')({\n      transformations: [\n        {\n          selectors: ['*'],\n          inclusion: true,\n          callbacks: [\n            require('postcss-sparrow-values-filter')(\n              {\n                values: ['none'],\n                inclusion: true,\n                callbacks: [\n                  //Do transformation here with your own callback functions\n                  (decl) =\u003e {\n                    decl.remove()\n                  }\n                ]\n              }\n            )\n          ]\n        }\n      ]\n    })\n  ]\n}\n```\n\n## API Reference\n\n### `options.values` : Array\n\nAn array of values that you want to match with. Use `*` as wildcard and select all values.\n\nFor example, `absolute` will match `position: absolute`.\n\n### `options.inclusion` : Boolean\n\nTrue for including and False for excluding values listed in `options.values`.\n\n### `options.callbacks` : Array\n\nAn array of callbacks that you use to transform the selected declarations.  The selected declaration will be passed in as an argument.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinston0410%2Fpostcss-sparrow-values-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinston0410%2Fpostcss-sparrow-values-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinston0410%2Fpostcss-sparrow-values-filter/lists"}