Remove dropdown borders, auto-width to content, nowrap items

- border: none on all dropdown-menu (no borders)
- min-width: 0 (width adapts to longest item title)
- white-space: nowrap on dropdown-item
- Remove border-left on mobile submenus
This commit is contained in:
2026-08-11 11:36:48 +02:00
parent 8a0637eddc
commit e9d2ec64bb
3 changed files with 21 additions and 26 deletions
+7 -10
View File
@@ -109,16 +109,18 @@ $header-bg-opacity: 1;
// Language dropdown styling
.dropdown-menu {
background-color: var(--header-bg) !important;
border: 1px solid var(--header-font) !important;
border: none !important;
border-radius: 0 !important;
padding: 0 !important;
margin: 0 !important;
min-width: 0 !important;
}
.dropdown-item {
color: var(--header-font) !important;
border-radius: 0 !important;
padding: 0.5rem 1rem;
white-space: nowrap;
&:hover, &:focus {
background-color: rgba(255, 255, 255, 0.1) !important;
@@ -308,9 +310,10 @@ $header-bg-opacity: 1;
> .dropdown-menu {
top: 0;
left: 100%;
margin-top: -1px;
margin-top: 0;
margin-left: 0;
display: none;
border: none !important;
border-radius: 0 !important;
}
@@ -331,12 +334,6 @@ $header-bg-opacity: 1;
}
}
// Ensure dropdown items fill width and no gaps
.dropdown-menu .dropdown-item {
width: 100%;
white-space: nowrap;
}
// Mobile: submenu appears below instead of beside, open on tap
@media (max-width: 767.98px) {
.dropdown-submenu > .dropdown-menu {
@@ -344,8 +341,8 @@ $header-bg-opacity: 1;
top: 100%;
margin-top: 0;
margin-left: 1rem;
border: none;
border-left: 2px solid rgba(255, 255, 255, 0.2);
border: none !important;
border-radius: 0 !important;
box-shadow: none;
}
.dropdown-submenu:hover > .dropdown-menu {