js sets height of asidenav dynamically

This commit is contained in:
Felix Hamann 2018-06-20 22:09:33 +02:00
parent 935b873dde
commit a8109e40f0
2 changed files with 7 additions and 4 deletions

View File

@ -84,6 +84,10 @@
document.addEventListener('DOMContentLoaded', function() {
// utils.aside(document.querySelector('.main__aside'));
var asidenavEl = document.querySelector('.main__aside');
var mainEl = document.querySelector('.main__content');
asidenavEl.style.height = `${mainEl.clientHeight + 75}px`;
// utils.aside(asidenavEl);
});

View File

@ -4,7 +4,7 @@
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
z-index: 1;
flex: 0 0 300px;
height: calc(100% - 80px);
min-height: calc(100% - 80px);
transition: all .2s ease-out;
width: 300px;
@ -147,8 +147,7 @@
width: 50px;
flex-basis: 50px;
overflow: hidden;
height: calc(100% - 50px);
min-height: calc(100% - 50px);
~ .main__content {
padding-left: 50px;