aboutsummaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorTyler <tyler@tylerhoang.xyz>2026-05-17 01:22:52 -0700
committerTyler <tyler@tylerhoang.xyz>2026-05-17 01:22:52 -0700
commit3920b4df983b89a752591ee61d7dd655f5d09f9c (patch)
tree3023b3771904ae80c64b1a98d0c7076e1dbd66c0 /app.py
parent5f3dd9a00706257758838d15f678773e5a2d7a13 (diff)
Phase 2: sticky market bar via CSS position:sticky
Keys the market bar container (st-key-market_bar_sticky) so CSS can target it reliably, then applies position:sticky top:0 z-index:200 with the page background so content scrolling underneath is covered. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'app.py')
-rw-r--r--app.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/app.py b/app.py
index 219751f..073d629 100644
--- a/app.py
+++ b/app.py
@@ -220,6 +220,16 @@ button[kind="secondary"]:hover {
padding-bottom: 3rem !important;
}
+/* ── Sticky market bar ──────────────────────────────────────────────────── */
+.st-key-market_bar_sticky {
+ position: sticky !important;
+ top: 0 !important;
+ z-index: 200 !important;
+ background: var(--ink-0) !important;
+ padding-bottom: 0.5rem !important;
+ margin-bottom: -0.5rem !important;
+}
+
/* ── Tabs ───────────────────────────────────────────────────────────────── */
.stTabs [data-baseweb="tab-list"] {
background: var(--ink-2) !important;
@@ -776,7 +786,7 @@ with st.sidebar:
# ── Market Bar ────────────────────────────────────────────────────────────────
-with st.container():
+with st.container(key="market_bar_sticky"):
render_market_bar()
st.divider()