snappymail/vendors/bootstrap/less/dropdowns.less
2022-11-04 15:54:26 +01:00

66 lines
1.6 KiB
Text

//
// Dropdown menus
// --------------------------------------------------
// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
.dropdown {
position: relative;
}
// The dropdown menu (ul)
// ----------------------
.dropdown-menu {
max-height: 60vh;
max-width: 90vw;
overflow: auto;
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none; // none by default, but block on "open" of the menu
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0; // override default ul
list-style: none;
color: var(--dropdown-menu-color, inherit);
background-color: var(--dropdown-menu-bg-color, #fff);
border: 1px solid var(--dropdown-menu-border-clr, rgba(0,0,0,.2));
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
background-clip: padding-box;
// Aligns the dropdown menu to right
&.right-edge {
right: 0;
left: auto;
}
// Links within the dropdown menu
a {
background-color: var(--dropdown-menu-bg-color, #fff);
color: var(--dropdown-menu-color, #333);
display: block;
padding: 3px 10px;
text-decoration: none;
white-space: nowrap;
}
}
// Hover state
// -----------
.dropdown-menu li:not(.disabled) > a:hover,
.dropdown-menu li:not(.disabled) > a:focus {
background-color: var(--dropdown-menu-hover-bg-color, #444);
color: var(--dropdown-menu-hover-color, #eee);
text-decoration: none;
}
// Disabled state
// --------------
// Gray out text and ensure the hover state remains gray
.dropdown-menu .disabled > a,
.dropdown-menu .disabled > a:hover {
color: var(--dropdown-menu-disabled-color, #999);
cursor: not-allowed;
opacity: 0.5;
}