fix(home,findings): reclaim top whitespace + add padding under finding head
Two visual cleanups: 1. The block-container "claim padding" rule was a no-op — it targets the legacy ``stAppViewBlockContainer`` testid; Streamlit renamed it to ``stMainBlockContainer`` in the current release. Updated the selector list to match both, so the page title now sits close to the top edge again (~0.5rem from the hidden header) instead of inheriting Streamlit's default ~6rem header reservation. 2. ``.dt-finding-group-head`` margin tightened to ``margin: -1rem -1rem 0.75rem``: -1rem on top/sides still bleeds the head to the card edges, but +0.75rem on the bottom is breathing room between the head's bottom border and the first finding row, which were abutting before. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -83,10 +83,18 @@ footer {
|
|||||||
[data-testid="stSidebarNav"] a[href$="/close/"] {
|
[data-testid="stSidebarNav"] a[href$="/close/"] {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
/* Reclaim top padding lost from hidden header. Slim the bottom too —
|
/* Reclaim top padding lost from hidden header. Streamlit's default
|
||||||
Streamlit's default leaves several rems below the last widget. */
|
block-container padding-top is ~6rem (room for the header it ships).
|
||||||
|
We hide the header so reclaim that space — the page title should sit
|
||||||
|
close to the top edge. Slim the bottom too — Streamlit's default
|
||||||
|
leaves several rems below the last widget.
|
||||||
|
The testid was renamed from ``stAppViewBlockContainer`` (legacy) to
|
||||||
|
``stMainBlockContainer`` in the current Streamlit release; match
|
||||||
|
both so the rule keeps working across versions. */
|
||||||
.stAppViewBlockContainer,
|
.stAppViewBlockContainer,
|
||||||
[data-testid="stAppViewBlockContainer"] {
|
[data-testid="stAppViewBlockContainer"],
|
||||||
|
.stMainBlockContainer,
|
||||||
|
[data-testid="stMainBlockContainer"] {
|
||||||
padding-top: 0.5rem !important;
|
padding-top: 0.5rem !important;
|
||||||
padding-bottom: 0.75rem !important;
|
padding-bottom: 0.75rem !important;
|
||||||
}
|
}
|
||||||
@@ -583,7 +591,11 @@ div[data-testid="stContainer"][data-border="true"] {
|
|||||||
padding: 14px 18px;
|
padding: 14px 18px;
|
||||||
border-bottom: 1px solid var(--border);
|
border-bottom: 1px solid var(--border);
|
||||||
background: var(--surface-hover);
|
background: var(--surface-hover);
|
||||||
margin: -1rem -1rem 0;
|
/* -1rem on top/sides bleeds the head to the card edges (the parent
|
||||||
|
``st.container(border=True)`` has 1rem padding). +0.75rem on the
|
||||||
|
bottom is the breathing room before the first finding row —
|
||||||
|
without it the row sits flush against the head's bottom border. */
|
||||||
|
margin: -1rem -1rem 0.75rem;
|
||||||
border-radius: var(--r-lg) var(--r-lg) 0 0;
|
border-radius: var(--r-lg) var(--r-lg) 0 0;
|
||||||
}
|
}
|
||||||
.dt-severity-dot {
|
.dt-severity-dot {
|
||||||
|
|||||||
Reference in New Issue
Block a user