{"id":14968184,"url":"https://github.com/a-x-/postcss-global-nested","last_synced_at":"2025-10-26T00:31:12.477Z","repository":{"id":57328060,"uuid":"101305102","full_name":"a-x-/postcss-global-nested","owner":"a-x-","description":"Wrap styles into a :global like postcss-nested does it for usual selectors","archived":false,"fork":false,"pushed_at":"2023-05-07T03:02:38.000Z","size":73,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-19T09:42:48.883Z","etag":null,"topics":["postcss","postcss-nested","postcss-plugin"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/postcss-global-nested","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/a-x-.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":"2017-08-24T14:39:00.000Z","updated_at":"2020-09-05T02:21:24.000Z","dependencies_parsed_at":"2024-06-19T13:33:37.052Z","dependency_job_id":null,"html_url":"https://github.com/a-x-/postcss-global-nested","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-x-%2Fpostcss-global-nested","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-x-%2Fpostcss-global-nested/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-x-%2Fpostcss-global-nested/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-x-%2Fpostcss-global-nested/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-x-","download_url":"https://codeload.github.com/a-x-/postcss-global-nested/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232154261,"owners_count":18480243,"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-nested","postcss-plugin"],"created_at":"2024-09-24T13:39:29.840Z","updated_at":"2025-10-26T00:31:11.626Z","avatar_url":"https://github.com/a-x-.png","language":"JavaScript","readme":"# postcss-global-nested [![Build Status](https://travis-ci.org/a-x-/postcss-global-nested.svg?branch=master)](https://travis-ci.org/a-x-/postcss-global-nested)\n\nWrap styles into a `:global` like [postcss-nested](https://github.com/postcss/postcss-nested) does it for usual selectors.\n\nYou should use `:global` as rare as you can.\n\n## usage\n\ntest.css:\n```css\n:global {\n  .foo {}\n  .bar {}\n}\n```\n\n### Use it with `postcss`, `postcss-nested` and `webpack`\n```json5\n{\n  loader: 'postcss-loader',\n  options: {\n    plugins: [\n      require('autoprefixer')({\n        browsers: ['last 2 version'],\n      }),\n      require('postcss-nested')({}),\n      require('postcss-global-nested')({}),\n    ],\n  },\n}\n```\n\n### Use it w/ vanilla `postcss` and `postcss-nested`\n```js\nimport pcss from 'postcss';\nimport nested from 'postcss-nested';\nimport globalNested from 'postcss-global-nested';\n\n(async () =\u003e {\n  const css = await util.promisify(fs.readFile)('test.css', 'utf8');\n  const result = await pcss([nested, globalNested]).process(css);\n  result.css // -\u003e ':global(.foo) {} :global(.bar) {}'\n })();\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-x-%2Fpostcss-global-nested","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-x-%2Fpostcss-global-nested","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-x-%2Fpostcss-global-nested/lists"}