Prevent plan position cards from clipping when windowed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-06 03:43:25 +08:00
parent 68d02b9c17
commit 24f4dea798
+43 -16
View File
@@ -686,6 +686,9 @@ input {
border: 1px solid var(--line); border: 1px solid var(--line);
border-radius: 10px; border-radius: 10px;
padding: 16px; padding: 16px;
min-width: 0;
max-width: 100%;
box-sizing: border-box;
} }
.grid-2 { .grid-2 {
@@ -705,9 +708,10 @@ input {
justify-content: space-between; justify-content: space-between;
align-items: flex-start; align-items: flex-start;
gap: 12px; gap: 12px;
padding: 8px 0; padding: 10px 0;
border-bottom: 1px solid var(--line); border-bottom: 1px solid var(--line);
font-size: 14px; font-size: 14px;
min-width: 0;
} }
.kv:last-child { .kv:last-child {
@@ -728,7 +732,7 @@ input {
overflow-wrap: anywhere; overflow-wrap: anywhere;
word-break: break-word; word-break: break-word;
white-space: normal; white-space: normal;
line-height: 1.35; line-height: 1.45;
} }
.plan-residual-block { .plan-residual-block {
@@ -1082,14 +1086,17 @@ input {
} }
} }
/* 计划页:上排策略|持仓顶底对齐;下排行情同列宽对齐 */ /* 计划页:上排策略|持仓;窄窗允许内容撑开,避免持仓被裁切 */
.plan-shell { .plan-shell {
--plan-cols: minmax(280px, 1fr) minmax(320px, 1.15fr); --plan-cols: minmax(0, 1fr) minmax(0, 1.15fr);
--plan-gap: 12px; --plan-gap: 12px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: var(--plan-gap); gap: var(--plan-gap);
margin-bottom: 12px; margin-bottom: 12px;
min-width: 0;
width: 100%;
box-sizing: border-box;
} }
.plan-board, .plan-board,
@@ -1098,10 +1105,11 @@ input {
grid-template-columns: var(--plan-cols); grid-template-columns: var(--plan-cols);
gap: var(--plan-gap); gap: var(--plan-gap);
min-width: 0; min-width: 0;
width: 100%;
} }
.plan-board { .plan-board {
align-items: stretch; align-items: start;
} }
.plan-panel-title { .plan-panel-title {
@@ -1114,40 +1122,42 @@ input {
.plan-strategy { .plan-strategy {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%;
min-height: 0; min-height: 0;
min-width: 0; min-width: 0;
width: 100%;
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: visible;
} }
.plan-metrics { .plan-metrics {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex: 1;
min-height: 0; min-height: 0;
min-width: 0; min-width: 0;
} }
.plan-metrics .kv { .plan-metrics .kv {
min-width: 0; min-width: 0;
flex: 0 0 auto;
} }
.plan-positions { .plan-positions {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: var(--plan-gap); gap: var(--plan-gap);
height: 100%;
min-height: 0; min-height: 0;
min-width: 0; min-width: 0;
width: 100%;
} }
.plan-positions .pos-card, .plan-positions .pos-card,
.plan-positions .pos-empty { .plan-positions .pos-empty {
flex: 1 1 0; flex: 0 0 auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 0; min-height: 0;
min-width: 0;
width: 100%;
box-sizing: border-box; box-sizing: border-box;
} }
@@ -1163,9 +1173,16 @@ input {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
@media (max-width: 960px) { /* 非全屏常见宽度:两列仍窄时持仓改 2 列;更窄整页单列 */
@media (max-width: 1400px) {
.plan-positions .pos-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 1100px) {
.plan-shell { .plan-shell {
--plan-cols: 1fr; --plan-cols: minmax(0, 1fr);
} }
.plan-positions .pos-card, .plan-positions .pos-card,
@@ -1192,7 +1209,7 @@ input {
.pos-countdown { .pos-countdown {
margin-left: 0; margin-left: 0;
width: auto; max-width: 100%;
align-self: flex-start; align-self: flex-start;
} }
} }
@@ -1611,7 +1628,8 @@ input {
border-radius: 10px; border-radius: 10px;
padding: 12px 14px; padding: 12px 14px;
min-width: 0; min-width: 0;
overflow: hidden; overflow: visible;
box-sizing: border-box;
} }
.pos-card-head { .pos-card-head {
@@ -1665,11 +1683,20 @@ input {
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
gap: 4px 0; gap: 4px 0;
min-width: 0;
max-width: 100%;
overflow-wrap: anywhere;
word-break: break-word;
} }
.pos-meta-item { .pos-meta-item {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
max-width: 100%;
min-width: 0;
overflow-wrap: anywhere;
word-break: break-word;
white-space: normal;
} }
.pos-meta-item:not(:last-child)::after { .pos-meta-item:not(:last-child)::after {
@@ -1703,11 +1730,11 @@ input {
@media (max-width: 520px) { @media (max-width: 520px) {
.pos-grid { .pos-grid {
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: minmax(0, 1fr);
} }
.pos-time-row { .pos-time-row {
grid-template-columns: 1fr; grid-template-columns: minmax(0, 1fr);
} }
} }