{"id":13825819,"url":"https://github.com/csstools/postcss-is-pseudo-class","last_synced_at":"2025-07-08T22:32:18.387Z","repository":{"id":66028395,"uuid":"220762704","full_name":"csstools/postcss-is-pseudo-class","owner":"csstools","description":"Match elements by inner selectors in CSS","archived":true,"fork":false,"pushed_at":"2022-06-06T05:55:02.000Z","size":13,"stargazers_count":27,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-28T21:23:12.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csstools.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-11-10T08:35:19.000Z","updated_at":"2023-01-28T00:13:11.000Z","dependencies_parsed_at":"2023-03-16T02:17:21.932Z","dependency_job_id":null,"html_url":"https://github.com/csstools/postcss-is-pseudo-class","commit_stats":{"total_commits":4,"total_committers":3,"mean_commits":"1.3333333333333333","dds":0.5,"last_synced_commit":"f1c38f7a05d1cb591cb6f1f1d01e7d5720d25081"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/csstools/postcss-is-pseudo-class","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-is-pseudo-class","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-is-pseudo-class/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-is-pseudo-class/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-is-pseudo-class/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/postcss-is-pseudo-class/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-is-pseudo-class/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264091929,"owners_count":23556208,"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":[],"created_at":"2024-08-04T09:01:27.553Z","updated_at":"2025-07-08T22:32:18.348Z","avatar_url":"https://github.com/csstools.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e⚠️ This package has been discontinued but a new version was made and is being maintained here at \u003ca href=\"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-is-pseudo-class\"\u003e@csstools/postcss-plugins\u003c/a\u003e. ⚠️ \u003c/div\u003e\n\n# PostCSS Is Pseudo Class [\u003cimg src=\"https://api.postcss.org/logo.svg\" alt=\"PostCSS\" width=\"90\" height=\"90\" align=\"right\"\u003e](postcss)\n\n[\u003cimg alt=\"npm version\" src=\"https://img.shields.io/npm/v/postcss-is-pseudo-class.svg\" height=\"20\"\u003e](https://www.npmjs.com/package/postcss-is-pseudo-class)\n[\u003cimg alt=\"build status\" src=\"https://img.shields.io/travis/jsxtools/frontend/master.svg\" height=\"20\"\u003e](https://img.shields.io/travis/csstools/postcss-is-pseudo-class/master.svg)\n[\u003cimg alt=\"support chat\" src=\"https://img.shields.io/badge/support-chat-blue.svg\" height=\"20\"\u003e](https://gitter.im/postcss/postcss)\n\nThis PostCSS plugin lets you match elements by inner selectors in CSS, following the [Selectors Level 4 specification].\n\n```pcss\n:is(article, section) \u003e :is(h1, h2, h3, h4, h5, h6):is(:hover, :focus) {\n\ttext-decoration: underline;\n}\n\n/* becomes */\n\narticle \u003e h1:hover, article \u003e h1:focus,\narticle \u003e h2:hover, article \u003e h2:focus,\narticle \u003e h3:hover, article \u003e h3:focus,\narticle \u003e h4:hover, article \u003e h4:focus,\narticle \u003e h5:hover, article \u003e h5:focus,\narticle \u003e h6:hover, article \u003e h6:focus,\nsection \u003e h1:hover, section \u003e h1:focus,\nsection \u003e h2:hover, section \u003e h2:focus,\nsection \u003e h3:hover, section \u003e h3:focus,\nsection \u003e h4:hover, section \u003e h4:focus,\nsection \u003e h5:hover, section \u003e h5:focus,\nsection \u003e h6:hover, section \u003e h6:focus {\n\ttext-decoration: underline;\n}\n```\n\n## Usage\n\nAdd [PostCSS Is Pseudo Class] to your project:\n\n```bash\nnpm install postcss-is-pseudo-class --save-dev\n```\n\nUse **PostCSS Is Pseudo Class** to process your CSS:\n\n```js\nconst postcssIsPseudoClass = require('postcss-is-pseudo-class');\n\npostcssIsPseudoClass.process(YOUR_CSS /*, processOptions, pluginOptions */);\n```\n\nOr use it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssIsPseudoClass = require('postcss-is-pseudo-class');\n\npostcss([\n  postcssIsPseudoClass(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n**PostCSS Is Pseudo Class** 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## Limitations\n\n- [ ] `:is` selectors with complex inner selectors are ignored.\n- [ ] Selector weight is not normalized to the specificity of its most specific argument.\n\nThese are welcome PR opportunities.\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Is Pseudo Class]: https://github.com/csstools/postcss-is-pseudo-class\n[Selectors Level 4 specification]: https://www.w3.org/TR/selectors-4/#matches\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-is-pseudo-class","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fpostcss-is-pseudo-class","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-is-pseudo-class/lists"}