Repository navigation
Theme passthrough (--theme) and theming docs — closes #3 - #5
Merged
Merged
Conversation
…ntends Closes #3. The engine has shipped theme customization since the v1 API — `--web-theme` serves a stylesheet at /api/v1/theme.css layered over the design tokens, and `--frontend DIR` hosts a replacement index.html — but the skill neither passed a theme through nor documented any of it, which is what the issue meant by "no documented path". All three ask scripts gain `--theme CSS`, probed the same way as `--timeout`: a build without the flag notes it on stderr and the ask proceeds unthemed instead of failing. SKILL.md documents the real mechanism (the issue proposed `--css-file` and `--ui-*` tokens; the actual flag is `--web-theme` and the tokens are the `--color-*` / `--radius-*` design tokens from globals.css), points at schemaui's midnight.css example to copy, explains how an external design system maps onto the tokens one commented rule at a time, and covers `--frontend` against the REST contract for the rare case CSS can't express the request. The prompt block carries the short version.
…ntends Closes #3. The engine has shipped theme customization since the v1 API — `--web-theme` serves a stylesheet at /api/v1/theme.css layered over the design tokens, and `--frontend DIR` hosts a replacement index.html — but the skill neither passed a theme through nor documented any of it, which is what the issue meant by "no documented path". All three ask scripts gain `--theme CSS`, probed the same way as `--timeout`: a build without the flag notes it on stderr and the ask proceeds unthemed instead of failing. SKILL.md documents the real mechanism (the issue proposed `--css-file` and `--ui-*` tokens; the actual flag is `--web-theme` and the tokens are the `--color-*` / `--radius-*` design tokens from globals.css), points at schemaui's midnight.css example to copy, explains how an external design system maps onto the tokens one commented rule at a time, and covers `--frontend` against the REST contract for the rare case CSS can't express the request. The prompt block carries the short version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #3. The engine has had theme customization since the v1 API, but the skill neither passed a stylesheet through nor documented it. Now:
ask.py/ask.sh/ask.ps1) accept--theme CSSand forward it as--web-theme, probed exactly like--timeout— an older engine notes it on stderr and the ask proceeds unthemed rather than failing.--css-filewith--ui-*tokens; the actual flag is--web-themeand the tokens are the--color-*/--radius-*design tokens fromglobals.css), links schemaui'sexamples/themes/midnight.cssas the copy-me example, shows how an external design system maps onto the tokens (one commented rule per mapping), and covers--frontend DIR+ the REST contract for fully custom frontends.Test plan
--web-themerides before the greedy-o; dropped for engines without the flag; no flag without a stylesheet/api/v1/theme.cssand the round-trip completesdeno fmt --checkclean