{"id":20838759,"url":"https://github.com/royalicing/yieldcss","last_synced_at":"2026-04-10T22:36:43.623Z","repository":{"id":72483432,"uuid":"339231369","full_name":"RoyalIcing/yieldcss","owner":"RoyalIcing","description":"CSS Components using JavaScript Generator Functions","archived":false,"fork":false,"pushed_at":"2021-03-01T07:18:45.000Z","size":100,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-18T23:42:57.027Z","etag":null,"topics":["css","css-generator","generator-functions","javascript","typescript"],"latest_commit_sha":null,"homepage":"https://regenerated.dev/","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/RoyalIcing.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":"2021-02-15T23:05:30.000Z","updated_at":"2022-10-24T04:17:55.000Z","dependencies_parsed_at":"2023-03-11T13:23:45.482Z","dependency_job_id":null,"html_url":"https://github.com/RoyalIcing/yieldcss","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoyalIcing%2Fyieldcss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoyalIcing%2Fyieldcss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoyalIcing%2Fyieldcss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoyalIcing%2Fyieldcss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RoyalIcing","download_url":"https://codeload.github.com/RoyalIcing/yieldcss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243196649,"owners_count":20251860,"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":["css","css-generator","generator-functions","javascript","typescript"],"created_at":"2024-11-18T01:11:28.582Z","updated_at":"2025-12-26T22:58:21.816Z","avatar_url":"https://github.com/RoyalIcing.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e👑 🎨 Yield CSS\u003c/h1\u003e\n  \u003cp\u003eGenerate CSS on-the-fly\u003c/p\u003e\n  \u003ca href=\"https://bundlephobia.com/result?p=yieldcss\"\u003e\n    \u003cimg src=\"https://badgen.net/bundlephobia/minzip/yieldcss@0.1.0\" alt=\"minified and gzipped size\"\u003e\n    \u003cimg src=\"https://badgen.net/bundlephobia/min/yieldcss@0.1.0\" alt=\"minified size\"\u003e\n    \u003cimg src=\"https://badgen.net/bundlephobia/dependency-count/yieldcss@0.1.0\" alt=\"zero dependencies\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n## Install\n\n```console\nnpm add yieldcss\n```\n\n## Why?\n\nYield CSS lets you generate CSS on-the-fly, making it perfect for a serverless environment like Cloudflare Workers.\n\nInstead of using tooling to compile written files to other files and then uploading those somewhere, you write functions that output the CSS you want on-the-fly.\n\nThis mean you can have conditional CSS, substitute variables, run calculations, and write loops to automate repetitive CSS. You have the full power of JavaScript at hand.\n\n## Examples\n\n```javascript\nimport { prop, renderToString, rule } from \"yieldcss\";\n\n// Inspired by https://github.com/sindresorhus/modern-normalize\nfunction* Reset() {\n  yield rule(['*', '*::before', '*::after'])([\n    prop('box-sizing', 'border-box'),\n    prop('margin', '0'),\n    prop('font', 'inherit'),\n  ]);\n  \n  yield rule(['html'])([\n    // Correct the line height in all browsers.\n    prop('line-height', '1.15'),\n    // Prevent adjustments of font size after orientation changes in iOS.\n    prop('-webkit-text-size-adjust', '100%'),\n  ]);\n}\n\nfunction* Main() {\n  yield Reset();\n}\n\nconst css = await renderToString(Main());\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyalicing%2Fyieldcss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froyalicing%2Fyieldcss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froyalicing%2Fyieldcss/lists"}