debian-mirror-gitlab/app/assets/stylesheets/framework/dropdowns.scss

1120 lines
20 KiB
SCSS
Raw Normal View History

2016-06-02 11:05:42 +05:30
.dropdown {
position: relative;
2016-09-29 09:46:39 +05:30
2020-04-22 19:07:51 +05:30
// Once the new design (https://gitlab.com/gitlab-org/gitlab-foss/-/issues/63499/designs)
// for Snippets is introduced and Clone button is relocated, we won't
// need this style.
// Issue for the refactoring: https://gitlab.com/gitlab-org/gitlab/-/issues/213327
&.gl-new-dropdown button.dropdown-toggle {
@include gl-display-inline-flex;
}
2016-09-29 09:46:39 +05:30
.btn-link {
&:hover {
cursor: pointer;
}
}
2016-06-02 11:05:42 +05:30
}
2017-08-17 22:00:37 +05:30
@mixin set-visible {
transform: translateY(0);
2018-03-17 18:26:18 +05:30
display: block;
2017-08-17 22:00:37 +05:30
}
@mixin set-invisible {
transform: translateY(-10px);
2018-03-17 18:26:18 +05:30
display: none;
2017-08-17 22:00:37 +05:30
}
2018-11-08 19:23:39 +05:30
.show.dropdown {
2021-01-03 14:25:43 +05:30
.dropdown-menu {
2017-08-17 22:00:37 +05:30
@include set-visible;
2018-03-17 18:26:18 +05:30
min-height: $dropdown-min-height;
max-height: $dropdown-max-height;
overflow-y: auto;
2016-11-03 12:29:30 +05:30
2019-03-02 22:35:43 +05:30
&.dropdown-extended-height {
2021-04-17 20:07:23 +05:30
$extended-max-height: 400px;
max-height: $extended-max-height;
// See comment below for explanation
.gl-new-dropdown-inner {
max-height: $extended-max-height - 2px;
}
2019-03-02 22:35:43 +05:30
}
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
2016-08-24 12:49:21 +05:30
width: 100%;
}
2018-11-08 19:23:39 +05:30
&.frequent-items-dropdown-menu {
padding: 0;
overflow-y: initial;
max-height: initial;
}
2021-04-17 20:07:23 +05:30
// `GlDropdown` specifies the `max-height` of `.gl-new-dropdown-inner`
// as `$dropdown-max-height`, but the `max-height` rule above forces
// the parent `.dropdown-menu` to be _slightly_ too small because of
// the 1px borders. The workaround below overrides the @gitlab/ui style
// to avoid a double scroll bar.
.gl-new-dropdown-inner {
max-height: $dropdown-max-height - 2px;
}
2016-06-02 11:05:42 +05:30
}
2017-08-17 22:00:37 +05:30
.dropdown-toggle,
2016-06-02 11:05:42 +05:30
.dropdown-menu-toggle {
2017-08-17 22:00:37 +05:30
border-color: $gray-darkest;
2016-06-02 11:05:42 +05:30
}
2017-09-10 17:25:29 +05:30
2018-10-15 14:42:47 +05:30
[data-toggle='dropdown'] {
2017-09-10 17:25:29 +05:30
outline: 0;
}
2016-06-02 11:05:42 +05:30
}
2018-03-17 18:26:18 +05:30
// Get search dropdown to line up with other nav dropdowns
.search-input-container .dropdown-menu {
margin-top: 11px;
}
2019-09-30 21:07:59 +05:30
.dropdown-toggle,
.confidential-merge-request-fork-group .dropdown-toggle {
2017-08-17 22:00:37 +05:30
padding: 6px 8px 6px 10px;
2020-04-22 19:07:51 +05:30
background-color: $white;
2017-08-17 22:00:37 +05:30
color: $gl-text-color;
font-size: 14px;
2016-06-02 11:05:42 +05:30
text-align: left;
2017-08-17 22:00:37 +05:30
border: 1px solid $border-color;
2016-06-02 11:05:42 +05:30
border-radius: $border-radius-base;
white-space: nowrap;
2018-11-08 19:23:39 +05:30
&:disabled.read-only {
color: $gl-text-color !important;
}
2017-08-17 22:00:37 +05:30
&.no-outline {
outline: 0;
2016-06-02 11:05:42 +05:30
}
2016-08-24 12:49:21 +05:30
&.large {
width: 200px;
}
2016-09-13 17:45:13 +05:30
&.wide {
width: 100%;
+ .dropdown-select {
width: 100%;
}
}
2016-09-29 09:46:39 +05:30
// Allows dynamic-width text in the dropdown toggle.
// Resizes to allow long text without overflowing the container.
&.dynamic {
width: auto;
min-width: 160px;
max-width: 100%;
padding-right: 25px;
}
2017-08-17 22:00:37 +05:30
.fa {
color: $gray-darkest;
}
&:hover {
border-color: $gray-darkest;
}
&:focus:active {
border-color: $dropdown-toggle-active-border-color;
2017-09-10 17:25:29 +05:30
outline: 0;
2017-08-17 22:00:37 +05:30
}
}
.dropdown-menu-toggle {
@extend .dropdown-toggle;
padding-right: 25px;
position: relative;
2019-03-02 22:35:43 +05:30
width: 160px;
2017-08-17 22:00:37 +05:30
text-overflow: ellipsis;
overflow: hidden;
.fa {
position: absolute;
}
2018-12-13 13:39:08 +05:30
2020-04-08 14:13:33 +05:30
.spinner {
position: absolute;
top: 9px;
right: 8px;
}
2020-11-24 15:15:51 +05:30
.dropdown-menu-toggle-icon {
2018-12-13 13:39:08 +05:30
position: absolute;
right: $gl-padding-8;
color: $gray-darkest;
}
2017-08-17 22:00:37 +05:30
}
2020-11-24 15:15:51 +05:30
.labels {
// Prevent double scroll-bars for labels dropdown.
.dropdown-menu-toggle.wide + .dropdown-select {
max-height: unset;
}
}
2020-03-13 15:44:24 +05:30
.gl-dropdown .dropdown-menu-toggle {
2020-04-08 14:13:33 +05:30
padding-right: $gl-padding-8;
2020-03-13 15:44:24 +05:30
2020-04-08 14:13:33 +05:30
.gl-dropdown-toggle-text {
min-height: $gl-line-height-20;
2020-03-13 15:44:24 +05:30
}
}
2018-03-17 18:26:18 +05:30
@mixin dropdown-item-hover {
2018-11-20 20:47:30 +05:30
background-color: $gray-darker;
2018-03-17 18:26:18 +05:30
color: $gl-text-color;
outline: 0;
}
2017-08-17 22:00:37 +05:30
@mixin dropdown-link {
2018-03-17 18:26:18 +05:30
background: transparent;
border: 0;
border-radius: 0;
box-shadow: none;
2017-08-17 22:00:37 +05:30
display: block;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-normal;
2017-08-17 22:00:37 +05:30
position: relative;
2019-02-15 15:39:39 +05:30
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
2017-08-17 22:00:37 +05:30
color: $gl-text-color;
2019-02-15 15:39:39 +05:30
line-height: $gl-btn-line-height;
2018-03-17 18:26:18 +05:30
white-space: normal;
2017-08-17 22:00:37 +05:30
overflow: hidden;
2018-03-17 18:26:18 +05:30
text-align: left;
width: 100%;
2018-10-15 14:42:47 +05:30
&.disable-hover {
text-decoration: none;
}
&:not(.disable-hover):hover,
2018-03-17 18:26:18 +05:30
&:active,
2017-08-17 22:00:37 +05:30
&:focus,
&.is-focused {
2018-03-17 18:26:18 +05:30
@include dropdown-item-hover;
2017-08-17 22:00:37 +05:30
text-decoration: none;
}
&.dropdown-menu-user-link {
line-height: 16px;
2018-03-17 18:26:18 +05:30
padding-top: 10px;
padding-bottom: 7px;
white-space: nowrap;
.dropdown-menu-user-username {
display: block;
}
2017-08-17 22:00:37 +05:30
}
.icon-play {
fill: $gl-text-color-secondary;
margin-right: 6px;
height: 12px;
width: 11px;
}
2016-06-02 11:05:42 +05:30
}
2021-01-03 14:25:43 +05:30
.dropdown-menu {
2018-11-08 19:23:39 +05:30
display: none;
2016-06-02 11:05:42 +05:30
position: absolute;
2017-09-10 17:25:29 +05:30
width: auto;
2016-06-02 11:05:42 +05:30
top: 100%;
2021-03-11 19:13:27 +05:30
z-index: $zindex-dropdown-menu;
2017-08-17 22:00:37 +05:30
min-width: 240px;
2017-09-10 17:25:29 +05:30
max-width: 500px;
2018-03-17 18:26:18 +05:30
margin-top: $dropdown-vertical-offset;
margin-bottom: 24px;
2017-08-17 22:00:37 +05:30
font-size: 14px;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-normal;
2016-08-24 12:49:21 +05:30
padding: 8px 0;
2020-04-22 19:07:51 +05:30
background-color: $white;
2018-11-20 20:47:30 +05:30
border: 1px solid $border-color;
2016-06-02 11:05:42 +05:30
border-radius: $border-radius-base;
box-shadow: 0 2px 4px $dropdown-shadow-color;
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
&.dropdown-open-top {
margin-bottom: $dropdown-vertical-offset;
}
2017-09-10 17:25:29 +05:30
&.dropdown-open-left {
right: 0;
left: auto;
2017-08-17 22:00:37 +05:30
}
2016-06-02 11:05:42 +05:30
&.is-loading {
.dropdown-content {
display: none;
}
.dropdown-loading {
display: block;
}
}
2017-08-17 22:00:37 +05:30
.shortcut-mappings {
display: none;
}
&.shortcuts .shortcut-mappings {
display: inline-block;
margin-right: 5px;
}
2016-06-02 11:05:42 +05:30
ul {
margin: 0;
padding: 0;
}
li {
2018-03-17 18:26:18 +05:30
display: block;
2016-06-02 11:05:42 +05:30
text-align: left;
list-style: none;
2018-03-17 18:26:18 +05:30
padding: 0 1px;
2020-01-01 13:55:28 +05:30
> a,
2018-03-17 18:26:18 +05:30
button,
2020-10-24 23:57:45 +05:30
.gl-button.btn-link,
2018-03-17 18:26:18 +05:30
.menu-item {
@include dropdown-link;
}
2016-06-02 11:05:42 +05:30
}
.divider {
height: 1px;
2018-03-27 19:54:05 +05:30
margin: #{$grid-size / 2} 0;
2016-06-02 11:05:42 +05:30
padding: 0;
2019-02-15 15:39:39 +05:30
background-color: $dropdown-divider-bg;
2018-03-17 18:26:18 +05:30
&:hover {
2019-02-15 15:39:39 +05:30
background-color: $dropdown-divider-bg;
2018-03-17 18:26:18 +05:30
}
2016-06-02 11:05:42 +05:30
}
.separator {
width: 100%;
height: 1px;
margin-top: 8px;
margin-bottom: 8px;
2019-02-15 15:39:39 +05:30
background-color: $dropdown-divider-bg;
2016-06-02 11:05:42 +05:30
}
2018-03-17 18:26:18 +05:30
.dropdown-menu-empty-item a {
&:hover,
&:focus {
background-color: transparent;
}
2016-06-02 11:05:42 +05:30
}
.dropdown-header {
2019-12-21 20:55:43 +05:30
color: $black;
2016-06-02 11:05:42 +05:30
font-size: 13px;
2019-12-21 20:55:43 +05:30
font-weight: $gl-font-weight-bold;
2019-02-15 15:39:39 +05:30
line-height: $gl-line-height;
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
2017-08-17 22:00:37 +05:30
}
&.capitalize-header .dropdown-header {
text-transform: capitalize;
2016-06-02 11:05:42 +05:30
}
2017-09-10 17:25:29 +05:30
.dropdown-bold-header {
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2019-02-15 15:39:39 +05:30
line-height: $gl-line-height;
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
2016-06-02 11:05:42 +05:30
}
2016-09-29 09:46:39 +05:30
.unclickable {
cursor: not-allowed;
padding: 5px 8px;
2017-08-17 22:00:37 +05:30
color: $gl-text-color-secondary;
2016-09-29 09:46:39 +05:30
}
2017-08-17 22:00:37 +05:30
2021-03-11 19:13:27 +05:30
.badge.badge-pill + span:not(.badge):not(.badge-pill) {
2017-09-10 17:25:29 +05:30
// Expects up to 3 digits on the badge
margin-right: 40px;
}
2019-07-31 22:56:46 +05:30
.dropdown-menu-content {
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
}
2017-09-10 17:25:29 +05:30
}
2020-05-24 23:13:21 +05:30
.dropdown-item {
@include dropdown-link;
}
2017-09-10 17:25:29 +05:30
.droplab-dropdown {
2021-02-22 17:27:13 +05:30
.dropdown-toggle > i,
.dropdown-toggle > svg {
2017-09-10 17:25:29 +05:30
pointer-events: none;
}
2021-01-03 14:25:43 +05:30
.dropdown-menu {
display: none;
opacity: 1;
visibility: visible;
transform: translateY(0);
2017-09-10 17:25:29 +05:30
2021-01-03 14:25:43 +05:30
li {
cursor: pointer;
2018-03-17 18:26:18 +05:30
2021-01-03 14:25:43 +05:30
&.droplab-item-active button {
@include dropdown-item-hover;
}
2017-09-10 17:25:29 +05:30
2021-01-03 14:25:43 +05:30
> a,
> button {
display: flex;
margin: 0;
text-overflow: inherit;
text-align: left;
&.btn .fa:not(:last-child) {
margin-left: 5px;
}
2017-09-10 17:25:29 +05:30
}
2021-01-03 14:25:43 +05:30
> button.dropdown-epic-button {
flex-direction: column;
2020-04-08 14:13:33 +05:30
2021-01-03 14:25:43 +05:30
.reference {
color: $gray-300;
margin-top: $gl-padding-4;
}
2020-04-08 14:13:33 +05:30
}
2021-01-29 00:20:46 +05:30
&.droplab-item-selected i,
&.droplab-item-selected svg {
2021-01-03 14:25:43 +05:30
visibility: visible;
}
2017-09-10 17:25:29 +05:30
2021-01-03 14:25:43 +05:30
.icon {
visibility: hidden;
}
2017-09-10 17:25:29 +05:30
2021-01-03 14:25:43 +05:30
.description {
display: inline-block;
white-space: normal;
margin-left: 5px;
2017-09-10 17:25:29 +05:30
2021-01-03 14:25:43 +05:30
p {
margin-bottom: 0;
}
2017-09-10 17:25:29 +05:30
}
}
}
.icon {
display: inline-block;
vertical-align: top;
padding-top: 2px;
2017-08-17 22:00:37 +05:30
}
}
2018-11-08 19:23:39 +05:30
.comment-type-dropdown.show .dropdown-menu {
2018-03-17 18:26:18 +05:30
display: block;
}
2017-08-17 22:00:37 +05:30
.filtered-search-box-input-container {
2021-01-03 14:25:43 +05:30
.dropdown-menu {
2017-08-17 22:00:37 +05:30
max-width: 280px;
}
}
.dropdown-menu-drop-up {
top: auto;
bottom: 100%;
2016-06-02 11:05:42 +05:30
}
.dropdown-menu-large {
width: 340px;
}
.dropdown-menu-no-wrap {
a {
white-space: normal;
}
}
.dropdown-menu-full-width {
width: 100%;
}
2016-06-02 11:05:42 +05:30
.dropdown-menu-paging {
.dropdown-page-two,
.dropdown-menu-back {
display: none;
}
&.is-page-two {
.dropdown-page-one {
display: none;
}
.dropdown-page-two,
.dropdown-menu-back {
display: block;
}
.dropdown-content {
padding: 0 10px;
}
}
}
.dropdown-menu-user {
.avatar {
float: left;
2017-08-17 22:00:37 +05:30
width: 2 * $gl-padding;
height: 2 * $gl-padding;
2016-06-02 11:05:42 +05:30
margin: 0 10px 0 0;
}
}
.dropdown-menu-user-full-name {
display: block;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-normal;
2016-06-02 11:05:42 +05:30
line-height: 16px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.dropdown-menu-user-username {
display: block;
line-height: 16px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.dropdown-select {
width: $dropdown-width;
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(sm) {
2017-08-17 22:00:37 +05:30
width: 100%;
}
2016-06-02 11:05:42 +05:30
}
.dropdown-menu-selectable {
2018-03-17 18:26:18 +05:30
li {
2018-10-15 14:42:47 +05:30
a,
2019-12-26 22:10:19 +05:30
button,
2021-03-11 19:13:27 +05:30
.dropdown-item:not(.open-with-link) {
2018-03-17 18:26:18 +05:30
padding: 8px 40px;
position: relative;
&.is-indeterminate,
&.is-active {
color: $gl-text-color;
2018-05-09 12:01:36 +05:30
&.dropdown-menu-user-link::before {
top: 50%;
2018-03-17 18:26:18 +05:30
}
2016-06-02 11:05:42 +05:30
}
2018-03-17 18:26:18 +05:30
&.is-indeterminate::before {
2021-02-22 17:27:13 +05:30
position: absolute;
left: 16px;
top: 16px;
transform: translateY(-50%);
font-style: normal;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
content: '';
2018-03-17 18:26:18 +05:30
}
2021-02-22 17:27:13 +05:30
&.is-active {
/* stylelint-disable-next-line function-url-quotes */
2021-03-11 19:13:27 +05:30
background: url(asset_path('checkmark.png')) no-repeat 14px center;
2018-03-17 18:26:18 +05:30
}
}
2016-06-02 11:05:42 +05:30
}
}
.dropdown-title {
position: relative;
2019-02-15 15:39:39 +05:30
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
padding-bottom: #{2 * $dropdown-item-padding-y};
margin-bottom: $dropdown-item-padding-y;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2016-06-02 11:05:42 +05:30
line-height: 1;
text-align: center;
text-overflow: ellipsis;
white-space: nowrap;
2019-02-15 15:39:39 +05:30
border-bottom: 1px solid $dropdown-divider-bg;
2016-06-02 11:05:42 +05:30
overflow: hidden;
}
.dropdown-title-button {
padding: 0;
color: $dropdown-title-btn-color;
border: 0;
background: none;
outline: 0;
&:hover {
color: darken($dropdown-title-btn-color, 15%);
}
}
.dropdown-menu-back {
2020-11-24 15:15:51 +05:30
left: 10px;
top: $gl-padding-8;
2016-06-02 11:05:42 +05:30
}
.dropdown-input {
position: relative;
margin-bottom: 10px;
padding: 0 10px;
2018-12-13 13:39:08 +05:30
.input-icon,
2020-11-24 15:15:51 +05:30
.dropdown-input-clear,
.dropdown-input-search {
2016-06-02 11:05:42 +05:30
position: absolute;
2018-12-13 13:39:08 +05:30
top: $gl-padding-8;
2016-06-02 11:05:42 +05:30
right: 20px;
2021-03-08 18:12:59 +05:30
color: $gray-500;
2016-06-02 11:05:42 +05:30
font-size: 12px;
pointer-events: none;
}
.dropdown-input-clear {
display: none;
cursor: pointer;
pointer-events: all;
2020-07-28 23:09:34 +05:30
top: $gl-padding-8;
2016-06-02 11:05:42 +05:30
font-size: 14px;
2020-07-28 23:09:34 +05:30
&:not(.gl-icon) {
right: 22px;
}
2016-06-02 11:05:42 +05:30
}
&.has-value {
.dropdown-input-clear {
display: block;
}
.dropdown-input-search {
display: none;
}
}
}
2017-08-17 22:00:37 +05:30
.dropdown-input-field,
.default-dropdown-input {
2020-06-23 00:09:42 +05:30
background-color: $input-bg;
2017-09-10 17:25:29 +05:30
display: block;
2016-06-02 11:05:42 +05:30
width: 100%;
2016-09-13 17:45:13 +05:30
min-height: 30px;
2016-06-02 11:05:42 +05:30
padding: 0 7px;
2020-11-24 15:15:51 +05:30
color: $gray-700;
2016-06-02 11:05:42 +05:30
line-height: 30px;
2019-02-15 15:39:39 +05:30
border: 1px solid $dropdown-divider-bg;
2016-06-02 11:05:42 +05:30
border-radius: 2px;
outline: 0;
&:focus {
2020-11-24 15:15:51 +05:30
color: $gray-700;
2018-11-20 20:47:30 +05:30
border-color: $blue-300;
2016-06-02 11:05:42 +05:30
box-shadow: 0 0 4px $dropdown-input-focus-shadow;
2020-11-24 15:15:51 +05:30
~ .fa,
~ .dropdown-input-clear {
color: $gray-700;
2016-06-02 11:05:42 +05:30
}
}
&:hover {
2020-11-24 15:15:51 +05:30
~ .fa,
~ .dropdown-input-clear {
color: $gray-700;
2016-06-02 11:05:42 +05:30
}
}
}
.dropdown-content {
2018-05-09 12:01:36 +05:30
max-height: 252px;
2017-08-17 22:00:37 +05:30
overflow-y: auto;
}
.dropdown-info-note {
color: $gl-text-color-secondary;
text-align: center;
2016-06-02 11:05:42 +05:30
}
.dropdown-footer {
padding-top: 10px;
margin-top: 10px;
font-size: 13px;
2019-02-15 15:39:39 +05:30
border-top: 1px solid $dropdown-divider-bg;
2016-06-02 11:05:42 +05:30
}
2018-03-17 18:26:18 +05:30
.dropdown-footer-content {
padding-left: 10px;
padding-right: 10px;
}
2016-06-02 11:05:42 +05:30
.dropdown-due-date-footer {
padding-top: 0;
margin-left: 10px;
margin-right: 10px;
border-top: 0;
}
.dropdown-footer-list {
font-size: 14px;
a {
2016-09-13 17:45:13 +05:30
cursor: pointer;
2016-06-02 11:05:42 +05:30
padding-left: 10px;
}
}
2018-03-17 18:26:18 +05:30
.dropdown-create-new-item-button {
@include dropdown-link;
width: 100%;
background-color: transparent;
border: 0;
text-align: left;
text-overflow: ellipsis;
}
2016-06-02 11:05:42 +05:30
.dropdown-loading {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: none;
z-index: 9;
background-color: $dropdown-loading-bg;
font-size: 28px;
.fa {
position: absolute;
top: 50%;
left: 50%;
margin-top: -14px;
margin-left: -14px;
}
}
.dropdown-label-box {
position: relative;
top: 3px;
margin-right: 5px;
display: inline-block;
width: 15px;
height: 15px;
border-radius: $border-radius-base;
}
2018-05-09 12:01:36 +05:30
.git-revision-dropdown {
.dropdown-content {
max-height: 215px;
}
}
.sidebar-move-issue-dropdown {
.dropdown-content {
max-height: 160px;
}
}
.dropdown-menu-author {
.dropdown-content {
max-height: 215px;
}
}
.dropdown-menu-labels {
.dropdown-content {
max-height: 128px;
}
}
2016-06-02 11:05:42 +05:30
.dropdown-menu-due-date {
.dropdown-content {
max-height: 230px;
}
2017-08-17 22:00:37 +05:30
.pika-single {
2017-09-10 17:25:29 +05:30
position: relative !important;
top: 0 !important;
2017-08-17 22:00:37 +05:30
border: 0;
box-shadow: none;
2016-06-02 11:05:42 +05:30
}
2017-08-17 22:00:37 +05:30
.pika-lendar {
margin-top: -5px;
margin-bottom: 0;
2016-06-02 11:05:42 +05:30
}
}
.dropdown-menu-inner-title {
display: block;
2017-08-17 22:00:37 +05:30
color: $gl-text-color;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
}
.dropdown-menu-inner-content {
display: block;
2017-08-17 22:00:37 +05:30
color: $gl-text-color-secondary;
}
2016-11-03 12:29:30 +05:30
.dropdown-toggle-text {
&.is-default {
2017-08-17 22:00:37 +05:30
color: $gl-text-color-secondary;
2016-11-03 12:29:30 +05:30
}
}
2017-08-17 22:00:37 +05:30
.pika-single.animate-picker.is-bound,
.pika-single.animate-picker.is-bound.is-hidden {
/*
* Having `!important` is not recommended but
* since `pikaday` sets positioning inline
* there's no way it can be gracefully overridden
* using config options.
*/
position: absolute !important;
display: block;
}
.pika-single.animate-picker.is-bound {
@include set-visible;
2018-03-17 18:26:18 +05:30
&.is-hidden {
@include set-invisible;
overflow: hidden;
}
2017-08-17 22:00:37 +05:30
}
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
2018-03-17 18:26:18 +05:30
.navbar-gitlab {
2019-02-15 15:39:39 +05:30
li.dropdown {
2018-03-17 18:26:18 +05:30
position: static;
2021-03-08 18:12:59 +05:30
&.user-counter {
margin-left: 8px !important;
> a {
padding: 0 4px !important;
}
}
2018-03-17 18:26:18 +05:30
}
}
header.navbar-gitlab .dropdown {
2021-01-03 14:25:43 +05:30
.dropdown-menu {
2018-03-17 18:26:18 +05:30
width: 100%;
min-width: 100%;
}
}
header.navbar-gitlab-new .header-content .dropdown {
.dropdown-menu {
left: 0;
min-width: 100%;
}
}
2017-08-17 22:00:37 +05:30
}
2017-09-10 17:25:29 +05:30
2018-11-08 19:23:39 +05:30
header.header-content .dropdown-menu.frequent-items-dropdown-menu {
2018-03-17 18:26:18 +05:30
padding: 0;
}
2018-11-08 19:23:39 +05:30
.frequent-items-dropdown-container {
2018-03-17 18:26:18 +05:30
display: flex;
flex-direction: row;
width: 500px;
2018-11-08 19:23:39 +05:30
height: 354px;
2018-03-17 18:26:18 +05:30
2018-11-08 19:23:39 +05:30
.frequent-items-dropdown-sidebar,
.frequent-items-dropdown-content {
2018-03-17 18:26:18 +05:30
padding: 8px 0;
}
.loading-animation {
color: $almost-black;
}
2018-11-08 19:23:39 +05:30
.frequent-items-dropdown-sidebar {
2018-03-17 18:26:18 +05:30
width: 30%;
border-right: 1px solid $border-color;
}
2018-11-08 19:23:39 +05:30
.frequent-items-dropdown-content {
2018-03-17 18:26:18 +05:30
position: relative;
width: 70%;
}
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
2018-03-17 18:26:18 +05:30
flex-direction: column;
width: 100%;
height: auto;
flex: 1;
2018-11-08 19:23:39 +05:30
.frequent-items-dropdown-sidebar,
.frequent-items-dropdown-content {
2018-03-17 18:26:18 +05:30
width: 100%;
2017-09-10 17:25:29 +05:30
}
2018-11-08 19:23:39 +05:30
.frequent-items-dropdown-sidebar {
2018-03-17 18:26:18 +05:30
border-bottom: 1px solid $border-color;
border-right: 0;
}
}
2017-09-10 17:25:29 +05:30
2018-11-08 19:23:39 +05:30
.section-header,
.frequent-items-list-container li.section-empty {
padding: 0 $gl-padding;
color: $gl-text-color-secondary;
font-size: $gl-font-size;
}
.frequent-items-list-container {
height: 304px;
2018-03-17 18:26:18 +05:30
padding: 8px 0;
overflow-y: auto;
2018-10-15 14:42:47 +05:30
li.section-empty.section-failure {
2018-11-20 20:47:30 +05:30
color: $red-700;
2018-10-15 14:42:47 +05:30
}
2017-09-10 17:25:29 +05:30
2018-11-08 19:23:39 +05:30
.frequent-items-list-item-container a {
display: flex;
}
2018-03-17 18:26:18 +05:30
}
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
.search-input-container {
position: relative;
padding: 4px $gl-padding;
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
.search-icon {
position: absolute;
top: 13px;
right: 25px;
2021-03-11 19:13:27 +05:30
color: $gray-300;
2017-09-10 17:25:29 +05:30
}
2018-03-17 18:26:18 +05:30
}
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
.section-header {
font-weight: 700;
margin-top: 8px;
}
2017-09-10 17:25:29 +05:30
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
.frequent-items-list-container {
2018-03-17 18:26:18 +05:30
width: auto;
height: auto;
padding-bottom: 0;
}
}
}
2018-11-08 19:23:39 +05:30
.frequent-items-list-item-container {
.frequent-items-item-avatar-container,
.frequent-items-item-metadata-container {
2018-03-17 18:26:18 +05:30
float: left;
}
2018-11-08 19:23:39 +05:30
.frequent-items-item-metadata-container {
display: flex;
flex-direction: column;
justify-content: center;
}
.frequent-items-item-title,
.frequent-items-item-namespace {
2018-03-17 18:26:18 +05:30
max-width: 250px;
text-overflow: ellipsis;
white-space: nowrap;
}
&:hover {
2018-11-08 19:23:39 +05:30
.frequent-items-item-avatar-container .avatar {
2020-06-23 00:09:42 +05:30
border-color: $gray-50;
2017-09-10 17:25:29 +05:30
}
}
2018-11-08 19:23:39 +05:30
.frequent-items-item-title {
2018-03-17 18:26:18 +05:30
font-size: $gl-font-size;
font-weight: 400;
line-height: 16px;
}
2018-11-08 19:23:39 +05:30
.frequent-items-item-namespace {
2018-03-17 18:26:18 +05:30
margin-top: 4px;
font-size: 12px;
line-height: 12px;
color: $gl-text-color-secondary;
}
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
.frequent-items-item-metadata-container {
2018-03-17 18:26:18 +05:30
float: none;
}
}
}
.dropdown-content-faded-mask {
position: relative;
.dropdown-list {
max-height: $dropdown-max-height;
overflow-y: auto;
position: relative;
}
&::after {
height: $dropdown-fade-mask-height;
width: 100%;
position: absolute;
bottom: 0;
2020-04-22 19:07:51 +05:30
background: linear-gradient(to top, $white 0, rgba($white, 0));
2018-03-17 18:26:18 +05:30
transition: opacity $fade-mask-transition-duration $fade-mask-transition-curve;
content: '';
pointer-events: none;
}
&.fade-out::after {
opacity: 0;
2017-09-10 17:25:29 +05:30
}
}
2020-04-08 14:13:33 +05:30
.labels-select-wrapper {
2020-05-24 23:13:21 +05:30
&.is-standalone {
2021-03-08 18:12:59 +05:30
min-width: $input-md-width;
2020-05-24 23:13:21 +05:30
.labels-select-dropdown-contents {
max-height: 350px;
.dropdown-content {
height: 250px;
}
}
}
2021-01-03 14:25:43 +05:30
li {
&:hover,
&.is-focused {
.label-item {
@include dropdown-item-hover;
text-decoration: none;
}
}
}
.labels-select-dropdown-button {
.gl-button-text {
width: 100%;
}
}
2020-04-08 14:13:33 +05:30
.labels-select-dropdown-contents {
min-height: $dropdown-min-height;
max-height: 330px;
2020-04-22 19:07:51 +05:30
background-color: $white;
2020-04-08 14:13:33 +05:30
border: 1px solid $border-color;
box-shadow: 0 2px 4px $dropdown-shadow-color;
z-index: 2;
.dropdown-content {
height: 135px;
}
}
.labels-fetch-loading {
top: 0;
left: 0;
opacity: 0.5;
2020-04-22 19:07:51 +05:30
background-color: $white;
2020-04-08 14:13:33 +05:30
z-index: 1;
}
.dropdown-header-button {
.gl-icon {
color: $dropdown-title-btn-color;
&:hover {
2020-11-24 15:15:51 +05:30
color: $gray-300;
2020-04-08 14:13:33 +05:30
}
}
}
.label-item {
padding: 8px 20px;
}
.color-input-container {
.dropdown-label-color-preview {
2020-07-28 23:09:34 +05:30
border: 1px solid $gray-100;
2020-04-08 14:13:33 +05:30
border-right: 0;
2020-07-28 23:09:34 +05:30
&[style] {
border-color: transparent;
}
}
}
}
.bulk-update {
.dropdown-toggle-text {
&.is-default {
color: $gl-text-color;
2020-04-08 14:13:33 +05:30
}
}
}
2020-11-24 15:15:51 +05:30
// This class won't be needed once we can directly add utility classes to the child
// https://github.com/bootstrap-vue/bootstrap-vue/issues/5669
.gl-dropdown-text-py-0 {
.b-dropdown-text {
padding-top: 0;
padding-bottom: 0;
}
}
// This class won't be needed once we can directly add utility classes to the child
// https://github.com/bootstrap-vue/bootstrap-vue/issues/5669
.gl-dropdown-text-block {
.b-dropdown-text {
display: block;
}
}
// This class won't be needed once we can add a prop for this in the GitLab UI component
// https://gitlab.com/gitlab-org/gitlab-ui/-/issues/966
.gl-new-dropdown {
.gl-dropdown-menu-wide {
width: $gl-dropdown-width-wide;
}
}
2021-04-17 20:07:23 +05:30
// This class won't be needed once we can add a prop for this in the GitLab UI component
// https://gitlab.com/gitlab-org/gitlab-ui/-/issues/966
.gl-new-dropdown.gl-dropdown-menu-full-width {
.dropdown-menu {
width: 100%;
}
}