fix: sidebar-item flex-shrink:0 — cards were compressing to fit, eliminating scroll

Without flex-shrink:0, flex compresses all sidebar cards proportionally
when the container is shorter than their total height. Cards visually
fit the screen with no overflow — scrollTop stays 0, touch handler
has nothing to scroll. One property restores the intended overflow.
This commit is contained in:
Brian Krabach
2026-03-28 16:04:02 -07:00
parent 383b28c85e
commit c1701bf26b
2 changed files with 10 additions and 0 deletions
+1
View File
@@ -469,6 +469,7 @@ body {
.sidebar-item {
height: 120px;
flex-shrink: 0; /* prevent flex from compressing cards to fit */
background: var(--bg-secondary);
cursor: pointer;
overflow: hidden;
+9
View File
@@ -604,3 +604,12 @@ def test_sidebar_list_has_touch_action_pan_y():
assert "overscroll-behavior: contain" in block, (
".sidebar-list must have overscroll-behavior:contain to prevent scroll chaining"
)
def test_sidebar_item_has_flex_shrink_zero():
"""Regression: without flex-shrink:0 cards shrink to fit, eliminating scroll overflow."""
css = read_css()
block = _extract_rule_block(css, ".sidebar-item {")
assert "flex-shrink: 0" in block, (
".sidebar-item must have flex-shrink:0 to prevent compression"
)