Repository navigation
Keep OpenStation theme tokens out of the form previews - #46
Merged
Merged
Conversation
OpenStation paints raw controls in native window bodies with its own tokens — `.os-window__body :is( input[type], select, textarea )` at (0,2,1) — which outranks `.atf-form .atf-input` at (0,2,0). So a light form theme previewed on a dark desktop theme rendered near-black selects and inputs inside a white card, in the builder canvas, the Theme tab and the Theme Studio alike. A shield in builder.css restates only the properties the shell claims (background-color, color, border-color, and the placeholder colour) with the form's own tokens at (0,3,0), mirroring form.css's field-style ladder in the same source order so the preview's internal cascade stays exactly the front end's. Verified on the 8889 site against the dark official OpenStation theme: Clean previews light, Midnight previews with its own surface, the filled variant keeps its --atf-surface-alt ground and transparent border. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DVAaHFURDGeBzeuWHZ2dcP
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.
The bug
Previewing a form inside OpenStation let the desktop theme bleed into the preview: with a light form theme (e.g. Clean) under the dark official OpenStation theme, selects, inputs and textareas rendered near-black with white text inside an otherwise white preview card — in the builder canvas, the Theme tab and the Theme Studio.
Why
OpenStation's
window-chrome.cssthemes raw controls in native window bodies:That weighs (0,2,1) — one specificity point over
.atf-form .atf-inputat (0,2,0) — so the shell's tokens won over the form theme's. The shell also claims::placeholderat the same weight.The fix
A shield block in
builder.css, scoped to the preview surfaces (.atfs-preview__frame,.atfb-preview,.atf-block-preview), restating only the properties the shell claims with the form's own tokens at (0,3,0). It mirrors form.css's field-style ladder (outline / filled / underline / none, hover, focus) in the same source order, so the preview's internal cascade stays exactly the front end's.form.css— the public front-end stylesheet — is untouched.Verified on the 8889 site (dark official OpenStation theme)
#8c8f94border — canvas, Theme tab, Studio.rgb(29,35,39)), not the shell's (rgb(26,23,33)).--atf-surface-altground and transparent border, so the mirrored ladder preserves the variant cascade.color-scheme: light).🤖 Generated with Claude Code
https://claude.ai/code/session_01DVAaHFURDGeBzeuWHZ2dcP