{"id":21291675,"url":"https://github.com/komlev/postcss-current-selector","last_synced_at":"2025-07-11T16:30:40.446Z","repository":{"id":57327921,"uuid":"48040705","full_name":"komlev/postcss-current-selector","owner":"komlev","description":"PostCSS for getting current selector","archived":false,"fork":false,"pushed_at":"2017-01-25T15:50:28.000Z","size":9,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-30T19:39:35.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/komlev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-15T12:12:11.000Z","updated_at":"2023-09-16T06:51:29.000Z","dependencies_parsed_at":"2022-09-17T11:20:28.503Z","dependency_job_id":null,"html_url":"https://github.com/komlev/postcss-current-selector","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/komlev/postcss-current-selector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komlev%2Fpostcss-current-selector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komlev%2Fpostcss-current-selector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komlev%2Fpostcss-current-selector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komlev%2Fpostcss-current-selector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/komlev","download_url":"https://codeload.github.com/komlev/postcss-current-selector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komlev%2Fpostcss-current-selector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263121493,"owners_count":23417002,"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-11-21T13:39:03.479Z","updated_at":"2025-07-11T16:30:40.180Z","avatar_url":"https://github.com/komlev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS Current Selector [![Build Status][ci-img]][ci]\r\n\r\n[PostCSS] plugin which helps you get your current selector.\r\n[postcss-simple-vars]: https://github.com/postcss/postcss-simple-vars\r\n[postcss-nested-ancestors]: https://github.com/toomuchdesign/postcss-nested-ancestors\r\n\r\nWorks great with [postcss-simple-vars] for example to get your current selector as a variable\r\n\r\nAlternativly you can use [postcss-nested-ancestors] plugin to reference parent selectors\r\n\r\n[PostCSS]: https://github.com/postcss/postcss\r\n[ci-img]:  https://travis-ci.org/komlev/postcss-current-selector.svg\r\n[ci]:      https://travis-ci.org/komlev/postcss-current-selector\r\n\r\n```css\r\n.foo {\r\n    $c: %@;\r\n}\r\n```\r\n\r\n```css\r\n.foo {\r\n    $c: .foo;\r\n}\r\n```\r\n\r\n## Usage\r\n\r\n```js\r\npostcss([ require('postcss-current-selector') ])\r\n```\r\n\r\n## Options\r\n\r\n### `symbol`\r\n\r\nBy default, plugin will replace `%@` match in the declaration, but it could be changed with this option:\r\n\r\n```js\r\npostcss([ require('postcss-nested')({ symbol: '*@' }) ]\r\n```\r\nwill look for `*@` text in declaration\r\n\r\n```css\r\n.foo {\r\n    content: \"*@\";\r\n}\r\n```\r\n\r\n```css\r\n.foo {\r\n    content: \".foo\";\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkomlev%2Fpostcss-current-selector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkomlev%2Fpostcss-current-selector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkomlev%2Fpostcss-current-selector/lists"}