From 82f0c1c27c940c3a56ff5da9ec48200c35f764d6 Mon Sep 17 00:00:00 2001 From: dekun Date: Thu, 6 Aug 2026 03:54:02 +0800 Subject: [PATCH] Equalize strategy and position panel heights without clipping. Co-authored-by: Cursor --- frontend/src/styles/app.css | 42 ++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/frontend/src/styles/app.css b/frontend/src/styles/app.css index a7676d9..5397eb1 100644 --- a/frontend/src/styles/app.css +++ b/frontend/src/styles/app.css @@ -1086,7 +1086,7 @@ input { } } -/* 计划页:上排策略|持仓;窄窗允许内容撑开,避免持仓被裁切 */ +/* 计划页:上排策略|持仓等高(取两边较高);内容溢出时卡片内滚动 */ .plan-shell { --plan-cols: minmax(0, 1fr) minmax(0, 1.15fr); --plan-gap: 12px; @@ -1109,7 +1109,12 @@ input { } .plan-board { - align-items: start; + align-items: stretch; +} + +.plan-board > * { + min-width: 0; + min-height: 0; } .plan-panel-title { @@ -1117,23 +1122,28 @@ input { font-size: 14px; font-weight: 600; color: var(--muted); + flex: 0 0 auto; } .plan-strategy { display: flex; flex-direction: column; + height: 100%; min-height: 0; min-width: 0; width: 100%; box-sizing: border-box; - overflow: visible; + overflow: hidden; } .plan-metrics { display: flex; flex-direction: column; + flex: 1 1 auto; min-height: 0; min-width: 0; + overflow-x: hidden; + overflow-y: auto; } .plan-metrics .kv { @@ -1145,6 +1155,7 @@ input { display: flex; flex-direction: column; gap: var(--plan-gap); + height: 100%; min-height: 0; min-width: 0; width: 100%; @@ -1152,13 +1163,21 @@ input { .plan-positions .pos-card, .plan-positions .pos-empty { - flex: 0 0 auto; + flex: 1 1 0; display: flex; flex-direction: column; + justify-content: center; min-height: 0; min-width: 0; width: 100%; box-sizing: border-box; + overflow: hidden; +} + +.plan-positions .pos-card { + justify-content: flex-start; + overflow-x: hidden; + overflow-y: auto; } .pos-countdown { @@ -1185,9 +1204,23 @@ input { --plan-cols: minmax(0, 1fr); } + .plan-board { + align-items: start; + } + + .plan-strategy, + .plan-positions { + height: auto; + } + + .plan-metrics { + overflow: visible; + } + .plan-positions .pos-card, .plan-positions .pos-empty { flex: 0 0 auto; + overflow: visible; } /* 合约名与倒计时上下排,避免长 inst_id 被挤成竖排 */ @@ -1628,7 +1661,6 @@ input { border-radius: 10px; padding: 12px 14px; min-width: 0; - overflow: visible; box-sizing: border-box; }