From 3649293d71b378198c9693e757e752172d4b21ee Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Fri, 8 Feb 2019 11:47:32 +0000 Subject: [PATCH] left sidebar: Add a bit of margin below stream list. Having a tiny bit of margin below the stream list makes it possible to see the bottom of the scrollbar. It also makes it so that the scrollbar activates for a tiny range of list sizes where before the last element would have been right up against the bottom of the page, but we wouldn't scroll. --- static/js/resize.js | 6 ++++-- static/styles/left-sidebar.scss | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/static/js/resize.js b/static/js/resize.js index 834663784d..ec533a0f03 100644 --- a/static/js/resize.js +++ b/static/js/resize.js @@ -58,7 +58,8 @@ function get_new_heights() { res.bottom_sidebar_height = viewport_height - parseInt($("#left-sidebar").css("marginTop"), 10) - - parseInt($(".bottom_sidebar").css("marginTop"), 10); + - parseInt($(".bottom_sidebar").css("marginTop"), 10) + - parseInt($(".bottom_sidebar").css("marginBottom"), 10); res.right_sidebar_height = viewport_height - parseInt($("#right-sidebar").css("marginTop"), 10); @@ -123,7 +124,8 @@ function left_userlist_get_new_heights() { res.bottom_sidebar_height = viewport_height - parseInt($("#left-sidebar").css("marginTop"), 10) - - parseInt($(".bottom_sidebar").css("marginTop"), 10); + - parseInt($(".bottom_sidebar").css("marginTop"), 10) + - parseInt($(".bottom_sidebar").css("marginBottom"), 10); res.total_leftlist_height = res.bottom_sidebar_height diff --git a/static/styles/left-sidebar.scss b/static/styles/left-sidebar.scss index 8e7d45ba2c..6c5c6be873 100644 --- a/static/styles/left-sidebar.scss +++ b/static/styles/left-sidebar.scss @@ -47,11 +47,16 @@ #stream_filters { overflow: visible; /* The -1px here prevents the scrollbar from going above the top of the container */ - margin: -1px 0px 22px 0px; + margin-top: -1px; + margin-bottom: 18px; padding: 0; font-weight: normal; } +.bottom_sidebar { + margin-bottom: 4px; +} + .left-sidebar li { margin: 1px 0px; }