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:
@@ -469,6 +469,7 @@ body {
|
|||||||
|
|
||||||
.sidebar-item {
|
.sidebar-item {
|
||||||
height: 120px;
|
height: 120px;
|
||||||
|
flex-shrink: 0; /* prevent flex from compressing cards to fit */
|
||||||
background: var(--bg-secondary);
|
background: var(--bg-secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@@ -604,3 +604,12 @@ def test_sidebar_list_has_touch_action_pan_y():
|
|||||||
assert "overscroll-behavior: contain" in block, (
|
assert "overscroll-behavior: contain" in block, (
|
||||||
".sidebar-list must have overscroll-behavior:contain to prevent scroll chaining"
|
".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"
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user