From 294f2957e70113f0d6d0b54334577900d4388882 Mon Sep 17 00:00:00 2001 From: rope Date: Sun, 25 Oct 2026 19:44:30 +0000 Subject: [PATCH] Combat page: stop jumping on casts Co-Authored-By: Claude Opus 5.5 --- game.py | 1 + static/styles.css | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/game.py b/game.py index 64aff2d..c602cb0 100644 --- a/game.py +++ b/game.py @@ -6000,6 +6000,7 @@ PATCH_NOTES = [ ("balance", "Boiling hide glue now uses the kitchen fire: while it's lit, glue costs no logs."), ("fix", "Dungeons wait for the leader to press Start, so groups of 3 and 4 can form. No one can join once it starts."), ("fix", "Combat page shows your health potion: drunk on its own, no need to equip. The other card now reads \"No combat potion\"."), + ("fix", "Combat page no longer jumps around: cast bars hold their space and the fight log stays 7 lines tall."), ]}, {"date": "2026-10-24", "title": "Dungeon loot", "notes": [ ("new", "Masterwork patterns: every dungeon boss can drop one of 7 (15% from a mini-boss, 35% from the last boss, " diff --git a/static/styles.css b/static/styles.css index ba66aee..f71d775 100644 --- a/static/styles.css +++ b/static/styles.css @@ -543,7 +543,8 @@ button.sheet-skill:hover { background: var(--panel-2); } .pill.vuln { border-color: rgba(95, 174, 90, .6); } .pill.resist { border-color: rgba(226, 100, 92, .55); } .pill.yours { box-shadow: 0 0 0 2px var(--gold); } -.combat-frame .fight-log { margin: 0; } +/* Fixed at 7 lines (newest first) so the frame doesn't grow and shrink with the log; older lines drop off the bottom */ +.combat-frame .fight-log { margin: 0; line-height: 1.35; height: calc(7 * 1.35em + 12px); min-height: 0; overflow: hidden; } .prayer-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .prayer-bar .pp { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; margin-right: 4px; } .pray-btn { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; padding: 0; cursor: pointer; @@ -564,8 +565,9 @@ button.sheet-skill:hover { background: var(--panel-2); } .traits-inline .v-res { display: inline-flex; gap: 2px; margin-left: 4px; } .traits-inline .dmg .gi { width: 13px; height: 13px; } .traits-inline .yours .dmg { box-shadow: 0 0 0 1.5px var(--gold); border-radius: 50%; } -.cast { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; min-height: 16px; color: var(--gold); } -.cast:empty { display: none; } +/* The cast row always holds its space, so bars don't jump as casts come and go */ +.cast { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; height: 18px; color: var(--gold); white-space: nowrap; overflow: hidden; } +.cast:empty { visibility: hidden; } .cast .bar { height: 4px; } .cast .bar > span { background: var(--gold); transition: none; } .foe-unit .cast { color: var(--bad); }