No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
nnra6864 346b3fce02 chore: Dependencies come from the ktisigonos organization
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 01:23:02 +01:00
.gitignore chore: Zig's caches and fetched packages are ignored 2026-11-10 16:09:48 +01:00
build.zig feat: kosm_css writes values as custom properties on :root 2026-11-05 18:46:41 +01:00
build.zig.zon chore: Dependencies come from the ktisigonos organization 2026-11-11 01:23:02 +01:00
README.md refactor: Code, error messages and READMEs no longer cite design numbers 2026-11-09 20:17:19 +01:00
root.zig refactor: Code, error messages and READMEs no longer cite design numbers 2026-11-09 20:17:19 +01:00

kosm_css

CSS for kosm: the css adapter, which claims .css files and enables generate and block.

generate writes every value as a custom property on :root. Nested structs join their names with -, and _ becomes -:

try output.generate(.{ .file = "~/.config/app/kosm.css" }, .{ .kosm = .{ .tab_bar = color } });
:root {
  --kosm-tab-bar: #268078ff;
}
Value Written as
color the file's color format; default #rrggbbaa
string a quoted CSS string
integer, float the number
kosm.raw(text) text, verbatim (10px, 1px solid red)
bool, list an error: CSS has neither, so pass kosm.raw text

block writes the same text between /* kosm:begin <id> */ and /* kosm:end */ in a CSS file you otherwise write by hand.