snappymail/vendors/bootstrap/less/dropdowns.less

67 lines
1.6 KiB
Text
Raw Normal View History

//
// 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 {
2021-11-15 19:16:02 +08:00
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);
2022-11-04 22:54:26 +08:00
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 {
2021-11-15 19:16:02 +08:00
background-color: var(--dropdown-menu-bg-color, #fff);
color: var(--dropdown-menu-color, #333);
display: block;
2021-02-09 00:37:21 +08:00
padding: 3px 10px;
2021-11-15 19:16:02 +08:00
text-decoration: none;
white-space: nowrap;
}
}
// Hover state
// -----------
2021-11-15 19:16:02 +08:00
.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);
2021-11-15 19:16:02 +08:00
cursor: not-allowed;
opacity: 0.5;
}