{"id":41917607,"url":"https://github.com/shimech/posthtml-css-prop","last_synced_at":"2026-01-25T16:34:12.680Z","repository":{"id":65522987,"uuid":"486804066","full_name":"shimech/posthtml-css-prop","owner":"shimech","description":"PostHTML Plugin to Support css prop like emotion","archived":false,"fork":false,"pushed_at":"2022-05-01T09:33:56.000Z","size":867,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-03T09:42:13.219Z","etag":null,"topics":["html","posthtml","posthtml-plugin"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@shimech/posthtml-css-prop","language":"TypeScript","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/shimech.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":"2022-04-29T01:50:08.000Z","updated_at":"2022-05-01T09:37:56.000Z","dependencies_parsed_at":"2023-01-27T06:01:39.659Z","dependency_job_id":null,"html_url":"https://github.com/shimech/posthtml-css-prop","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/shimech/posthtml-css-prop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimech%2Fposthtml-css-prop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimech%2Fposthtml-css-prop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimech%2Fposthtml-css-prop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimech%2Fposthtml-css-prop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shimech","download_url":"https://codeload.github.com/shimech/posthtml-css-prop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shimech%2Fposthtml-css-prop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28755557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T16:32:25.380Z","status":"ssl_error","status_checked_at":"2026-01-25T16:32:09.189Z","response_time":113,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["html","posthtml","posthtml-plugin"],"created_at":"2026-01-25T16:34:12.191Z","updated_at":"2026-01-25T16:34:12.674Z","avatar_url":"https://github.com/shimech.png","language":"TypeScript","readme":"# @shimech/posthtml-css-prop\n\n[![npm version](https://badge.fury.io/js/@shimech%2Fposthtml-css-prop.svg)](https://badge.fury.io/js/@shimech%2Fposthtml-css-prop)\n![Test](https://github.com/shimech/posthtml-css-prop/actions/workflows/test.yml/badge.svg)\n\n[PostHTML](https://github.com/posthtml/posthtml) plugin to support [css prop](https://emotion.sh/docs/css-prop) like emotion.\nThis package is a wrapper of [emotion](https://emotion.sh).\n\nBefore:\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1 css-prop=\"text-align: center; font-size: 24px;\"\u003eTitle\u003c/h1\u003e\n    \u003cdiv class=\"foo\" css-prop=\"display: flex;\"\u003e\n      \u003cspan css-prop=\"color: red; \u0026:hover { color: blue; }\"\u003eHello World!\u003c/span\u003e\n    \u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nAfter:\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003cstyle data-posthtml-css-prop=\"css 1pwdwr4\"\u003e\n      .css-1pwdwr4 {\n        text-align: center;\n        font-size: 24px;\n      }\n    \u003c/style\u003e\n    \u003cstyle data-posthtml-css-prop=\"css 1q8jsgx\"\u003e\n      .css-1q8jsgx {\n        display: -webkit-box;\n        display: -webkit-flex;\n        display: -ms-flexbox;\n        display: flex;\n      }\n    \u003c/style\u003e\n    \u003cstyle data-posthtml-css-prop=\"css qrwk6l\"\u003e\n      .css-qrwk6l {\n        color: red;\n      }\n      .css-qrwk6l:hover {\n        color: blue;\n      }\n    \u003c/style\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1 class=\"css-1pwdwr4\"\u003eTitle\u003c/h1\u003e\n    \u003cdiv class=\"css-1q8jsgx foo\"\u003e\n      \u003cspan class=\"css-qrwk6l\"\u003eHello World!\u003c/span\u003e\n    \u003c/div\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Install\n\n```shell\nnpm install @shimech/posthtml-css-prop\n```\n\n## Usage\n\n```javascript\nconst posthtml = require(\"posthtml\");\nconst html = `\n  \u003chtml\u003e\n    \u003chead\u003e\u003c/head\u003e\n    \u003cbody\u003e\n      \u003ch1 css-prop=\"text-align: center; font-size: 24px;\"\u003eTitle\u003c/h1\u003e\n      \u003cdiv class=\"foo\" css-prop=\"display: flex;\"\u003e\n        \u003cspan css-prop=\"color: red; \u0026:hover { color: blue; }\"\u003eHello World!\u003c/span\u003e\n      \u003c/div\u003e\n    \u003c/body\u003e\n  \u003c/html\u003e\n`;\n\nposthtml()\n  .use(require(\"@shimech/posthtml-css-prop\")())\n  .process(html)\n  .then((result) =\u003e console.log(result.html));\n// Output:\n// \u003chtml\u003e\n//     \u003chead\u003e\u003cstyle data-posthtml-css-prop=\"css 1pwdwr4\"\u003e.css-1pwdwr4{text-align:center;font-size:24px;}\u003c/style\u003e\u003cstyle data-posthtml-css-prop=\"css 1q8jsgx\"\u003e.css-1q8jsgx{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}\u003c/style\u003e\u003cstyle data-posthtml-css-prop=\"css qrwk6l\"\u003e.css-qrwk6l{color:red;}.css-qrwk6l:hover{color:blue;}\u003c/style\u003e\u003c/head\u003e\n//     \u003cbody\u003e\n//         \u003ch1 class=\"css-1pwdwr4\"\u003eTitle\u003c/h1\u003e\n//         \u003cdiv class=\"css-1q8jsgx foo\"\u003e\n//             \u003cspan class=\"css-qrwk6l\"\u003eHello World!\u003c/span\u003e\n//         \u003c/div\u003e\n//     \u003c/body\u003e\n// \u003c/html\u003e\n```\n\n### Contributing\n\nSee [PostHTML Guidelines](https://github.com/posthtml/posthtml/tree/master/docs).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshimech%2Fposthtml-css-prop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshimech%2Fposthtml-css-prop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshimech%2Fposthtml-css-prop/lists"}