{"id":13826826,"url":"https://github.com/csstools/super-postcss","last_synced_at":"2025-04-28T17:31:14.432Z","repository":{"id":66028407,"uuid":"160995155","full_name":"csstools/super-postcss","owner":"csstools","description":"Now you’re playing with PostCSS — Super PostCSS!","archived":true,"fork":false,"pushed_at":"2018-12-09T02:00:25.000Z","size":9,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-19T11:04:00.063Z","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":"2018-12-09T01:55:23.000Z","updated_at":"2024-09-29T10:01:51.000Z","dependencies_parsed_at":"2023-03-16T02:16:51.810Z","dependency_job_id":null,"html_url":"https://github.com/csstools/super-postcss","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"2513a5a362abcbbabe00a136f13f3112b1d16288"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fsuper-postcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fsuper-postcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fsuper-postcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csstools%2Fsuper-postcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csstools","download_url":"https://codeload.github.com/csstools/super-postcss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251216312,"owners_count":21553975,"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:44.961Z","updated_at":"2025-04-28T17:31:14.416Z","avatar_url":"https://github.com/csstools.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Super PostCSS [\u003cimg src=\"https://postcss.github.io/postcss/logo.svg\" alt=\"PostCSS\" width=\"90\" height=\"90\" align=\"right\"\u003e][postcss]\n\n[![NPM Version][npm-img]][npm-url]\n[![Build Status][cli-img]][cli-url]\n[![Support Chat][git-img]][git-url]\n\n\u003e Now you’re playing with [PostCSS] — [Super PostCSS]!\n\n```bash\nnpm install super-postcss\n```\n\n[Super PostCSS] is an experimental CSS parser that combines [PostCSS],\n[PostCSS Values Parser], and [PostCSS Selector Parser] and introduces a new\nway to write plugins that run simultaniously.\n\n```js\nconst superPostCSS = require('super-postcss');\n\nsuperPostCSS({\n  CustomSpacingDeclaration(node, result) {\n    node.prop = 'margin';\n    return result.refresh(node);\n  },\n  pxNumber(node, result) {\n    if (node.value === '0') {\n      node.unit = '';\n\n      return result.refresh(node);\n    }\n  }\n}).use({\n  declaration(node, result) {\n    if (node.prop === 'spacing') {\n      node.prop = '-custom-spacing';\n      return result.refresh(node);\n    }\n  }\n}).process('body { spacing: 0px; }', { from: '\u003cstdin\u003e' }).then(\n  ({ css }) =\u003e console.log(css) // body { margin: 0; }\n);\n```\n\n[Super PostCSS] lets you add listener-style functions that respond to specific\nnodes in the CSS Tree.\n\n### rule\n\nAny rule or at-rule.\n\n### customRule\n\nA select at-rule, where `custom` is the name of an at-rule.\n\n### declaration\n\nAny declaration.\n\n### customDeclaration\n\nA select declaration, where `custom` is the property name of a declaration.\n\n### selector\n\nAny selector in a selector list.\n\n### value\n\nAny value in a declaration value.\n\n### number\n\nAny number in a declaration value.\n\n### customNumber\n\nA select number in a declaration value, where `custom` is the unit of the\nnumber.\n\n[cli-img]: https://img.shields.io/travis/csstools/super-postcss.svg\n[cli-url]: https://travis-ci.org/csstools/super-postcss\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/super-postcss.svg\n[npm-url]: https://www.npmjs.com/package/super-postcss\n\n[PostCSS]: https://github.com/postcss/postcss\n[PostCSS Values Parser]: https://github.com/shellscape/postcss-values-parser\n[PostCSS Selector Parser]: https://github.com/postcss/postcss-selector-parser\n[Super PostCSS]: https://github.com/csstools/super-postcss\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fsuper-postcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsstools%2Fsuper-postcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsstools%2Fsuper-postcss/lists"}