From a053229f0f4fadccf84ebd0d91221117ea46ca0a Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Wed, 2 Nov 2016 15:48:49 +0800 Subject: [PATCH] MDL-56690 theme_boost: Allow menus to scroll in the header The header is fixed - so if menus in the header are longer than the page, you can't scroll to the bottom of the menu. This sets max height on the menus to the viewport height - the navbar height and sets them to scroll auto. --- theme/boost/scss/moodle/undo.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/theme/boost/scss/moodle/undo.scss b/theme/boost/scss/moodle/undo.scss index 1d490ad041c..9556e7be3dc 100644 --- a/theme/boost/scss/moodle/undo.scss +++ b/theme/boost/scss/moodle/undo.scss @@ -163,3 +163,9 @@ body:not(.jsenabled) .langmenu:hover > .dropdown-menu, ol { margin: 0 0 $line-height-base / 2 2.5em; } + +// Set menus in the fixed header to scroll vertically when they are longer than the page. +.navbar-static-top .dropdown .dropdown-menu { + max-height: calc(100vh - #{$navbar-height}); + overflow-y: auto; +}