diff --git a/hive-ag3nt/assets/screen.html b/hive-ag3nt/assets/screen.html index 44f50d0..9a2f75a 100644 --- a/hive-ag3nt/assets/screen.html +++ b/hive-ag3nt/assets/screen.html @@ -61,6 +61,14 @@ html, body { height: 100%; background: var(--base); color: var(--text); fit the wrap) and clip any sub-pixel rounding overflow. */ #canvas-wrap.fit { align-items: center; overflow: hidden; } canvas { display: block; cursor: default; } +/* In fit mode relayoutCanvas() sets the canvas display size explicitly. + The canvas is a flex item, and flex items default to + min-width/min-height: auto — which resolves to the canvas's intrinsic + framebuffer resolution and clamps the JS-set size straight back up, + defeating the downscale (the bug behind #133 round 1). Pin the canvas + to exactly the size relayoutCanvas() sets: min-* 0 lifts the clamp, + flex: none stops flex grow/shrink from fighting it. */ +#canvas-wrap.fit canvas { flex: none; min-width: 0; min-height: 0; } #msg { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: var(--surface0); color: var(--yellow); border-radius: 6px;