Files
garden-astro/src
wesandClaude Opus 5 68da1f716b Put the game frame in the template, so its styles reach it
The frame rendered at 300x150 -- the HTML default for an unstyled iframe --
instead of the applet's 770x540. Astro's <style> is scoped: it compiles
.cn-frame to `.cn-frame[data-astro-cid-kr4ipkmt]` and stamps that attribute on
elements in the template. The iframe was built with document.createElement()
in the script, carried no such attribute, and therefore matched none of its
own rules.

So the iframe lives in the template now and the click only sets its src. An
iframe with no src loads nothing, so the payload still waits for the click,
which was the only reason it was being created dynamically.

It is hidden with a class rather than the `hidden` attribute, because the
`display: block` in the sizing rule outranks the user agent's
`[hidden] { display: none }` and it would have shown regardless.

Verified by rendering the staged branch locally against a stub manifest --
the page only builds its Play button when an export is present, so the
previous change shipped without its markup ever being looked at.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4wdbGSVzvUDHBWRjSVxfr
2026-08-28 22:01:55 -04:00
..