{"id":50361531,"url":"https://github.com/danielbayley/postcss-heading","last_synced_at":"2026-05-30T02:02:33.359Z","repository":{"id":349995788,"uuid":"1009636533","full_name":"danielbayley/postcss-heading","owner":"danielbayley","description":"@PostCSS polyfill to use the :heading pseudo-class today.","archived":false,"fork":false,"pushed_at":"2026-04-08T12:56:43.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-08T13:28:38.210Z","etag":null,"topics":["caniuse","css","headings","html","npm","npm-module","npm-package","npmjs","plugin","polyfill","postcss","postcss-plugin","selector"],"latest_commit_sha":null,"homepage":"https://developer.mozilla.org/docs/Web/CSS/Reference/Selectors/:heading","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/danielbayley.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"danielbayley","polar":"danielbayley","open_collective":"danielbayley","thanks_dev":"danielbayley","issuehunt":"danielbayley","patreon":"danielbayley","liberapay":"danielbayley","ko_fi":"danielbayley","buy_me_a_coffee":"danielbayley","custom":["https://paypal.me/danieljbayley","https://algora.io/bounties/#:~:text=tip%20contributors","https://terminal.merit.systems/danielbayley/pay","https://docs.opire.dev/overview/commands#tip-a-user","https://blockchain.com/btc/address/37rdZq4muDVNJh6jCr4XDXf8X2EFKjL3QQ","https://blockchain.com/eth/address/0x4176e321cb17876c99cd2b8c95b151c3991f5b25"]}},"created_at":"2025-06-27T13:06:00.000Z","updated_at":"2026-04-08T13:12:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/danielbayley/postcss-heading","commit_stats":null,"previous_names":["danielbayley/postcss-heading"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/danielbayley/postcss-heading","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fpostcss-heading","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fpostcss-heading/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fpostcss-heading/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fpostcss-heading/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielbayley","download_url":"https://codeload.github.com/danielbayley/postcss-heading/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielbayley%2Fpostcss-heading/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33677261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["caniuse","css","headings","html","npm","npm-module","npm-package","npmjs","plugin","polyfill","postcss","postcss-plugin","selector"],"created_at":"2026-05-30T02:02:31.609Z","updated_at":"2026-05-30T02:02:33.354Z","avatar_url":"https://github.com/danielbayley.png","language":"JavaScript","funding_links":["https://github.com/sponsors/danielbayley","https://polar.sh/danielbayley","https://opencollective.com/danielbayley","https://thanks.dev/danielbayley","https://issuehunt.io/r/danielbayley","https://patreon.com/danielbayley","https://liberapay.com/danielbayley","https://ko-fi.com/danielbayley","https://buymeacoffee.com/danielbayley","https://paypal.me/danieljbayley","https://algora.io/bounties/#:~:text=tip%20contributors","https://terminal.merit.systems/danielbayley/pay","https://docs.opire.dev/overview/commands#tip-a-user","https://blockchain.com/btc/address/37rdZq4muDVNJh6jCr4XDXf8X2EFKjL3QQ","https://blockchain.com/eth/address/0x4176e321cb17876c99cd2b8c95b151c3991f5b25"],"categories":[],"sub_categories":[],"readme":"[PostCSS] `:heading` [Plugin]\n=============================\nPostCSS _[polyfill]_ to use the [`:heading`] [pseudo-class] selector today.\n\nUsage\n-----\n`pre.css`:\n~~~ css\n:heading {\n  font-weight: bold;\n  text-decoration: underline;\n}\n~~~\n~~~ js\nimport fs from \"node:fs/promises\"\nimport postcss from \"postcss\"\nimport plugin  from \"postcss-heading\"\n\nconst from = \"pre.css\"\nconst css  = await fs.readFile(from, new TextDecoder)\nconst post = await postcss(plugin).process(css, { from, to: \"post.css\" })\nconsole.log(post.css)\n~~~\n`post.css`:\n~~~ css\n:is(h1, h2, h3, h4, h5, h6) {\n  font-weight: bold;\n  text-decoration: underline;\n}\n~~~\n\nExamples\n--------\nAlso [process]es [functional] pseudo-class [`:heading()`]s:\n~~~ css\n:heading(2, 4) {\n  font-weight: bold;\n  text-decoration: underline;\n}\n~~~\n`post.css`:\n~~~ css\n:is(h2, h4) {\n  font-weight: bold;\n  text-decoration: underline;\n}\n~~~\n\n## Install\n~~~ sh\npnpm add postcss postcss-heading\n~~~\n\u003e [!IMPORTANT]\n\u003e This package is _[ESM]_ [only], so must be [`import`]ed instead of [`require`]d,\n\u003e and [depends] on [_Node_.js] [`\u003e=`][][`20`].\n\nSpecify this requirement with [`engines`] and/or [`devEngines`]:\n~~~ jsonc\n// package.json\n\"type\": \"module\",\n\"engines\": {\n  \"node\": \"\u003e=20\"\n},\n\"devEngines\": {\n  \"runtime\": {\n    \"name\": \"node\",\n    \"version\": \"\u003e=20\"\n  }\n},\n~~~\n\nLicense\n-------\n[MIT] © [Daniel Bayley]\n\n[MIT]:              LICENSE.md\n[Daniel Bayley]:    https://github.com/danielbayley\n\n[_Node_.js]:        https://nodejs.org\n[ESM]:              https://developer.mozilla.org/docs/Web/JavaScript/Guide/Modules\n[only]:             https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n[`import`]:         https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import\n[`require`]:        https://nodejs.org/api/modules.html#requireid\n[depends]:          https://docs.npmjs.com/cli/v11/configuring-npm/package-json#engines\n[`\u003e=`]:             https://docs.npmjs.com/cli/v6/using-npm/semver#ranges\n[`20`]:             https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V20.md\n[`engines`]:        https://docs.npmjs.com/cli/v11/configuring-npm/package-json#engines\n[`devEngines`]:     https://docs.npmjs.com/cli/v11/configuring-npm/package-json#devengines\n\n[postcss]:          https://postcss.org\n[process]:          https://postcss.org/api#processor\n[plugin]:           https://postcss.org/docs/postcss-plugins\n[polyfill]:         https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env#readme\n[`:heading`]:       https://developer.mozilla.org/docs/Web/CSS/Reference/Selectors/:heading\n[`:heading()`]:     https://developer.mozilla.org/docs/Web/CSS/Reference/Selectors/:heading_function\n[pseudo-class]:     https://developer.mozilla.org/docs/Web/CSS/Reference/Selectors/Pseudo-classes\n[functional]:       https://developer.mozilla.org/docs/Web/CSS/Reference/Selectors/Pseudo-classes#functional_pseudo-classes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielbayley%2Fpostcss-heading","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielbayley%2Fpostcss-heading","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielbayley%2Fpostcss-heading/lists"}