Skip to content

Commit 4d22a65

Browse files
Fix sidebar styling when browser window is too small
1 parent af2fdc0 commit 4d22a65

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

docs/css/default.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,3 +303,7 @@ table {
303303
border-color: white;
304304
margin-bottom: 0.6em;
305305
}
306+
307+
.side-nav {
308+
overflow-y: scroll;
309+
}

docs/template.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,5 +198,14 @@ <h3 id="myModalLabel">Documentation search</h3>
198198
$('.dropdown-menu').on('click touchstart', function(event) {
199199
event.stopPropagation();
200200
});
201+
202+
// Dynamically force sidenav to no higher than browser window
203+
$('.side-nav').css('max-height', window.innerHeight - 125);
204+
205+
$(function(){
206+
$(window).resize(function(){
207+
$('.side-nav').css('max-height', window.innerHeight - 125);
208+
});
209+
});
201210
</script>
202211
</body></html>

0 commit comments

Comments
 (0)