Fix dropdown width: width: max-content on menu, width: 100% on items
- dropdown-menu: width: max-content (menu adapts to longest item) - dropdown-item: width: 100% (items fill menu width) - Same for submenu dropdown-menu
This commit is contained in:
@@ -82,13 +82,15 @@
|
||||
margin: 0 !important;
|
||||
min-width: 0 !important;
|
||||
box-shadow: none !important;
|
||||
width: max-content;
|
||||
}
|
||||
.dropdown-item {
|
||||
color: var(--header-font) !important;
|
||||
border-radius: 0 !important;
|
||||
padding: 0.4rem 1rem;
|
||||
white-space: nowrap;
|
||||
width: auto;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
.dropdown-item:hover, .dropdown-item:focus {
|
||||
background-color: rgba(255, 255, 255, 0.1) !important;
|
||||
@@ -322,6 +324,7 @@ pre code {
|
||||
border: none !important;
|
||||
border-radius: 0 !important;
|
||||
box-shadow: none !important;
|
||||
width: max-content;
|
||||
}
|
||||
.dropdown-submenu:hover > .dropdown-menu {
|
||||
display: block;
|
||||
|
||||
Reference in New Issue
Block a user