2014-06-04 11:14:35 -04:00
|
|
|
//
|
|
|
|
// Dropdown menus
|
|
|
|
// --------------------------------------------------
|
|
|
|
|
|
|
|
// Dropdown arrow/caret
|
|
|
|
.caret {
|
|
|
|
display: inline-block;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
margin-left: 2px;
|
|
|
|
vertical-align: middle;
|
2019-12-05 14:09:31 -05:00
|
|
|
border-top: @caret-width-base solid;
|
2014-06-04 11:14:35 -04:00
|
|
|
border-right: @caret-width-base solid transparent;
|
2019-12-05 14:09:31 -05:00
|
|
|
border-left: @caret-width-base solid transparent;
|
|
|
|
margin-top: -@caret-width-base / 2;
|
2014-06-04 11:14:35 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// The dropdown wrapper (div)
|
|
|
|
.dropdown {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
2020-09-25 04:40:38 -04:00
|
|
|
.open button.dropdown-toggle.dropdown-toggle-no-background,
|
|
|
|
button.dropdown-toggle.dropdown-toggle-no-background {
|
|
|
|
background-color: transparent;
|
|
|
|
box-shadow: none;
|
|
|
|
border: 0;
|
|
|
|
&:hover,
|
|
|
|
&:active,
|
|
|
|
&:focus {
|
|
|
|
background-color: transparent;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-04 11:14:35 -04:00
|
|
|
// Prevent the focus on the dropdown toggle when closing dropdowns
|
|
|
|
.dropdown-toggle:focus {
|
|
|
|
outline: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// The dropdown menu (ul)
|
|
|
|
.dropdown-menu {
|
|
|
|
position: absolute;
|
|
|
|
top: 100%;
|
|
|
|
left: 0;
|
|
|
|
z-index: @zindex-dropdown;
|
|
|
|
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;
|
|
|
|
font-size: @font-size-base;
|
|
|
|
background-color: @dropdown-bg;
|
|
|
|
border: 1px solid @dropdown-fallback-border; // IE8 fallback
|
|
|
|
border: 1px solid @dropdown-border;
|
|
|
|
border-radius: @border-radius-base;
|
2019-12-05 14:09:31 -05:00
|
|
|
.box-shadow(0 6px 12px rgba(0, 0, 0, 0.175));
|
2014-06-04 11:14:35 -04:00
|
|
|
background-clip: padding-box;
|
|
|
|
|
|
|
|
// Aligns the dropdown menu to right
|
|
|
|
//
|
|
|
|
// Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`
|
|
|
|
&.pull-right {
|
|
|
|
right: 0;
|
|
|
|
left: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Dividers (basically an hr) within the dropdown
|
|
|
|
.divider {
|
|
|
|
.nav-divider(@dropdown-divider-bg);
|
|
|
|
}
|
|
|
|
|
2016-11-29 11:04:20 -05:00
|
|
|
// Links and other items within the dropdown menu
|
2019-12-05 14:09:31 -05:00
|
|
|
> li > a,
|
|
|
|
div,
|
|
|
|
.dropdown-menu-button {
|
2014-06-04 11:14:35 -04:00
|
|
|
display: block;
|
2017-12-21 08:34:11 -05:00
|
|
|
padding: @dropdown-item-padding;
|
2014-06-04 11:14:35 -04:00
|
|
|
clear: both;
|
|
|
|
font-weight: normal;
|
|
|
|
line-height: @line-height-base;
|
|
|
|
color: @dropdown-link-color;
|
|
|
|
white-space: nowrap; // prevent links from randomly breaking onto new lines
|
2016-11-29 11:04:20 -05:00
|
|
|
&.subdued {
|
2019-12-05 14:09:31 -05:00
|
|
|
color: #7a7a7a;
|
2016-11-29 11:04:20 -05:00
|
|
|
}
|
2016-02-02 09:50:48 -05:00
|
|
|
.subdued {
|
2019-12-05 14:09:31 -05:00
|
|
|
color: #7a7a7a;
|
2016-02-02 09:50:48 -05:00
|
|
|
}
|
2014-06-04 11:14:35 -04:00
|
|
|
}
|
2019-01-16 12:04:11 -05:00
|
|
|
|
|
|
|
// button specific styles
|
|
|
|
.dropdown-menu-button {
|
|
|
|
border: none;
|
|
|
|
outline: none;
|
|
|
|
width: 100%;
|
|
|
|
}
|
2024-08-12 10:45:27 -04:00
|
|
|
|
|
|
|
.dropdown-header {
|
|
|
|
color: @dropdown-header-color;
|
|
|
|
}
|
2014-06-04 11:14:35 -04:00
|
|
|
}
|
2022-04-08 05:17:13 -04:00
|
|
|
|
|
|
|
// This removes positioning, display and z-index, which is used just to style the menu in situations where something
|
|
|
|
// else is managing that stuff (e.g. the spelling context menu in CodeMirror 6).
|
|
|
|
.dropdown-menu.dropdown-menu-unpositioned {
|
|
|
|
position: unset;
|
|
|
|
top: unset;
|
|
|
|
left: unset;
|
|
|
|
z-index: unset;
|
|
|
|
display: block;
|
|
|
|
float: unset;
|
|
|
|
}
|
2014-06-04 11:14:35 -04:00
|
|
|
|
|
|
|
// Hover/Focus state
|
2019-12-05 14:09:31 -05:00
|
|
|
.dropdown-menu > li > a,
|
|
|
|
.dropdown-menu .dropdown-menu-button {
|
2014-06-04 11:14:35 -04:00
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
text-decoration: none;
|
2020-11-06 09:55:08 -05:00
|
|
|
color: @dropdown-link-hover-color;
|
2014-06-04 11:14:35 -04:00
|
|
|
background-color: @dropdown-link-hover-bg;
|
2016-02-02 09:50:48 -05:00
|
|
|
.subdued {
|
|
|
|
color: @dropdown-link-hover-color;
|
|
|
|
}
|
2022-05-24 07:22:11 -04:00
|
|
|
div {
|
|
|
|
color: @dropdown-link-hover-color;
|
|
|
|
}
|
2014-06-04 11:14:35 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Active state
|
|
|
|
.dropdown-menu > .active > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @dropdown-link-active-color;
|
|
|
|
text-decoration: none;
|
|
|
|
outline: 0;
|
|
|
|
background-color: @dropdown-link-active-bg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Disabled state
|
|
|
|
//
|
|
|
|
// Gray out text and ensure the hover/focus state remains gray
|
|
|
|
|
|
|
|
.dropdown-menu > .disabled > a {
|
|
|
|
&,
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
color: @dropdown-link-disabled-color;
|
2023-05-03 07:33:36 -04:00
|
|
|
div {
|
|
|
|
color: @dropdown-link-disabled-color;
|
|
|
|
}
|
2014-06-04 11:14:35 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// Nuke hover/focus effects
|
|
|
|
.dropdown-menu > .disabled > a {
|
|
|
|
&:hover,
|
|
|
|
&:focus {
|
|
|
|
text-decoration: none;
|
|
|
|
background-color: transparent;
|
|
|
|
background-image: none; // Remove CSS gradient
|
|
|
|
.reset-filter();
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Open state for the dropdown
|
|
|
|
.open {
|
|
|
|
// Show the menu
|
|
|
|
> .dropdown-menu {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Remove the outline when :focus is triggered
|
|
|
|
> a {
|
|
|
|
outline: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Menu positioning
|
|
|
|
//
|
|
|
|
// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown
|
|
|
|
// menu with the parent.
|
|
|
|
.dropdown-menu-right {
|
|
|
|
left: auto; // Reset the default from `.dropdown-menu`
|
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
// With v3, we enabled auto-flipping if you have a dropdown within a right
|
|
|
|
// aligned nav component. To enable the undoing of that, we provide an override
|
|
|
|
// to restore the default dropdown menu alignment.
|
|
|
|
//
|
|
|
|
// This is only for left-aligning a dropdown menu within a `.navbar-right` or
|
|
|
|
// `.pull-right` nav component.
|
|
|
|
.dropdown-menu-left {
|
|
|
|
left: 0;
|
|
|
|
right: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Dropdown section headers
|
|
|
|
.dropdown-header {
|
|
|
|
display: block;
|
2024-08-12 10:45:27 -04:00
|
|
|
padding: 12.5px 15px;
|
2014-06-04 11:14:35 -04:00
|
|
|
font-size: @font-size-small;
|
|
|
|
line-height: @line-height-base;
|
|
|
|
color: @dropdown-header-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Backdrop to catch body clicks on mobile, etc.
|
|
|
|
.dropdown-backdrop {
|
|
|
|
position: fixed;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
top: 0;
|
|
|
|
z-index: (@zindex-dropdown - 10);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Right aligned dropdowns
|
|
|
|
.pull-right > .dropdown-menu {
|
|
|
|
right: 0;
|
|
|
|
left: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
|
|
|
//
|
|
|
|
// Just add .dropup after the standard .dropdown class and you're set, bro.
|
|
|
|
// TODO: abstract this so that the navbar fixed styles are not placed here?
|
|
|
|
|
|
|
|
.dropup,
|
|
|
|
.navbar-fixed-bottom .dropdown {
|
|
|
|
// Reverse the caret
|
|
|
|
.caret {
|
|
|
|
border-top: 0;
|
|
|
|
border-bottom: @caret-width-base solid;
|
2019-12-05 14:09:31 -05:00
|
|
|
content: '';
|
2014-06-04 11:14:35 -04:00
|
|
|
}
|
|
|
|
// Different positioning for bottom up menu
|
|
|
|
.dropdown-menu {
|
|
|
|
top: auto;
|
|
|
|
bottom: 100%;
|
|
|
|
margin-bottom: 1px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Component alignment
|
|
|
|
//
|
|
|
|
// Reiterate per navbar.less and the modified component alignment there.
|
|
|
|
|
|
|
|
@media (min-width: @grid-float-breakpoint) {
|
|
|
|
.navbar-right {
|
|
|
|
.dropdown-menu {
|
|
|
|
.dropdown-menu-right();
|
|
|
|
}
|
|
|
|
// Necessary for overrides of the default right aligned menu.
|
|
|
|
// Will remove come v4 in all likelihood.
|
|
|
|
.dropdown-menu-left {
|
|
|
|
.dropdown-menu-left();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-05-24 07:22:11 -04:00
|
|
|
|
|
|
|
.layout-dropdown {
|
|
|
|
.dropdown-toggle {
|
|
|
|
// override style added by required bsStyle react-bootstrap prop
|
|
|
|
text-decoration: none !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
.dropdown-menu > li {
|
|
|
|
svg {
|
|
|
|
line,
|
|
|
|
rect {
|
|
|
|
stroke: @dropdown-link-color;
|
|
|
|
}
|
|
|
|
path {
|
|
|
|
fill: @dropdown-link-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> a {
|
|
|
|
padding: 4px 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> a:hover,
|
|
|
|
> a:focus {
|
|
|
|
svg {
|
|
|
|
line,
|
|
|
|
rect {
|
|
|
|
stroke: @dropdown-link-hover-color;
|
|
|
|
}
|
|
|
|
path {
|
|
|
|
fill: @dropdown-link-hover-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.disabled {
|
|
|
|
.subdued {
|
|
|
|
color: @dropdown-link-disabled-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
svg {
|
|
|
|
line,
|
|
|
|
rect {
|
|
|
|
stroke: @dropdown-link-disabled-color;
|
|
|
|
}
|
|
|
|
path {
|
|
|
|
fill: @dropdown-link-disabled-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
> a:hover,
|
|
|
|
> a:focus {
|
|
|
|
.subdued {
|
|
|
|
color: @dropdown-link-disabled-color;
|
|
|
|
}
|
|
|
|
|
|
|
|
svg {
|
|
|
|
line,
|
|
|
|
rect {
|
|
|
|
stroke: @dropdown-link-disabled-color;
|
|
|
|
}
|
|
|
|
path {
|
|
|
|
fill: @dropdown-link-disabled-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.layout-menu-item {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
white-space: nowrap;
|
|
|
|
justify-content: space-between;
|
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
.layout-menu-item-start {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
> div {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.layout-dropdown-list {
|
|
|
|
a {
|
|
|
|
i {
|
|
|
|
margin-right: @margin-xs;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|