Fix preview.html to native 320x240 without internal scale.
Card host now scales the iframe; remove broken transform that clipped UI to the corner. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,12 +6,11 @@
|
|||||||
<title>CLIMATE</title>
|
<title>CLIMATE</title>
|
||||||
<style>
|
<style>
|
||||||
*{box-sizing:border-box;margin:0;padding:0}
|
*{box-sizing:border-box;margin:0;padding:0}
|
||||||
html,body{width:100%;height:100%;overflow:hidden;background:#000}
|
html,body{width:320px;height:240px;overflow:hidden;background:#000;margin:0}
|
||||||
.bezel{width:100%;height:100%;display:grid;place-items:center;background:#1a1408}
|
.bezel{width:320px;height:240px;background:#1a1408}
|
||||||
.screen{
|
.screen{
|
||||||
width:320px;height:240px;background:#0A1018;color:#F2F5FA;
|
width:320px;height:240px;background:#0A1018;color:#F2F5FA;
|
||||||
font:12px/1.2 system-ui,sans-serif;position:relative;overflow:hidden;
|
font:12px/1.2 system-ui,sans-serif;position:relative;overflow:hidden;
|
||||||
transform-origin:center;transform:scale(var(--s,1));
|
|
||||||
}
|
}
|
||||||
.hdr{display:flex;align-items:center;gap:8px;padding:4px 8px;height:24px}
|
.hdr{display:flex;align-items:center;gap:8px;padding:4px 8px;height:24px}
|
||||||
.hdr b{font-size:14px;font-weight:700}
|
.hdr b{font-size:14px;font-weight:700}
|
||||||
@@ -70,10 +69,6 @@
|
|||||||
</svg></div>
|
</svg></div>
|
||||||
</div>
|
</div>
|
||||||
</div></div>
|
</div></div>
|
||||||
<script>
|
|
||||||
(function(){function fit(){var s=document.getElementById('s');var r=s.parentElement.getBoundingClientRect();
|
|
||||||
var k=Math.min(r.width/320,r.height/240);s.style.setProperty('--s',k);}
|
|
||||||
fit();addEventListener('resize',fit);})();
|
|
||||||
</script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user