fix(facade): serve brand CSS variables to the shell before the host loads - #101
Open
AndrewKirkovski wants to merge 2 commits into
Open
fix(facade): serve brand CSS variables to the shell before the host loads#101AndrewKirkovski wants to merge 2 commits into
AndrewKirkovski wants to merge 2 commits into
Conversation
…oads
The index page renders a `<wippy-loading>` overlay that paints before the
Web Host bundle arrives, but nothing supplied the brand variables at that
point — so it painted on the loader's built-in fallback colours and shifted
once the host injected the real theme.
Links `/api/public/facade/variables.css`, the endpoint the facade already
ships and documents for exactly this ("non-Wippy-Host pages that need the
same brand variables without embedding the full Web Host"). It is the same
link the login page uses, so both pre-host surfaces now tone identically.
Placed after `theme-persist.js`, which must stay first to set the theme
class before paint, and before the loader script.
Scope note: the endpoint emits the `css_variables` requirement only. An app
whose brand tokens live in `custom_css` sees no change from this; it fixes
the flash for apps that configure `--p-*` variables.
Claude-Session: https://claude.ai/code/session_01XpA4dkMx2PhiW63aCeidcN
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.
What
Links
/api/public/facade/variables.cssfrom the facade index<head>.Why
The index renders a
<wippy-loading>overlay that paints before the Web Hostbundle arrives, but nothing supplied the brand variables at that point. The loader
painted on its built-in fallback colours and then shifted once the host injected the
real theme.
This is the endpoint the facade already ships and documents for exactly this case —
"non-Wippy-Host pages that need the same brand variables without embedding the full
Web Host" — and it is the same link the login page already uses. Both pre-host
surfaces now tone identically.
Placement
After
theme-persist.js, which must stay first so it sets the theme class beforepaint, and before the loader script.
Scope
The endpoint emits the
css_variablesrequirement only. An app whose brand tokenslive in
custom_csssees no change from this; it fixes the flash for apps thatconfigure
--p-*variables.Published as
wippy/facade@0.6.33.🤖 Generated with Claude Code