Make all dropdown menus auto drop on hover.

This commit is contained in:
Leo
2024-09-13 01:17:31 -05:00
parent 57e993b536
commit 6182f81f82
4 changed files with 26 additions and 29 deletions

View File

@@ -0,0 +1,25 @@
// Make dropdown menus auto drop
@include media-breakpoint-up(md) {
.dropdown {
.dropdown-menu {
display: block;
opacity: 0;
transition: all .15s linear;
pointer-events: none; // Prevent auto show when mouse is below top menu item
min-width: 190px;
}
&:hover {
.dropdown-menu {
display: block;
opacity: 1;
pointer-events: auto; // Prevent auto hide when mouse is in dropdown menu
}
}
.dropdown-menu-end {
right: 0;
left: auto;
}
}
}

View File

@@ -11,30 +11,4 @@
color: #fff;
}
}
// Make dropdown menus auto drop
@include media-breakpoint-up(md) {
.dropdown {
.dropdown-menu {
display: block;
opacity: 0;
transition: all .15s linear;
pointer-events: none; // Prevent auto show when mouse is below top menu item
min-width: 190px;
}
&:hover {
.dropdown-menu {
display: block;
opacity: 1;
pointer-events: auto; // Prevent auto hide when mouse is in dropdown menu
}
}
.dropdown-menu-end {
right: 0;
left: auto;
}
}
}
}

View File

@@ -102,9 +102,6 @@ $dropdown-link-hover-bg: hsl(200, 36%, 95%);
$card-border-width: 0;
$card-box-shadow: 0 .125rem .25rem rgba($black, .075);
// Breadcrumb
$breadcrumb-divider: quote(">");
// Code
$code-font-size: 100% !default;
$code-color: $purple !default;