2013-11-16 06:21:12 +08:00
|
|
|
//
|
|
|
|
// Dropdown menus
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
2022-08-05 15:23:15 +08:00
|
|
|
// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
|
|
|
|
.dropdown {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
2013-11-16 06:21:12 +08:00
|
|
|
|
|
|
|
// The dropdown menu (ul)
|
|
|
|
// ----------------------
|
|
|
|
.dropdown-menu {
|
2021-11-15 19:16:02 +08:00
|
|
|
max-height: 60vh;
|
|
|
|
max-width: 90vw;
|
|
|
|
overflow: auto;
|
2013-11-16 06:21:12 +08:00
|
|
|
position: absolute;
|
|
|
|
top: 100%;
|
|
|
|
left: 0;
|
2022-11-03 03:49:38 +08:00
|
|
|
z-index: 1000;
|
2013-11-16 06:21:12 +08:00
|
|
|
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;
|
2021-02-05 17:42:20 +08:00
|
|
|
color: var(--dropdown-menu-color, inherit);
|
2022-11-03 03:49:38 +08:00
|
|
|
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));
|
2021-02-05 17:42:20 +08:00
|
|
|
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
|
2020-09-03 03:30:23 +08:00
|
|
|
background-clip: padding-box;
|
2013-11-16 06:21:12 +08:00
|
|
|
|
|
|
|
// Aligns the dropdown menu to right
|
2021-02-09 04:19:58 +08:00
|
|
|
&.right-edge {
|
2013-11-16 06:21:12 +08:00
|
|
|
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);
|
2022-11-03 03:49:38 +08:00
|
|
|
color: var(--dropdown-menu-color, #333);
|
2013-11-16 06:21:12 +08:00
|
|
|
display: block;
|
2021-02-09 00:37:21 +08:00
|
|
|
padding: 3px 10px;
|
2021-11-15 19:16:02 +08:00
|
|
|
text-decoration: none;
|
2013-11-16 06:21:12 +08:00
|
|
|
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);
|
2013-11-16 06:21:12 +08:00
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Disabled state
|
|
|
|
// --------------
|
|
|
|
// Gray out text and ensure the hover state remains gray
|
|
|
|
.dropdown-menu .disabled > a,
|
|
|
|
.dropdown-menu .disabled > a:hover {
|
2022-11-03 19:45:10 +08:00
|
|
|
color: var(--dropdown-menu-disabled-color, #999);
|
2021-11-15 19:16:02 +08:00
|
|
|
cursor: not-allowed;
|
|
|
|
opacity: 0.5;
|
2013-11-16 06:21:12 +08:00
|
|
|
}
|