{"id":19156760,"url":"https://github.com/jackall3n/postcss-scope","last_synced_at":"2025-08-26T16:15:20.310Z","repository":{"id":170741108,"uuid":"630407294","full_name":"jackall3n/postcss-scope","owner":"jackall3n","description":"🔭 A small plugin to allow you to scope your css with a custom selector","archived":false,"fork":false,"pushed_at":"2025-07-19T02:26:34.000Z","size":102,"stargazers_count":9,"open_issues_count":10,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-19T07:44:02.924Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jackall3n.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,"zenodo":null}},"created_at":"2023-04-20T10:08:19.000Z","updated_at":"2025-03-22T10:02:44.000Z","dependencies_parsed_at":"2024-12-09T00:17:59.849Z","dependency_job_id":"730ae691-aa62-4c9a-b08f-1da44910c350","html_url":"https://github.com/jackall3n/postcss-scope","commit_stats":null,"previous_names":["jackall3n/postcss-scope"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jackall3n/postcss-scope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackall3n%2Fpostcss-scope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackall3n%2Fpostcss-scope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackall3n%2Fpostcss-scope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackall3n%2Fpostcss-scope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jackall3n","download_url":"https://codeload.github.com/jackall3n/postcss-scope/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jackall3n%2Fpostcss-scope/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265921635,"owners_count":23849677,"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-09T08:35:50.791Z","updated_at":"2025-07-24T20:06:11.462Z","avatar_url":"https://github.com/jackall3n.png","language":"TypeScript","readme":"# postcss-scope 🔭\n\nA small plugin to allow you to scope your css with a custom selector\n\n## Installation\n```bash\n# pnpm\npnpm add postcss-scope --save-dev\n\n# npm\nnpm install postcss-scope --save-dev\n\n# yarn\nyarn add postcss-scope --dev\n```\n\n## Setup\n\n### Basic\n```javascript\n// postcss.config.js\n\nexport default {\n    plugins: {\n        \"postcss-scope\": \".foo\",\n    },\n};\n```\n\n### Multiple scopes\n```javascript\n// postcss.config.js\n\nexport default {\n    plugins: {\n        \"postcss-scope\": [\".foo\", \".bar\"],\n    },\n};\n```\n\n### With Tailwind\n```javascript\n// postcss.config.js\n\nexport default {\n    plugins: {\n        \"postcss-import\": {},\n        tailwindcss: {},\n        autoprefixer: {},\n        \"postcss-scope\": \".foo\",\n    },\n};\n```\n\n## Usage\n\nThe default output for all files would look something like this, where `.foo` is prepended on all rules. However, using CSS comments, you have more control over each file. \n\n```css\n.foo .class {\n    font-size: 12px;\n}\n\n.foo #id {\n    font-size: 12px;\n}\n```\n\n### Ignore rules\n\nAdd a comment to specify particular rules that should not be scoped\n\n```css\n.foo .class {\n    font-size: 12px;\n}\n\n/* postcss-scope:ignore */\n#id {\n    font-size: 12px;\n}\n```\n\n### Ignore files\n\nAdd a comment to specify files that the plugin should ignore\n\n```css\n/* postcss-scope:ignore-file */\n\n.class {\n    font-size: 12px;\n}\n\n#id {\n    font-size: 12px;\n}\n```\n\n\n### Override global selector\n\nAdd a comment to override the selector for a particular file\n\n```css\n/* postcss-scope:.bar */\n\n.bar .class {\n    font-size: 12px;\n}\n\n.bar #id {\n    font-size: 12px;\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackall3n%2Fpostcss-scope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjackall3n%2Fpostcss-scope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjackall3n%2Fpostcss-scope/lists"}