Skip to content

fix(facade): serve brand CSS variables to the shell before the host loads - #101

Open
AndrewKirkovski wants to merge 2 commits into
masterfrom
chore/facade-variables-css
Open

fix(facade): serve brand CSS variables to the shell before the host loads#101
AndrewKirkovski wants to merge 2 commits into
masterfrom
chore/facade-variables-css

Conversation

@AndrewKirkovski

Copy link
Copy Markdown
Contributor

What

Links /api/public/facade/variables.css from the facade index <head>.

Why

The index renders a <wippy-loading> overlay that paints before the Web Host
bundle 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 before
paint, and before the loader script.

Scope

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.

Published as wippy/facade@0.6.33.

🤖 Generated with Claude Code

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant