URL mode
Route: Rethemer → URL tab (default)
Iteration note. The Rethemer pipeline is currently mocked — see REBUILD_PLAN.md → M5.6. The interaction described here is final; the rebuild quality is what changes when the real AI call lands.
How it works
- Paste a URL into the input. Anything reachable over HTTP(S) works — no auth-required pages today.
- Click Retheme (or press Enter).
- Tostada fetches the source HTML through its Vite dev-server proxy (
/__fetch?url=…), which avoids CORS issues. - The pipeline injects your
tokens.cssas a high-specificity overlay onto the source HTML and renders both versions into the slider. - Drag the slider to compare original vs rethemed side by side.
The proxy
Pages can't normally be fetched from another origin without CORS headers. Tostada works around this with a dev-server middleware at /__fetch?url=… that:
- Accepts only
http(s)://schemes - Returns the upstream
Content-Type - Reports the final URL after redirects
This is dev-only — production deployments of Tostada will use a different fetcher.
The slider
Two iframes overlay each other; a vertical handle clips the right iframe to the cursor's X position.
- Drag the handle left-right with mouse or touch
- Edge labels show "Original" on the left, "Rethemed" on the right
- A loading overlay appears while the retheme runs
What works today
- Static HTML pages restyle fully — text, buttons, surfaces all pick up your tokens
- The original layout is preserved (positions, sizes, spacing)
- Most fonts swap if the source uses generic families; specific font names stay
What doesn't work today
- Auth-required URLs — no login flow
- SPAs with client-side rendering — Tostada fetches initial HTML only; pages that hydrate from JavaScript won't have content to retheme
- Components that override CSS via inline styles — the overlay can't override
style="color: red"without!importanteverywhere - Real semantic re-mapping — today's pipeline is token overlay, not "rebuild this component in your library." That's the deferred AI pipeline.
For a complete list of approximations on a specific retheme, see reading the report.
Tips
- Start with simple pages. A static marketing page reveals the overlay's strengths; a heavy SPA reveals the limits.
- Pre-render SPAs. If you have access to the source app, run a "Save as HTML" or pre-render step and use HTML file mode instead.
- Switch dark mode mid-retheme. Toggle the top-nav dark mode while the rethemed side is rendered — it re-resolves through your dark tokens.