{"id":15046941,"url":"https://github.com/codehz/css-in-bun","last_synced_at":"2025-10-29T04:31:57.751Z","repository":{"id":204657067,"uuid":"712362676","full_name":"codehz/css-in-bun","owner":"codehz","description":"CSS-in-Bun macro inspired by Meta's stylex (and johanholmerin/style9)","archived":false,"fork":false,"pushed_at":"2024-07-05T13:30:10.000Z","size":43,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T22:22:12.687Z","etag":null,"topics":["bun","bun-macro","css-in-js","typescript"],"latest_commit_sha":null,"homepage":"","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/codehz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-10-31T10:18:32.000Z","updated_at":"2024-07-15T14:19:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a802188-ed2c-4f1d-a871-de7afd832863","html_url":"https://github.com/codehz/css-in-bun","commit_stats":null,"previous_names":["codehz/css-in-bun"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codehz%2Fcss-in-bun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codehz%2Fcss-in-bun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codehz%2Fcss-in-bun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codehz%2Fcss-in-bun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codehz","download_url":"https://codeload.github.com/codehz/css-in-bun/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238768422,"owners_count":19527197,"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":["bun","bun-macro","css-in-js","typescript"],"created_at":"2024-09-24T20:53:47.227Z","updated_at":"2025-10-29T04:31:51.190Z","avatar_url":"https://github.com/codehz.png","language":"TypeScript","readme":"# CSS-in-Bun macro inspired by Meta's stylex (and johanholmerin/style9)\n\nUsage:\n```tsx\n// build.ts\nimport { Collector } from \"css-in-bun/build\";\n\nusing collector = Collector();\n\nconst res = await Bun.build({\n  entrypoints: [\"./src/index.ts\"],\n  outdir: \"dist\",\n});\n\nawait Bun.write(\"./dist/style.css\", collector.collect());\n\n// component.tsx\nimport { create } from \"css-in-bun\" assert { type: \"macro\" };\nconst styles = create({\n  test: {\n    color: \"red\",\n    backgroundColor: \"green\",\n    \"@media (min-width: 80em)\": {\n      color: \"purple\",\n      \":hover\": {\n        color: \"black\",\n      },\n    },\n    \":hover\": {\n      color: \"yellow\",\n    },\n  },\n});\n\nconst Test = () =\u003e \u003cdiv className={styles.test}\u003e\u003c/div\u003e\n```\n\nDue to bun's bug(https://github.com/oven-sh/bun/issues/6014), use keyframes may cause bun crash.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodehz%2Fcss-in-bun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodehz%2Fcss-in-bun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodehz%2Fcss-in-bun/lists"}