aboutsummaryrefslogtreecommitdiffstats
path: root/web/site.css
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-30 15:38:14 +0200
committeruser <user@clank>2026-08-30 15:38:14 +0200
commit6e25c746e7cf3184fd30cae4d4c10299315717ce (patch)
treed03d64e56231fe83ee2279c2e3e1644aac1bfcd3 /web/site.css
parentwebdemo: land in the playground, not just the demo (diff)
downloadslosh-6e25c746e7cf3184fd30cae4d4c10299315717ce.tar.gz
slosh-6e25c746e7cf3184fd30cae4d4c10299315717ce.tar.xz
slosh-6e25c746e7cf3184fd30cae4d4c10299315717ce.zip
webdemo: fit with font size, not scale -- a transform misplaces clicks
xterm turns a mouse event into a cell with getBoundingClientRect() and its own unscaled cell metrics, so the scale() that stretched the fixed grid into the stage put every click on the wrong cell, off by the scale factor. Desktop kept the factor near 1 -- cols and rows are derived from the same room the scale fills -- so it passed for working; a phone is forced onto the 80-column floor, the factor lands near a half, and a tap selects a pane the finger never touched. Refit the font size instead: walk it until the grid fills the room (iterated, cell metrics are not linear in font size), centre the leftover with translate, which moves rect and clicks together. The grid stays what the guest was told at boot; only the glyphs move. A webfont resolving late changes the metrics under the fit, so refit again when document.fonts settles.
Diffstat (limited to 'web/site.css')
0 files changed, 0 insertions, 0 deletions