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:
@@ -70,15 +70,17 @@
|
||||
|
||||
.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;
|
||||
}
|
||||
.dropdown-item:hover, .dropdown-item:focus {
|
||||
background-color: rgba(255, 255, 255, 0.1) !important;
|
||||
@@ -305,9 +307,10 @@ pre code {
|
||||
.dropdown-submenu > .dropdown-menu {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
margin-top: -1px;
|
||||
margin-top: 0;
|
||||
margin-left: 0;
|
||||
display: none;
|
||||
border: none !important;
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
.dropdown-submenu:hover > .dropdown-menu {
|
||||
@@ -320,18 +323,14 @@ pre code {
|
||||
float: right;
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
.dropdown-menu .dropdown-item {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@media (max-width: 767.98px) {
|
||||
.dropdown-submenu > .dropdown-menu {
|
||||
left: 0;
|
||||
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 {
|
||||
|
||||
@@ -70,15 +70,17 @@
|
||||
|
||||
.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;
|
||||
}
|
||||
.dropdown-item:hover, .dropdown-item:focus {
|
||||
background-color: rgba(255, 255, 255, 0.1) !important;
|
||||
@@ -305,9 +307,10 @@ pre code {
|
||||
.dropdown-submenu > .dropdown-menu {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
margin-top: -1px;
|
||||
margin-top: 0;
|
||||
margin-left: 0;
|
||||
display: none;
|
||||
border: none !important;
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
.dropdown-submenu:hover > .dropdown-menu {
|
||||
@@ -320,18 +323,14 @@ pre code {
|
||||
float: right;
|
||||
margin-top: 0.25rem;
|
||||
}
|
||||
.dropdown-menu .dropdown-item {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@media (max-width: 767.98px) {
|
||||
.dropdown-submenu > .dropdown-menu {
|
||||
left: 0;
|
||||
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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user