Small overall fixes
This commit is contained in:
parent
cb16df5d13
commit
87ee22eab5
8 changed files with 152 additions and 328 deletions
|
|
@ -110,49 +110,17 @@
|
|||
}
|
||||
|
||||
.sub.item {
|
||||
display: block;
|
||||
display: none;
|
||||
|
||||
padding-left: 3rem;
|
||||
background-color: lighten($background, 15%);
|
||||
|
||||
-moz-animation: disappear 250ms 1;
|
||||
-webkit-animation: disappear 250ms 1;
|
||||
animation: disappear 250ms 1;
|
||||
|
||||
// USE HEIGHT TO ANIMATE
|
||||
max-height: 0;
|
||||
|
||||
&.visible {
|
||||
display: inline-flex;
|
||||
|
||||
// USE HEIGHT TO ANIMATE
|
||||
max-height: 4rem;
|
||||
|
||||
-moz-animation: appear 250ms 1;
|
||||
-webkit-animation: appear 250ms 1;
|
||||
animation: appear 250ms 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes appear {
|
||||
0% {
|
||||
max-height: 0;
|
||||
}
|
||||
100% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes disappear {
|
||||
0% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.no-scroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
|
@ -161,14 +129,14 @@
|
|||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
&.hoverable:hover .dropdown-content,
|
||||
&.active .dropdown-content {
|
||||
&:hover .dropdown-content {
|
||||
max-height: 100vh;
|
||||
display: block;
|
||||
}
|
||||
|
||||
& .dropdown-content {
|
||||
max-height: 0px;
|
||||
width: 100%;
|
||||
overflow-y: hidden;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
|
|
|
|||
|
|
@ -1041,57 +1041,15 @@ body {
|
|||
}
|
||||
|
||||
.mobile-menu .sub.item {
|
||||
display: block;
|
||||
display: none;
|
||||
padding-left: 3rem;
|
||||
background-color: #4b4b4b;
|
||||
-webkit-animation: disappear 250ms 1;
|
||||
animation: disappear 250ms 1;
|
||||
max-height: 0;
|
||||
}
|
||||
|
||||
.mobile-menu .sub.item.visible {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
max-height: 4rem;
|
||||
-webkit-animation: appear 250ms 1;
|
||||
animation: appear 250ms 1;
|
||||
}
|
||||
|
||||
@-webkit-keyframes appear {
|
||||
0% {
|
||||
max-height: 0;
|
||||
}
|
||||
100% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes appear {
|
||||
0% {
|
||||
max-height: 0;
|
||||
}
|
||||
100% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes disappear {
|
||||
0% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes disappear {
|
||||
0% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.no-scroll {
|
||||
|
|
@ -1103,14 +1061,14 @@ body {
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
.dropdown.item.hoverable:hover .dropdown-content,
|
||||
.dropdown.item.active .dropdown-content {
|
||||
.dropdown.item:hover .dropdown-content {
|
||||
max-height: 100vh;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropdown.item .dropdown-content {
|
||||
max-height: 0px;
|
||||
width: 100%;
|
||||
overflow-y: hidden;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1041,57 +1041,15 @@ body {
|
|||
}
|
||||
|
||||
.mobile-menu .sub.item {
|
||||
display: block;
|
||||
display: none;
|
||||
padding-left: 3rem;
|
||||
background-color: white;
|
||||
-webkit-animation: disappear 250ms 1;
|
||||
animation: disappear 250ms 1;
|
||||
max-height: 0;
|
||||
}
|
||||
|
||||
.mobile-menu .sub.item.visible {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
max-height: 4rem;
|
||||
-webkit-animation: appear 250ms 1;
|
||||
animation: appear 250ms 1;
|
||||
}
|
||||
|
||||
@-webkit-keyframes appear {
|
||||
0% {
|
||||
max-height: 0;
|
||||
}
|
||||
100% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes appear {
|
||||
0% {
|
||||
max-height: 0;
|
||||
}
|
||||
100% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes disappear {
|
||||
0% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes disappear {
|
||||
0% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.no-scroll {
|
||||
|
|
@ -1103,14 +1061,14 @@ body {
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
.dropdown.item.hoverable:hover .dropdown-content,
|
||||
.dropdown.item.active .dropdown-content {
|
||||
.dropdown.item:hover .dropdown-content {
|
||||
max-height: 100vh;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropdown.item .dropdown-content {
|
||||
max-height: 0px;
|
||||
width: 100%;
|
||||
overflow-y: hidden;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1041,57 +1041,15 @@ body {
|
|||
}
|
||||
|
||||
.mobile-menu .sub.item {
|
||||
display: block;
|
||||
display: none;
|
||||
padding-left: 3rem;
|
||||
background-color: #404365;
|
||||
-webkit-animation: disappear 250ms 1;
|
||||
animation: disappear 250ms 1;
|
||||
max-height: 0;
|
||||
}
|
||||
|
||||
.mobile-menu .sub.item.visible {
|
||||
display: -webkit-inline-box;
|
||||
display: -ms-inline-flexbox;
|
||||
display: inline-flex;
|
||||
max-height: 4rem;
|
||||
-webkit-animation: appear 250ms 1;
|
||||
animation: appear 250ms 1;
|
||||
}
|
||||
|
||||
@-webkit-keyframes appear {
|
||||
0% {
|
||||
max-height: 0;
|
||||
}
|
||||
100% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes appear {
|
||||
0% {
|
||||
max-height: 0;
|
||||
}
|
||||
100% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
@-webkit-keyframes disappear {
|
||||
0% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes disappear {
|
||||
0% {
|
||||
max-height: 4rem;
|
||||
}
|
||||
100% {
|
||||
max-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.no-scroll {
|
||||
|
|
@ -1103,14 +1061,14 @@ body {
|
|||
display: inline-block;
|
||||
}
|
||||
|
||||
.dropdown.item.hoverable:hover .dropdown-content,
|
||||
.dropdown.item.active .dropdown-content {
|
||||
.dropdown.item:hover .dropdown-content {
|
||||
max-height: 100vh;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropdown.item .dropdown-content {
|
||||
max-height: 0px;
|
||||
width: 100%;
|
||||
overflow-y: hidden;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -60,22 +60,4 @@ window.addEventListener("DOMContentLoaded", (evt) => {
|
|||
el.parentElement.insertBefore(child, el.nextSibling);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// Add .active to clicked on menus
|
||||
document.querySelectorAll(".dropdown.item").forEach((dropdown) => {
|
||||
dropdown.addEventListener("click", () => {
|
||||
if (dropdown.classList.contains("active")) {
|
||||
dropdown.classList.remove("active");
|
||||
} else {
|
||||
dropdown.classList.add("active");
|
||||
}
|
||||
});
|
||||
|
||||
dropdown.addEventListener("mouseout", () => {
|
||||
if (dropdown.classList.contains("active")) {
|
||||
dropdown.classList.remove("active");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue