Fix options position bar layout so Put badge and contract id display on one line.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3305,23 +3305,39 @@ html[data-theme="light"] .options-estimate-row {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
flex: 1;
|
flex: 1 1 auto;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.opt-pos-bar .pos-side-badge {
|
||||||
|
white-space: nowrap;
|
||||||
|
flex-shrink: 0;
|
||||||
|
padding: 2px 6px;
|
||||||
|
font-size: 0.62rem;
|
||||||
|
line-height: 1.15;
|
||||||
|
}
|
||||||
|
.opt-pos-cards--accordion .opt-pos-bar-meta {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
.opt-pos-bar-side {
|
.opt-pos-bar-side {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
gap: 10px;
|
align-items: flex-end;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 1px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
|
min-width: 3.6rem;
|
||||||
}
|
}
|
||||||
.opt-pos-bar-title {
|
.opt-pos-bar-title {
|
||||||
font-size: 0.72rem;
|
font-size: 0.68rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
max-width: 11rem;
|
flex: 1 1 auto;
|
||||||
|
min-width: 5.5rem;
|
||||||
}
|
}
|
||||||
.opt-pos-bar-meta {
|
.opt-pos-bar-meta {
|
||||||
font-size: 0.66rem;
|
font-size: 0.66rem;
|
||||||
@@ -3335,9 +3351,10 @@ html[data-theme="light"] .options-estimate-row {
|
|||||||
}
|
}
|
||||||
.opt-pos-bar-pnl,
|
.opt-pos-bar-pnl,
|
||||||
.opt-pos-bar-roi {
|
.opt-pos-bar-roi {
|
||||||
font-size: 0.72rem;
|
font-size: 0.68rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
line-height: 1.15;
|
||||||
}
|
}
|
||||||
.opt-pos-bar-chevron {
|
.opt-pos-bar-chevron {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
|||||||
@@ -482,15 +482,15 @@
|
|||||||
'<button type="button" class="opt-pos-bar" aria-expanded="' + (expanded ? "true" : "false") + '">' +
|
'<button type="button" class="opt-pos-bar" aria-expanded="' + (expanded ? "true" : "false") + '">' +
|
||||||
'<span class="opt-pos-bar-main">' +
|
'<span class="opt-pos-bar-main">' +
|
||||||
'<span class="opt-pos-bar-chevron" aria-hidden="true">▶</span>' +
|
'<span class="opt-pos-bar-chevron" aria-hidden="true">▶</span>' +
|
||||||
'<strong class="opt-pos-bar-title">' + inst + "</strong>" +
|
'<strong class="opt-pos-bar-title" title="' + inst + '">' + inst + "</strong>" +
|
||||||
'<span class="pos-side-badge ' + sideCls + '">' + optTypeLabel(p.opt_type) + "</span>" +
|
'<span class="pos-side-badge ' + sideCls + '">' + optTypeLabel(p.opt_type) + "</span>" +
|
||||||
'<span class="opt-pos-bar-meta">行权 ' + fmt(p.strike, 0) + " · " + fmt(p.pos, 0) + "张</span>" +
|
'<span class="opt-pos-bar-meta">行权 ' + fmt(p.strike, 0) + " · " + fmt(p.pos, 0) + "张</span>" +
|
||||||
"</span>" +
|
"</span>" +
|
||||||
'<span class="opt-pos-bar-side">' +
|
'<span class="opt-pos-bar-side">' +
|
||||||
(expAttr
|
(expAttr
|
||||||
? '<span class="opt-pos-bar-cd">到期 <span class="opt-expiry-cd" data-opt-exp-ms="' + expAttr + '">—</span></span>'
|
? '<span class="opt-pos-bar-cd"><span class="opt-expiry-cd" data-opt-exp-ms="' + expAttr + '">—</span></span>'
|
||||||
: "") +
|
: "") +
|
||||||
'<span class="opt-pos-bar-pnl ' + uplCls + '">' + fmt(p.upl, 2) + " USDC</span>" +
|
'<span class="opt-pos-bar-pnl ' + uplCls + '">' + fmt(p.upl, 2) + "</span>" +
|
||||||
'<span class="opt-pos-bar-roi ' + uplCls + '">' +
|
'<span class="opt-pos-bar-roi ' + uplCls + '">' +
|
||||||
(p.upl_ratio_pct != null ? fmt(p.upl_ratio_pct, 2) + "%" : "—") + "</span>" +
|
(p.upl_ratio_pct != null ? fmt(p.upl_ratio_pct, 2) + "%" : "—") + "</span>" +
|
||||||
"</span>" +
|
"</span>" +
|
||||||
|
|||||||
Reference in New Issue
Block a user