diff --git a/openstack_dashboard/static/dashboard/scss/_variables.scss b/openstack_dashboard/static/dashboard/scss/_variables.scss index c2921cc256..892f3ff0c6 100644 --- a/openstack_dashboard/static/dashboard/scss/_variables.scss +++ b/openstack_dashboard/static/dashboard/scss/_variables.scss @@ -79,3 +79,7 @@ $dropdown-item-padding-horizontal: 20px; // This defines the max-width for a breadcrumb item before it will be truncated $breadcrumb-item-width: 15em !default; + +// This is the max height for the domain/project selector in the top nav. After +// this point, it will scroll. +$context-selector-max-height: calc(99vh - #{$navbar-height}) !default; diff --git a/openstack_dashboard/static/dashboard/scss/components/_navbar.scss b/openstack_dashboard/static/dashboard/scss/components/_navbar.scss index 101ce83725..74bb3cb5e7 100644 --- a/openstack_dashboard/static/dashboard/scss/components/_navbar.scss +++ b/openstack_dashboard/static/dashboard/scss/components/_navbar.scss @@ -43,3 +43,13 @@ padding-right: $padding-small-vertical; padding-left: $padding-small-vertical; } + +// Scrollbar for the project menu on larger screens +// Not needed for smaller screens, as it is already scrollable +// and can be collapsed to access the settings menu etc. +@media(min-width: $screen-sm-min) { + .context-selection { + max-height: $context-selector-max-height; + overflow-y: scroll; + } +}