cleanup: .section-title.compact modifier instead of inline marginBottom toggle
renderStreamers in renderer-streamers.ts was toggling the streamer-section title's bottom margin between 4px and "" via an inline style assignment, conditional on whether the list-filter input was visible directly below. Replaced with a .compact modifier class — same visual effect, but the CSS declaration lives next to the .section-title base rule where future readers will look, and the JS gets to use classList.toggle instead of poking at inline styles. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
137bab63a0
commit
f606eea59c
@ -423,7 +423,7 @@ function renderStreamers(): void {
|
|||||||
const showFilter = all.length >= STREAMER_FILTER_THRESHOLD;
|
const showFilter = all.length >= STREAMER_FILTER_THRESHOLD;
|
||||||
if (filterInput) filterInput.style.display = showFilter ? '' : 'none';
|
if (filterInput) filterInput.style.display = showFilter ? '' : 'none';
|
||||||
// Compact title margin when filter is shown — avoids double gap.
|
// Compact title margin when filter is shown — avoids double gap.
|
||||||
if (sectionTitle) sectionTitle.style.marginBottom = showFilter ? '4px' : '';
|
if (sectionTitle) sectionTitle.classList.toggle('compact', showFilter);
|
||||||
|
|
||||||
// Empty state — small hint inside the sidebar when no streamers have
|
// Empty state — small hint inside the sidebar when no streamers have
|
||||||
// been added yet. Without this the user sees a heading + blank space
|
// been added yet. Without this the user sees a heading + blank space
|
||||||
|
|||||||
@ -120,6 +120,14 @@ body {
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Compact spacing variant — applied when the sidebar's streamer-list
|
||||||
|
filter input is visible directly below the title, so the default
|
||||||
|
padding-bottom + the filter's own margin don't double up into a
|
||||||
|
visually loose gap. */
|
||||||
|
.section-title.compact {
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.streamers {
|
.streamers {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user