Skip to content
Snippets Groups Projects
Commit 66016721 authored by alexisben's avatar alexisben
Browse files

fix header menu max height

parent ec5120c6
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,7 @@ class MainMenu {
resize () {
const isMobile = window.innerWidth <= breakpoints.md;
document.documentElement.style.setProperty('--header-height', this.element.offsetHeight + 'px');
document.documentElement.style.setProperty('--header-menu-max-height', (window.innerHeight - this.element.offsetHeight) + 'px');
// is state changed ?
if (this.state.isMobile === isMobile) {
......
......@@ -13,6 +13,7 @@
--grid-gutter: #{$grid-gutter}
--grid-max-width: #{$grid-max-width}
--header-height: #{$header-height}
--header-menu-max-height: calc(100vh - var(--header-height) - #{$spacing4})
@include media-breakpoint-up(desktop)
--header-height: #{$header-height-desktop}
......
......@@ -7,12 +7,13 @@
opacity: 0
.menu
@include media-breakpoint-down(desktop)
-webkit-flex-basis: 100vw
display: none
flex-basis: 100vw
margin-top: $spacing1
max-height: calc(100vh - var(--header-height) - #{$spacing4})
max-height: var(--header-menu-max-height)
overflow: auto
a,
a:focus,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment