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

671 lines
11 KiB
SCSS
Raw Normal View History

2023-03-04 22:38:38 +05:30
$search-input-field-min-width: 320px;
$search-input-field-max-width: 640px;
$search-input-field-x-min-width: 200px;
2018-03-17 18:26:18 +05:30
.navbar-gitlab {
2018-05-09 12:01:36 +05:30
padding: 0 16px;
2020-04-22 19:07:51 +05:30
z-index: $header-zindex;
2018-05-09 12:01:36 +05:30
margin-bottom: 0;
min-height: $header-height;
border: 0;
position: fixed;
top: 0;
left: 0;
right: 0;
border-radius: 0;
2018-03-17 18:26:18 +05:30
.close-icon {
display: none;
}
.header-content {
2018-11-08 19:23:39 +05:30
width: 100%;
2018-03-17 18:26:18 +05:30
display: flex;
justify-content: space-between;
position: relative;
min-height: $header-height;
padding-left: 0;
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
.title {
padding-right: 0;
color: currentColor;
display: flex;
position: relative;
margin: 0;
font-size: 18px;
vertical-align: top;
white-space: nowrap;
img {
2022-06-21 17:19:12 +05:30
height: 24px;
2018-03-17 18:26:18 +05:30
+ .logo-text {
margin-left: 8px;
}
2016-06-02 11:05:42 +05:30
}
2015-09-11 14:41:01 +05:30
2018-03-17 18:26:18 +05:30
&.wrap {
white-space: normal;
}
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
&.initializing {
opacity: 0;
}
2022-10-11 01:57:18 +05:30
a:not(.canary-badge) {
2018-03-17 18:26:18 +05:30
display: flex;
align-items: center;
padding: 2px 8px;
2022-07-23 23:45:48 +05:30
margin: 4px 2px 4px -8px;
2018-03-17 18:26:18 +05:30
border-radius: $border-radius-default;
2022-07-23 23:45:48 +05:30
&:active,
&:focus {
@include gl-focus($focus-ring: $focus-ring-dark);
}
2018-03-17 18:26:18 +05:30
}
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
.project-item-select {
right: auto;
left: 0;
}
2017-08-17 22:00:37 +05:30
}
2018-03-17 18:26:18 +05:30
.dropdown.open {
> a {
2020-04-22 19:07:51 +05:30
border-bottom-color: $white;
2018-03-17 18:26:18 +05:30
}
}
2016-06-02 11:05:42 +05:30
2019-02-15 15:39:39 +05:30
.navbar-collapse > ul.nav > li:not(.d-none) {
margin: 0 2px;
}
2023-03-04 22:38:38 +05:30
.header-search-new {
max-width: $search-input-field-max-width;
}
&.header-search-is-active {
.global-search-container {
flex-grow: 1;
}
}
}
.header-search {
min-width: $search-input-field-min-width;
// This is a temporary workaround!
// the button in GitLab UI Search components need to be updated to not be the small size
// see in Figma: https://www.figma.com/file/qEddyqCrI7kPSBjGmwkZzQ/Component-library?node-id=43905%3A45540
.gl-search-box-by-type-clear.btn-sm {
padding: 0.5rem !important;
}
@include media-breakpoint-between(md, lg) {
min-width: $search-input-field-x-min-width;
}
&.is-searching {
.in-search-scope-help {
position: absolute;
top: $gl-spacing-scale-2;
right: 2.125rem;
z-index: 2;
}
}
&.is-not-focused {
.gl-search-box-by-type-clear {
display: none;
}
}
.keyboard-shortcut-helper {
transform: translateY(calc(50% - 2px));
box-shadow: none;
border-color: transparent;
}
}
.header-search-dropdown-menu {
max-height: $dropdown-max-height;
top: 100%;
2018-03-17 18:26:18 +05:30
}
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
.navbar-collapse {
flex: 0 0 auto;
border-top: 0;
padding: 0;
2016-11-03 12:29:30 +05:30
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
2018-03-17 18:26:18 +05:30
flex: 1 1 auto;
}
2016-08-24 12:49:21 +05:30
2018-03-17 18:26:18 +05:30
.nav {
2018-11-08 19:23:39 +05:30
flex-wrap: nowrap;
> li:not(.d-none) a {
@include media-breakpoint-down(xs) {
2018-03-17 18:26:18 +05:30
margin-left: 0;
}
}
2017-08-17 22:00:37 +05:30
}
2018-03-17 18:26:18 +05:30
}
2018-03-17 18:26:18 +05:30
.container-fluid {
2018-05-09 12:01:36 +05:30
padding: 0;
.user-counter {
svg {
margin-right: 3px;
}
}
2018-11-08 19:23:39 +05:30
.navbar-toggler {
position: relative;
2018-05-09 12:01:36 +05:30
right: -10px;
border-radius: 0;
min-width: 45px;
padding: 0;
2022-07-16 23:28:13 +05:30
margin: $gl-padding-8 $gl-padding-8 $gl-padding-8 0;
2018-05-09 12:01:36 +05:30
font-size: 14px;
text-align: center;
color: currentColor;
&:hover,
&:focus,
&.active {
color: currentColor;
background-color: transparent;
}
}
2016-11-03 12:29:30 +05:30
2018-03-17 18:26:18 +05:30
.navbar-nav {
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
2018-03-17 18:26:18 +05:30
display: flex;
padding-right: 10px;
2018-11-08 19:23:39 +05:30
flex-direction: row;
2018-03-17 18:26:18 +05:30
}
li {
2022-04-04 11:22:00 +05:30
.badge.badge-pill:not(.gl-badge) {
2018-03-17 18:26:18 +05:30
box-shadow: none;
font-weight: $gl-font-weight-bold;
2016-11-03 12:29:30 +05:30
}
}
}
2018-03-17 18:26:18 +05:30
.nav > li {
&.header-user {
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
2018-03-17 18:26:18 +05:30
padding-left: 10px;
}
}
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
> a {
will-change: color;
2019-02-15 15:39:39 +05:30
margin: 4px 0;
2018-03-17 18:26:18 +05:30
padding: 6px 8px;
height: 32px;
2015-09-11 14:41:01 +05:30
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
2018-03-17 18:26:18 +05:30
padding: 0;
}
2016-09-29 09:46:39 +05:30
2018-03-17 18:26:18 +05:30
&.header-user-dropdown-toggle {
margin-left: 2px;
2018-03-17 18:26:18 +05:30
.header-user-avatar {
margin-right: 0;
}
}
2015-09-11 14:41:01 +05:30
}
2016-04-02 18:10:28 +05:30
2018-03-17 18:26:18 +05:30
.header-new-dropdown-toggle {
margin-right: 0;
}
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
.impersonated-user,
.impersonated-user:hover {
margin-right: 1px;
2020-04-22 19:07:51 +05:30
background-color: $white;
2018-03-17 18:26:18 +05:30
border-top-right-radius: 0;
border-bottom-right-radius: 0;
2016-04-02 18:10:28 +05:30
}
2018-03-17 18:26:18 +05:30
.impersonation-btn,
.impersonation-btn:hover {
2020-04-22 19:07:51 +05:30
background-color: $white;
2018-03-17 18:26:18 +05:30
border-top-left-radius: 0;
border-bottom-left-radius: 0;
2020-11-24 15:15:51 +05:30
svg {
2018-03-17 18:26:18 +05:30
color: $orange-500;
}
2016-04-02 18:10:28 +05:30
}
2015-09-11 14:41:01 +05:30
}
2018-03-17 18:26:18 +05:30
}
}
2015-09-11 14:41:01 +05:30
2018-03-17 18:26:18 +05:30
.navbar-sub-nav,
.navbar-nav {
> li {
2018-11-08 19:23:39 +05:30
> a,
> button {
2018-03-17 18:26:18 +05:30
display: flex;
align-items: center;
justify-content: center;
padding: 6px 8px;
margin: 4px 2px;
font-size: 12px;
color: currentColor;
border-radius: $border-radius-default;
height: 32px;
font-weight: $gl-font-weight-bold;
2018-11-08 19:23:39 +05:30
&:hover,
&:focus {
text-decoration: none;
outline: 0;
2020-04-22 19:07:51 +05:30
color: $white;
2018-11-08 19:23:39 +05:30
}
2022-07-23 23:45:48 +05:30
&:active,
&:focus {
@include gl-focus($focus-ring: $focus-ring-dark);
}
2018-11-08 19:23:39 +05:30
}
2021-06-08 01:23:25 +05:30
.top-nav-toggle,
2018-11-08 19:23:39 +05:30
> button {
background: transparent;
border: 0;
2015-09-11 14:41:01 +05:30
}
2018-03-17 18:26:18 +05:30
&.line-separator {
margin: 8px;
}
}
2018-11-08 19:23:39 +05:30
.dropdown-menu {
position: absolute;
}
2018-03-17 18:26:18 +05:30
}
.navbar-sub-nav {
display: flex;
2022-07-23 23:45:48 +05:30
align-items: center;
height: 100%;
2018-03-17 18:26:18 +05:30
margin: 0 0 0 6px;
.dropdown-chevron {
position: relative;
top: -1px;
font-size: 10px;
2015-09-11 14:41:01 +05:30
}
2018-11-08 19:23:39 +05:30
.frequent-items-item-select-holder {
2016-06-02 11:05:42 +05:30
display: inline;
2015-09-11 14:41:01 +05:30
}
2015-11-26 14:37:03 +05:30
.impersonation i {
2017-08-17 22:00:37 +05:30
color: $red-500;
}
}
2019-07-07 11:18:12 +05:30
.caret-down,
.btn .caret-down {
top: 0;
2018-03-17 18:26:18 +05:30
height: 11px;
width: 11px;
margin-left: 4px;
fill: currentColor;
}
2018-11-08 19:23:39 +05:30
.header-user .dropdown-menu,
.header-new .dropdown-menu {
2018-03-17 18:26:18 +05:30
margin-top: $dropdown-vertical-offset;
}
.breadcrumbs {
display: flex;
2018-05-09 12:01:36 +05:30
min-height: $breadcrumb-min-height;
2018-03-17 18:26:18 +05:30
color: $gl-text-color;
}
.breadcrumbs-container {
display: flex;
width: 100%;
position: relative;
padding-top: $gl-padding / 2;
padding-bottom: $gl-padding / 2;
align-items: center;
border-bottom: 1px solid $border-color;
}
.breadcrumbs-links {
flex: 1;
min-width: 0;
align-self: center;
color: $gl-text-color-secondary;
.avatar-tile {
margin-right: 4px;
border: 1px solid $border-color;
border-radius: 50%;
vertical-align: sub;
}
.text-expander {
margin-left: 0;
margin-right: 2px;
> i {
position: relative;
top: 1px;
}
}
2019-02-15 15:39:39 +05:30
.dropdown-menu li a .identicon {
width: 17px;
height: 17px;
font-size: $gl-font-size-xs;
vertical-align: middle;
text-indent: 0;
line-height: $gl-font-size-xs + 2px;
display: inline-block;
}
2018-03-17 18:26:18 +05:30
}
.breadcrumbs-list {
display: flex;
margin-bottom: 0;
line-height: 16px;
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
2018-03-17 18:26:18 +05:30
flex-wrap: wrap;
}
> li {
display: flex;
align-items: center;
position: relative;
padding: 2px 0;
&:not(:last-child) {
padding-right: 20px;
&:not(.dropdown) {
overflow: hidden;
}
}
2022-07-16 23:28:13 +05:30
&:last-child {
> a {
font-weight: 600;
line-height: 16px;
color: $gl-text-color;
}
}
2018-03-17 18:26:18 +05:30
> a {
font-size: 12px;
color: currentColor;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 0 1 auto;
}
2021-02-22 17:27:13 +05:30
&:last-of-type > .breadcrumbs-list-angle {
display: none;
}
2018-03-17 18:26:18 +05:30
}
}
.breadcrumb-item-text {
text-decoration: inherit;
2018-11-08 19:23:39 +05:30
@include media-breakpoint-down(xs) {
2018-03-17 18:26:18 +05:30
@include str-truncated(128px);
}
}
.breadcrumbs-list-angle {
position: absolute;
right: 7px;
top: 50%;
color: $gl-text-color-tertiary;
transform: translateY(-50%);
}
.breadcrumbs-extra {
display: flex;
flex: 0 0 auto;
margin-left: auto;
}
.btn-sign-in {
2018-11-08 19:23:39 +05:30
background-color: $indigo-100;
color: $indigo-900;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2018-11-08 19:23:39 +05:30
line-height: 18px;
2019-02-15 15:39:39 +05:30
margin: 4px 0 4px 2px;
2018-03-17 18:26:18 +05:30
&:hover {
2020-04-22 19:07:51 +05:30
background-color: $white;
2018-03-17 18:26:18 +05:30
}
2017-09-10 17:25:29 +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 .container-fluid {
2015-09-11 14:41:01 +05:30
font-size: 18px;
.navbar-nav {
2017-08-17 22:00:37 +05:30
table-layout: fixed;
width: 100%;
2016-06-02 11:05:42 +05:30
margin: 0;
2017-08-17 22:00:37 +05:30
text-align: right;
2015-09-11 14:41:01 +05:30
}
.navbar-collapse {
2018-03-17 18:26:18 +05:30
margin-left: -8px;
margin-right: -10px;
2015-09-11 14:41:01 +05:30
2018-11-08 19:23:39 +05:30
.nav > li:not(.d-none) {
2019-02-15 15:39:39 +05:30
flex: 1;
2015-09-11 14:41:01 +05:30
}
}
}
2017-08-17 22:00:37 +05:30
.header-user-dropdown-toggle {
text-align: center;
}
.header-user-avatar {
float: none;
}
2015-09-11 14:41:01 +05:30
}
2016-08-24 12:49:21 +05:30
.header-user {
2018-12-05 23:21:45 +05:30
&.show .dropdown-menu {
2018-03-17 18:26:18 +05:30
margin-top: 4px;
2021-04-29 21:17:54 +05:30
color: var(--gl-text-color, $gl-text-color);
2017-09-10 17:25:29 +05:30
left: auto;
2019-12-21 20:55:43 +05:30
max-height: $dropdown-max-height-lg;
2017-08-17 22:00:37 +05:30
2021-03-11 19:13:27 +05:30
.user-status {
max-width: 240px;
2017-08-17 22:00:37 +05:30
}
2018-11-08 19:23:39 +05:30
svg {
vertical-align: text-top;
}
2020-01-01 13:55:28 +05:30
2020-04-22 19:07:51 +05:30
a.ci-minutes-emoji gl-emoji,
2020-01-01 13:55:28 +05:30
a.trial-link gl-emoji {
font-size: $gl-font-size;
vertical-align: baseline;
}
2016-08-24 12:49:21 +05:30
}
}
.header-user-avatar {
float: left;
margin-right: 5px;
border-radius: 50%;
2018-11-20 20:47:30 +05:30
border: 1px solid $gray-normal;
2016-08-24 12:49:21 +05:30
}
2018-03-17 18:26:18 +05:30
2021-02-22 17:27:13 +05:30
.notification-dot {
2020-07-28 23:09:34 +05:30
background-color: $orange-300;
height: 12px;
width: 12px;
2021-02-22 17:27:13 +05:30
pointer-events: none;
visibility: hidden;
2022-01-26 12:08:38 +05:30
top: 3px;
2021-02-22 17:27:13 +05:30
}
.with-notifications .notification-dot {
visibility: visible;
2020-04-22 19:07:51 +05:30
}
2021-09-30 23:02:18 +05:30
.with-performance-bar .navbar-gitlab,
.with-performance-bar .fixed-top {
2018-03-17 18:26:18 +05:30
top: $performance-bar-height;
}
.navbar-empty {
2019-07-07 11:18:12 +05:30
justify-content: center;
2018-03-17 18:26:18 +05:30
height: $header-height;
2020-04-22 19:07:51 +05:30
background: $white;
2021-09-30 23:02:18 +05:30
border-bottom: 1px solid $gray-100;
2018-03-17 18:26:18 +05:30
2019-07-07 11:18:12 +05:30
.tanuki-logo,
.brand-header-logo {
max-height: 100%;
2018-03-17 18:26:18 +05:30
}
}
2018-12-05 23:21:45 +05:30
.set-user-status-modal {
.modal-body {
min-height: unset;
}
.input-lg {
max-width: unset;
}
2022-08-13 15:12:31 +05:30
.no-emoji-placeholder {
2018-12-05 23:21:45 +05:30
svg {
2021-04-29 21:17:54 +05:30
fill: var(--gray-500, $gray-500);
2018-12-05 23:21:45 +05:30
}
}
.emoji-menu-toggle-button {
@include emoji-menu-toggle-button;
2019-07-31 22:56:46 +05:30
padding: $gl-vert-padding $gl-btn-padding;
2018-12-05 23:21:45 +05:30
}
2019-03-02 22:35:43 +05:30
.input-group {
2019-07-31 22:56:46 +05:30
&,
.input-group-prepend,
.input-group-append {
height: $input-height;
}
2019-03-02 22:35:43 +05:30
}
2018-12-05 23:21:45 +05:30
}
2019-02-15 15:39:39 +05:30
.nav-links > li > a {
.badge.badge-pill {
@include media-breakpoint-down(xs) { display: none; }
}
@include media-breakpoint-down(xs) { margin-right: 3px; }
}
2021-06-08 01:23:25 +05:30
.toggle-mobile-nav {
display: none;
background-color: transparent;
border: 0;
padding: 6px 16px;
margin: 0 0 0 -15px;
height: 46px;
color: $gl-text-color;
@include media-breakpoint-down(sm) {
display: flex;
align-items: center;
i {
font-size: 18px;
}
+ .breadcrumbs-links {
padding-left: $gl-padding;
border-left: 1px solid $gl-text-color-quaternary;
}
}
}
.top-nav-container-view {
2023-03-04 22:38:38 +05:30
.gl-dropdown & .gl-search-box-by-type {
2021-06-08 01:23:25 +05:30
@include gl-m-0;
}
.frequent-items-list-item-container > a:hover {
2022-10-11 01:57:18 +05:30
background-color: $nav-active-bg !important;
2021-06-08 01:23:25 +05:30
}
}
.top-nav-toggle {
.dropdown-chevron {
top: 0;
}
}
.top-nav-menu-item {
&.active,
&:hover {
2022-10-11 01:57:18 +05:30
background-color: $nav-active-bg !important;
2021-06-08 01:23:25 +05:30
}
.gl-icon {
color: inherit !important;
}
}
2021-09-04 01:27:46 +05:30
.top-nav-responsive {
@include gl-display-none;
}
.top-nav-responsive-open {
2021-10-27 15:23:28 +05:30
.more-icon {
display: none;
}
.close-icon {
display: block;
margin: auto;
}
@include media-breakpoint-down(xs) {
.navbar-collapse {
display: flex;
}
.hide-when-top-nav-responsive-open {
2021-09-04 01:27:46 +05:30
display: none !important;
}
2021-10-27 15:23:28 +05:30
.top-nav-responsive {
2021-09-04 01:27:46 +05:30
@include gl-display-block;
}
2021-10-27 15:23:28 +05:30
.navbar-gitlab .header-content .title-container {
flex: 0;
}
2021-09-04 01:27:46 +05:30
}
}