From 09faaff8492147546d024fca676872951d8012e4 Mon Sep 17 00:00:00 2001 From: Saria Hajjar Date: Thu, 23 Jan 2020 20:34:06 +0000 Subject: [PATCH 1/3] Fixes #3995: Navbar scroll when overflowing --- docs/release-notes/version-2.7.md | 1 + netbox/project-static/css/base.css | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/docs/release-notes/version-2.7.md b/docs/release-notes/version-2.7.md index befa9c58f..0ee9dd763 100644 --- a/docs/release-notes/version-2.7.md +++ b/docs/release-notes/version-2.7.md @@ -8,6 +8,7 @@ ## Bug Fixes * [#3983](https://github.com/netbox-community/netbox/issues/3983) - Permit the creation of multiple unnamed devices +* [#3995](https://github.com/netbox-community/netbox/issues/3995) - Fixed overflowing dropdown menus becoming unreachable --- diff --git a/netbox/project-static/css/base.css b/netbox/project-static/css/base.css index 45babe70b..704a7e9b0 100644 --- a/netbox/project-static/css/base.css +++ b/netbox/project-static/css/base.css @@ -62,8 +62,20 @@ footer p { } } +/* Scroll the drop-down menus at or above 768px wide to match bootstrap's behavior for hiding dropdown menus */ +@media (min-width: 768px) { + .navbar-nav>li>ul { + max-height: 80vh; + overflow-y: scroll; + } +} + /* Collapse the nav menu on displays less than 980px wide */ @media (max-width: 979px) { + #navbar { + max-height: 80vh; + overflow-y: scroll; + } .navbar-header { float: none; } From 21f2e0b131776b600e7b231073441f45017704d5 Mon Sep 17 00:00:00 2001 From: Saria Hajjar Date: Thu, 6 Feb 2020 23:30:58 +0000 Subject: [PATCH 2/3] Changed navbar scrollbar to auto --- netbox/project-static/css/base.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/project-static/css/base.css b/netbox/project-static/css/base.css index 704a7e9b0..7aee648aa 100644 --- a/netbox/project-static/css/base.css +++ b/netbox/project-static/css/base.css @@ -66,7 +66,7 @@ footer p { @media (min-width: 768px) { .navbar-nav>li>ul { max-height: 80vh; - overflow-y: scroll; + overflow-y: auto; } } @@ -74,7 +74,7 @@ footer p { @media (max-width: 979px) { #navbar { max-height: 80vh; - overflow-y: scroll; + overflow-y: auto; } .navbar-header { float: none; From d0e00162ed3164ebea2c288ef51d6878b81d4105 Mon Sep 17 00:00:00 2001 From: Saria Hajjar Date: Fri, 7 Feb 2020 00:14:05 +0000 Subject: [PATCH 3/3] Account for header height --- netbox/project-static/css/base.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netbox/project-static/css/base.css b/netbox/project-static/css/base.css index 7aee648aa..456eeab6f 100644 --- a/netbox/project-static/css/base.css +++ b/netbox/project-static/css/base.css @@ -65,7 +65,7 @@ footer p { /* Scroll the drop-down menus at or above 768px wide to match bootstrap's behavior for hiding dropdown menus */ @media (min-width: 768px) { .navbar-nav>li>ul { - max-height: 80vh; + max-height: calc(80vh - 50px); overflow-y: auto; } } @@ -73,7 +73,7 @@ footer p { /* Collapse the nav menu on displays less than 980px wide */ @media (max-width: 979px) { #navbar { - max-height: 80vh; + max-height: calc(80vh - 50px); overflow-y: auto; } .navbar-header {