From 9ca001f2b4c82cc827a06827d42095216125481b Mon Sep 17 00:00:00 2001 From: psitacus Date: Mon, 7 Jul 2025 21:56:41 -0600 Subject: [PATCH] fix class scrolling --- styles/daggerheart.css | 42 ++++++++++++++++++++++++++++++++ styles/item.less | 54 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/styles/daggerheart.css b/styles/daggerheart.css index 6648f747..b0aa0676 100755 --- a/styles/daggerheart.css +++ b/styles/daggerheart.css @@ -1897,6 +1897,48 @@ fieldset.daggerheart.chat .daggerheart.chat { .daggerheart.sheet.class .class-feature button { width: 40px; } +.daggerheart.sheet.class .window-content { + display: flex; + flex-direction: column; + height: 100%; + overflow: auto; +} +.daggerheart.sheet.class .tab { + flex: 1; + min-height: 0; + display: none; +} +.daggerheart.sheet.class .tab.active { + display: flex; + flex-direction: column; + overflow: hidden; +} +.daggerheart.sheet.class .tab .two-columns.even { + flex: 1; + display: flex; + gap: 1rem; + overflow: hidden; +} +.daggerheart.sheet.class .tab .two-columns.even fieldset { + flex: 1; + display: flex; + flex-direction: column; + min-height: 0; +} +.daggerheart.sheet.class .tab .two-columns.even fieldset .feature-list { + flex: 1; + overflow-y: auto; + min-height: 0; +} +.daggerheart.sheet.class .tab .fieldsets-section { + flex: 1; + overflow-y: auto; + min-height: 0; +} +.daggerheart.sheet.class .tab fieldset.two-columns { + overflow-y: auto; + min-height: 0; +} .daggerheart.sheet.armor .window-content, .daggerheart.sheet.weapon .window-content, .daggerheart.sheet.beastform .window-content, diff --git a/styles/item.less b/styles/item.less index 6fb23bf6..1873e532 100755 --- a/styles/item.less +++ b/styles/item.less @@ -27,6 +27,60 @@ width: 40px; } } + + .window-content { + display: flex; + flex-direction: column; + height: 100%; + overflow: auto; + } + + .tab { + flex: 1; + min-height: 0; + display: none; + + &.active { + display: flex; + flex-direction: column; + overflow: hidden; + } + + // Class sheet has different structure + .two-columns.even { + flex: 1; + display: flex; + gap: 1rem; + overflow: hidden; + + fieldset { + flex: 1; + display: flex; + flex-direction: column; + min-height: 0; + + .feature-list { + flex: 1; + overflow-y: auto; + min-height: 0; + } + } + } + + .fieldsets-section { + flex: 1; + overflow-y: auto; + min-height: 0; + } + + // Standard fieldset handling for class sheet + fieldset { + &.two-columns { + overflow-y: auto; + min-height: 0; + } + } + } } &.armor,