{"id":13563813,"url":"https://github.com/csstools/postcss-pseudo-class-any-link","last_synced_at":"2025-04-03T20:31:49.076Z","repository":{"id":33777654,"uuid":"37435422","full_name":"csstools/postcss-pseudo-class-any-link","owner":"csstools","description":"Use the :any-link pseudo-class in CSS","archived":true,"fork":false,"pushed_at":"2021-12-22T19:14:55.000Z","size":39,"stargazers_count":23,"open_issues_count":0,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-29T00:49:43.528Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-pseudo-class-any-link","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}},"created_at":"2015-06-15T00:35:41.000Z","updated_at":"2025-02-27T14:24:37.000Z","dependencies_parsed_at":"2022-09-05T17:00:40.083Z","dependency_job_id":null,"html_url":"https://github.com/csstools/postcss-pseudo-class-any-link","commit_stats":null,"previous_names":["jonathantneal/postcss-pseudo-class-any-link"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-pseudo-class-any-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-pseudo-class-any-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-pseudo-class-any-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fpostcss-pseudo-class-any-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/postcss-pseudo-class-any-link/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246436333,"owners_count":20776987,"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-01T13:01:23.531Z","updated_at":"2025-04-03T20:31:48.823Z","avatar_url":"https://github.com/csstools.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e⚠️ PostCSS Pseudo Class Any Link was moved to \u003ca href=\"https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-pseudo-class-any-link\"\u003e@csstools/postcss-plugins\u003c/a\u003e. ⚠️ \u003cbr\u003e\n\u003ca href=\"https://github.com/csstools/postcss-plugins/discussions/75\"\u003eRead the announcement\u003c/a\u003e\u003c/div\u003e\n\n# PostCSS Pseudo Class Any Link [\u003cimg src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS Logo\" width=\"90\" height=\"90\" align=\"right\"\u003e][postcss]\n\n[![NPM Version][npm-img]][npm-url]\n[![CSS Standard Status][css-img]][css-url]\n[![Build Status][cli-img]][cli-url]\n[![Support Chat][git-img]][git-url]\n\n[PostCSS Pseudo Class Any Link] lets you `:any-link` pseudo-class in CSS,\nfollowing the [Selectors] specification.\n\n```pcss\nnav :any-link \u003e span {\n  background-color: yellow;\n}\n\n/* becomes */\n\nnav :link \u003e span, nav :visited \u003e span {\n  background-color: yellow;\n}\n\nnav :any-link \u003e span {\n  background-color: yellow;\n}\n```\n\nFrom the [proposal][Selectors]:\n\n\u003e The `:any-link` pseudo-class represents an element that acts as the source\n  anchor of a hyperlink. It matches an element if the element would match\n  `:link` or `:visited`.\n\n[!['Can I use' table](https://caniuse.bitsofco.de/image/css-any-link.png)](https://caniuse.com/#feat=css-any-link)\n\n## Usage\n\nAdd [PostCSS Pseudo Class Any Link] to your project:\n\n```bash\nnpm install postcss postcss-pseudo-class-any-link --save-dev\n```\n\nUse [PostCSS Pseudo Class Any Link] to process your CSS:\n\n```js\nconst postcssPseudoClassAnyLink = require('postcss-pseudo-class-any-link');\n\npostcssPseudoClassAnyLink.process(YOUR_CSS /*, processOptions, pluginOptions */);\n```\n\nOr use it as a [PostCSS] plugin:\n\n```js\nconst postcss = require('postcss');\nconst postcssPseudoClassAnyLink = require('postcss-pseudo-class-any-link');\n\npostcss([\n  postcssPseudoClassAnyLink(/* pluginOptions */)\n]).process(YOUR_CSS /*, processOptions */);\n```\n\n[PostCSS Pseudo Class Any Link] runs in all Node environments, with special\ninstructions 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### preserve\n\nThe `preserve` option determines whether the original `:any-link` rule is\npreserved. By default, it is preserved.\n\n```js\npostcssPseudoClassAnyLink({ preserve: false })\n```\n\n```pcss\nnav :any-link \u003e span {\n  background-color: yellow;\n}\n\n/* becomes */\n\nnav :link \u003e span, nav :visited \u003e span {\n  background-color: yellow;\n}\n```\n\n[cli-img]: https://github.com/csstools/postcss-pseudo-class-any-link/workflows/test/badge.svg\n[cli-url]: https://github.com/csstools/postcss-pseudo-class-any-link/actions/workflows/test.yml?query=workflow/test\n[css-img]: https://cssdb.org/badge/any-link-pseudo-class.svg\n[css-url]: https://cssdb.org/#any-link-pseudo-class\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-pseudo-class-any-link.svg\n[npm-url]: https://www.npmjs.com/package/postcss-pseudo-class-any-link\n\n[Gulp PostCSS]: https://github.com/postcss/gulp-postcss\n[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Loader]: https://github.com/postcss/postcss-loader\n[PostCSS Pseudo Class Any Link]: https://github.com/jonathantneal/postcss-pseudo-class-any-link\n[Selectors]: https://www.w3.org/TR/selectors-4/#the-any-link-pseudo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-pseudo-class-any-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fpostcss-pseudo-class-any-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fpostcss-pseudo-class-any-link/lists"}