2013-11-16 06:21:12 +08:00
|
|
|
//
|
|
|
|
// 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;
|
|
|
|
}
|
|
|
|
.dropdown-toggle:active,
|
|
|
|
.open .dropdown-toggle {
|
|
|
|
outline: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Dropdown arrow/caret
|
|
|
|
// --------------------
|
|
|
|
.caret {
|
|
|
|
display: inline-block;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
vertical-align: top;
|
|
|
|
border-top: 4px solid @black;
|
|
|
|
border-right: 4px solid transparent;
|
|
|
|
border-left: 4px solid transparent;
|
|
|
|
content: "";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Place the caret
|
|
|
|
.dropdown .caret {
|
|
|
|
margin-top: 8px;
|
|
|
|
margin-left: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
// The dropdown menu (ul)
|
|
|
|
// ----------------------
|
|
|
|
.dropdown-menu {
|
|
|
|
position: absolute;
|
|
|
|
top: 100%;
|
|
|
|
left: 0;
|
|
|
|
z-index: @zindexDropdown;
|
|
|
|
display: none; // none by default, but block on "open" of the menu
|
|
|
|
float: left;
|
|
|
|
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);
|
|
|
|
background-color: var(--dropdown-menu-background-color, @dropdownBackground);
|
2013-11-16 06:21:12 +08:00
|
|
|
border: 1px solid @dropdownBorder;
|
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 {
|
|
|
|
display: block;
|
2021-02-09 00:37:21 +08:00
|
|
|
padding: 3px 10px;
|
2013-11-16 06:21:12 +08:00
|
|
|
clear: both;
|
|
|
|
font-weight: normal;
|
|
|
|
line-height: @baseLineHeight;
|
|
|
|
color: @dropdownLinkColor;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Hover state
|
|
|
|
// -----------
|
|
|
|
.dropdown-menu li > a:hover,
|
2021-02-02 05:54:19 +08:00
|
|
|
.dropdown-menu li > a:focus {
|
2013-11-16 06:21:12 +08:00
|
|
|
text-decoration: none;
|
|
|
|
color: @dropdownLinkColorHover;
|
|
|
|
background-color: @dropdownLinkBackgroundHover;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Active state
|
|
|
|
// ------------
|
|
|
|
.dropdown-menu .active > a,
|
|
|
|
.dropdown-menu .active > a:hover {
|
|
|
|
color: @dropdownLinkColorHover;
|
|
|
|
text-decoration: none;
|
|
|
|
outline: 0;
|
|
|
|
background-color: @dropdownLinkBackgroundActive;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Disabled state
|
|
|
|
// --------------
|
|
|
|
// Gray out text and ensure the hover state remains gray
|
|
|
|
.dropdown-menu .disabled > a,
|
|
|
|
.dropdown-menu .disabled > a:hover {
|
|
|
|
color: @grayLight;
|
|
|
|
}
|
|
|
|
// Nuke hover effects
|
|
|
|
.dropdown-menu .disabled > a:hover {
|
|
|
|
text-decoration: none;
|
|
|
|
background-color: transparent;
|
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Open state for the dropdown
|
|
|
|
// ---------------------------
|
|
|
|
.open {
|
|
|
|
& > .dropdown-menu {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Right aligned dropdowns
|
|
|
|
// ---------------------------
|
|
|
|
.pull-right > .dropdown-menu {
|
|
|
|
right: 0;
|
|
|
|
left: auto;
|
|
|
|
}
|