diff --git a/web/src/styles.css b/web/src/styles.css index 514aa8c..ba92d5d 100644 --- a/web/src/styles.css +++ b/web/src/styles.css @@ -637,7 +637,7 @@ pre.diff .add { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, .top-cpu { grid-column: 1 / -1; } .top-mem { grid-column: 1; grid-row: 2; } .top-disks { grid-column: 2; grid-row: 2; } .top-net { grid-column: 1 / 3; grid-row: 3; } .top-proc { grid-column: 3; grid-row: 2 / 4; } /* a machine with a GPU gets a row of gpu boxes under the cpu, as btop lays it out; the rest move down one */ -.top.has-gpu { grid-template-rows: minmax(200px, 1fr) auto auto minmax(170px, 1fr); } +.top.has-gpu { grid-template-rows: minmax(200px, 1fr) minmax(210px, auto) auto minmax(170px, 1fr); } .top-gpus { grid-column: 1 / -1; grid-row: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; min-width: 0; } .top.has-gpu .top-mem, .top.has-gpu .top-disks { grid-row: 3; } .top.has-gpu .top-net { grid-row: 4; } .top.has-gpu .top-proc { grid-row: 3 / 5; } .top-gpu { min-height: 210px; } @@ -679,7 +679,12 @@ pre.diff .add { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, .t-load { display: flex; margin-top: 2px; } /* the dot graph and the dotted meter */ -.tg { width: 100%; height: 100%; flex: 1; min-height: 0; overflow: hidden; } +/* The canvas is taken out of flow. Its drawing size is set from the box it sits in; if it also + sat *in* that box and the box's height was ever content-sized, each resize would set a bigger + canvas, which would make a bigger box, which would set a bigger canvas — the Processes tab + growing without end, as it did when the gpu box landed in an auto-height row. */ +.tg { position: relative; width: 100%; height: 100%; flex: 1; min-height: 0; overflow: hidden; } +.tg canvas { position: absolute; inset: 0; } .tm { position: relative; display: inline-block; height: 9px; flex: 1; min-width: 24px; vertical-align: middle; } .tm-t, .tm-f { position: absolute; inset: 0; -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 5px); mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 5px); } .tm-t { background: var(--border); }