Просмотр исходного кода

Merge pull request #3997 from hSaria/3995-navbar-overflow

Fixes #3995: Navbar scroll when overflowing
Jeremy Stretch 6 лет назад
Родитель
Сommit
24db573764
2 измененных файлов с 13 добавлено и 0 удалено
  1. 1 0
      docs/release-notes/version-2.7.md
  2. 12 0
      netbox/project-static/css/base.css

+ 1 - 0
docs/release-notes/version-2.7.md

@@ -11,6 +11,7 @@
 ## Bug Fixes
 
 * [#3507](https://github.com/netbox-community/netbox/issues/3507) - Fix filtering IPaddress by multiple devices
+* [#3995](https://github.com/netbox-community/netbox/issues/3995) - Make dropdown menus in the navigation bar scrollable
 * [#4083](https://github.com/netbox-community/netbox/issues/4083) - Permit nullifying applicable choice fields via API requests
 * [#4089](https://github.com/netbox-community/netbox/issues/4089) - Selection of power outlet type during bulk update is optional
 * [#4090](https://github.com/netbox-community/netbox/issues/4090) - Render URL custom fields as links under object view

+ 12 - 0
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: calc(80vh - 50px);
+        overflow-y: auto;
+    }
+}
+
 /* Collapse the nav menu on displays less than 980px wide */
 @media (max-width: 979px) {
+    #navbar {
+        max-height: calc(80vh - 50px);
+        overflow-y: auto;
+    }
     .navbar-header {
         float: none;
     }