Build-side stylesheet GENERATOR for VS Code color-theme JSON (DESIGN.md §9).
Theme JSON goes in, CSS text comes out: VS Code webview-compatible custom
properties (--vscode-*), a small [part=...] mapping for VS Code-style lists, side bars, panels and inputs, and
TextMate scope CSS. WCAG contrast gates apply at generation time.
This module does not participate in rendering. Write the generated CSS to a file BEFORE the resources declaring it compile, then declare it like any stylesheet:
css = AshUi.Theme.VSCode.stylesheet_from_file!("priv/themes/dark.json")
File.write!("assets/css/theme.css", css)
ash_ui do
stylesheets ["assets/css/theme.css", "assets/css/app.css"]
end
Summary
Functions
Loads VS Code theme JSON from path, verifies WCAG contrast, and returns the
generated stylesheet TEXT. The caller writes it to a file and declares that
file in stylesheets.
Functions
Loads VS Code theme JSON from path, verifies WCAG contrast, and returns the
generated stylesheet TEXT. The caller writes it to a file and declares that
file in stylesheets.