chiark / gitweb /
webstead: scale input and output better with window size
authorBen Harris <bjh21@bjh21.me.uk>
Sat, 4 Oct 2025 16:16:51 +0000 (17:16 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Tue, 13 Jan 2026 21:42:18 +0000 (21:42 +0000)
It turns out that setting --pix to 7vmin, while rather unprincipled,
does actually work quite adequately.

webstead.xhtml

index a55752701c22b6574697e30623d4b84bb9be51d9..98da8d55d6cec1f1a7af56483b389a6f860c1e2f 100644 (file)
@@ -5,16 +5,17 @@
     <title>Bedstead editor test</title>
     <style>
       :root {
-          --pix: 50px;
+          --pix: 7vmin;
+      }
+      body {
+          max-width: none;
       }
       #inout {
           display: flex;
       }
-      #inout > * {
-          margin-left: var(--pix);
-          margin-top: var(--pix);
-      }
-      #outpane {
+      #inpane, #outpane {
+          padding-left: var(--pix);
+          padding-top: var(--pix);
           width: calc(5 * var(--pix));
           height: calc(9 * var(--pix));
       }