{"id":20565740,"url":"https://github.com/phenax/css-everything","last_synced_at":"2025-04-14T15:35:34.014Z","repository":{"id":189098774,"uuid":"677460752","full_name":"phenax/css-everything","owner":"phenax","description":"A ui framework where you only write turing complete CSS. No HTML, no JS, no build system, just CSS (kinda)","archived":false,"fork":false,"pushed_at":"2024-01-21T15:51:19.000Z","size":304,"stargazers_count":26,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T12:05:56.025Z","etag":null,"topics":["css","javascript","programming-language","typescript","ui-framework"],"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/phenax.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}},"created_at":"2023-08-11T16:19:53.000Z","updated_at":"2025-01-01T07:20:52.000Z","dependencies_parsed_at":"2023-08-18T09:15:25.668Z","dependency_job_id":null,"html_url":"https://github.com/phenax/css-everything","commit_stats":null,"previous_names":["phenax/css-everything"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Fcss-everything","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Fcss-everything/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Fcss-everything/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenax%2Fcss-everything/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phenax","download_url":"https://codeload.github.com/phenax/css-everything/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248906946,"owners_count":21181249,"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","javascript","programming-language","typescript","ui-framework"],"created_at":"2024-11-16T04:38:55.214Z","updated_at":"2025-04-14T15:35:33.985Z","avatar_url":"https://github.com/phenax.png","language":"TypeScript","readme":"\u003ccenter\u003e\n  \u003cimg src=\"./media/banner.png\" /\u003e\n\u003c/center\u003e\n\n---\n\nA ui framework where you only write turing complete CSS. No HTML, no JS, no build system.\n\n\u003e Disclaimer: Don't use this\n\n## Usage\n#### Add script tag to the renderer to your html\n```html\n\u003cscript async defer src=\"https://unpkg.com/@css-everything/render/dist/renderer/index.js\"\u003e\u003c/script\u003e\n```\n\n#### Open up a style tag or link a stylesheet\nThe renderer by default uses the body element. You can use `:root` to describe the starting point.\nHere's a simple counter example:\n```css\n:root {\n  --counter: '0';\n  --cssx-children: div#count button#decr button#incr;\n}\n\n#count::after { content: \"Count: \" var(--counter); }\n\n#incr {\n  --cssx-on-click: update(':root', --counter, calc(get-var(--counter) + 1));\n  --cssx-text: \"++\";\n}\n#decr {\n  --cssx-on-click: update(':root', --counter, calc(get-var(--counter) - 1));\n  --cssx-text: \"--\";\n}\n```\n\n## More examples\nHere are a few live examples for you to try out -\n- [Here's a calculator example](https://codepen.io/phenax/pen/PoLjJmL?editors=1100)\n- [Here's a todo app example](https://codepen.io/phenax/pen/QWzWGaV?editors=1100)\n- [Here's a simple counter example](https://codepen.io/phenax/pen/KKbdZep?editors=1100)\n- [Here's a digital \u0026 analog clock example](https://codepen.io/phenax/pen/KKbKNeb?editors=1100)\n- [More in the examples directory](https://github.com/phenax/css-everything/tree/main/examples)\n\n\n## Docs\n- [Read the documentation](https://github.com/phenax/css-everything/tree/main/docs/README.md) to become enlightened.\n- [Here's how this works](https://github.com/phenax/css-everything/tree/main/docs/how-it-works.md).\n\n\n\n---\n\n\n## Frequently Acquisitioned Queries\n### Why?\nWhy not?\n\n### What?\nWhat?\n\n### What time is it?\nYou can find the answer with [this example](https://codepen.io/phenax/pen/KKbKNeb?editors=1100).\n\n### How does it work?\n[Here's how it works](https://github.com/phenax/css-everything/tree/main/docs/how-it-works.md).\n\n### Is this turing complete?\nYep. Not that you asked, but here's how to calculate factorial of a number.\n\n```css\n:root { --cssx-children: div#container; }\n\n#container {\n  --factorial: func(--n: number)\n    if(lte(get-var(--n), 1), 1,\n      calc(\n        get-var(--n)\n        * call(--factorial, map(--n: calc(get-var(--n) - 1)))\n      ));\n\n  --cssx-text: string(\"7! = \", call(--factorial, map(--n: 7)));\n}\n```\n\n### Escape hatches?\n- If you want to directly render some raw html, you can use `--cssx-disgustingly-set-innerhtml`.\n- If you want to run js expressions, you can use the `js-eval` function. Eg: `js-eval(\"new Date().getSeconds()\")`\n\n### Does it need a build step?\nNo. In fact, this'll probably break if you try to use it with a css preprocessor.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenax%2Fcss-everything","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphenax%2Fcss-everything","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenax%2Fcss-everything/lists"}