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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

332 lines
6.5 KiB
SCSS
Raw Normal View History

2023-05-27 22:25:52 +05:30
@mixin active-toggle {
background-color: $gray-50 !important;
mix-blend-mode: multiply;
.gl-dark & {
mix-blend-mode: screen;
}
}
2023-07-09 08:55:56 +05:30
$super-sidebar-transition-duration: $gl-transition-duration-medium;
$super-sidebar-transition-hint-duration: $super-sidebar-transition-duration / 4;
2023-05-27 22:25:52 +05:30
@mixin notification-dot($color, $size, $top, $left) {
background-color: $color;
border: 2px solid $gray-10; // Same as the sidebar's background color.
position: absolute;
height: $size;
width: $size;
top: $top;
left: $left;
border-radius: 50%;
transition: background-color 100ms linear, border-color 100ms linear;
}
2023-07-09 08:55:56 +05:30
.super-sidebar-skip-to {
top: calc(#{$header-height} + #{$calc-application-bars-height});
width: calc(#{$super-sidebar-width} - #{$gl-spacing-scale-5});
z-index: $super-sidebar-skip-to-z-index;
}
2023-03-17 16:20:25 +05:30
.super-sidebar {
2023-05-27 22:25:52 +05:30
display: flex;
flex-direction: column;
position: fixed;
2023-06-20 00:43:36 +05:30
top: calc(#{$header-height} + #{$calc-application-bars-height});
bottom: $calc-application-footer-height;
2023-05-27 22:25:52 +05:30
left: 0;
background-color: var(--gray-10, $gray-10);
border-right: 1px solid $t-gray-a-08;
transform: translate3d(0, 0, 0);
width: $super-sidebar-width;
z-index: $super-sidebar-z-index;
&.super-sidebar-loading {
transform: translate3d(-100%, 0, 0);
2023-07-09 08:55:56 +05:30
transition: none;
2023-05-27 22:25:52 +05:30
@include media-breakpoint-up(xl) {
transform: translate3d(0, 0, 0);
}
}
2023-07-09 08:55:56 +05:30
@media (prefers-reduced-motion: no-preference) {
transition: transform $super-sidebar-transition-duration;
2023-05-27 22:25:52 +05:30
}
2023-03-17 16:20:25 +05:30
.user-bar {
background-color: $t-gray-a-04;
.tanuki-logo {
@include gl-vertical-align-middle;
}
2023-05-27 22:25:52 +05:30
2023-07-09 08:55:56 +05:30
.user-bar-item,
.tanuki-logo-container {
2023-05-27 22:25:52 +05:30
@include gl-rounded-base;
@include gl-p-2;
@include gl-bg-transparent;
@include gl-border-none;
2023-07-09 08:55:56 +05:30
&:focus,
&:active {
@include gl-focus;
}
}
.user-bar-item {
2023-05-27 22:25:52 +05:30
&:hover,
&:focus,
&:active {
@include active-toggle;
}
2023-07-09 08:55:56 +05:30
}
2023-05-27 22:25:52 +05:30
2023-07-09 08:55:56 +05:30
$light-mode-btn-bg: #e0dfe5;
$dark-mode-btn-bg: #53515b;
.tanuki-logo-container {
&:hover,
2023-05-27 22:25:52 +05:30
&:focus,
&:active {
2023-07-09 08:55:56 +05:30
background-color: $light-mode-btn-bg;
.gl-dark & {
background-color: $dark-mode-btn-bg;
}
2023-05-27 22:25:52 +05:30
}
}
2023-03-17 16:20:25 +05:30
}
2023-06-20 00:43:36 +05:30
.counter .gl-icon,
.item-icon {
color: var(--gray-600, $gray-500);
2023-04-23 21:23:45 +05:30
}
.counter:hover,
.counter:focus,
2023-05-27 22:25:52 +05:30
.counter[aria-expanded='true'] {
2023-04-23 21:23:45 +05:30
background-color: $gray-50;
border-color: transparent;
mix-blend-mode: multiply;
2023-05-27 22:25:52 +05:30
.gl-dark & {
mix-blend-mode: screen;
}
2023-04-23 21:23:45 +05:30
.gl-icon {
color: var(--gray-700, $gray-700);
}
}
2023-07-09 08:55:56 +05:30
.counter:hover,
.counter[aria-expanded='true'] {
box-shadow: none;
}
.context-switcher .gl-new-dropdown-custom-toggle {
width: 100%;
}
.context-switcher .gl-new-dropdown-panel {
overflow-y: auto;
}
2023-05-27 22:25:52 +05:30
.context-switcher-search-box input {
@include gl-font-sm;
}
2023-07-09 08:55:56 +05:30
.gl-new-dropdown-custom-toggle .context-switcher-toggle {
2023-03-17 16:20:25 +05:30
&[aria-expanded='true'] {
background-color: $t-gray-a-08;
}
2023-06-20 00:43:36 +05:30
&:focus {
@include gl-focus($inset: true); }
2023-03-17 16:20:25 +05:30
}
2023-04-23 21:23:45 +05:30
.btn-with-notification {
position: relative;
2023-05-27 22:25:52 +05:30
.notification-dot-info {
@include notification-dot($blue-500, 9px, 5px, 22px);
}
.notification-dot-warning {
@include notification-dot($orange-300, 12px, 1px, 19px);
2023-04-23 21:23:45 +05:30
}
&:hover,
&:focus {
.notification {
border-color: $gray-50; // Same as the button's hover background color.
}
}
}
2023-05-27 22:25:52 +05:30
.gl-new-dropdown-toggle[aria-expanded='true'] {
@include active-toggle;
}
.gl-new-dropdown-custom-toggle {
.btn-with-notification {
mix-blend-mode: unset; // Our tertiary buttons otherwise use another mix-blend mode, making border-color semi-transparent.
}
[aria-expanded='true'] {
@include active-toggle;
}
}
2023-06-20 00:43:36 +05:30
.nav-item-link {
button,
.draggable-icon {
opacity: 0;
}
.draggable-icon {
cursor: grab;
}
&:hover {
button,
.draggable-icon {
opacity: 1;
}
}
2023-07-09 08:55:56 +05:30
&:hover,
&:focus-within {
.nav-item-badge {
opacity: 0;
}
}
2023-06-20 00:43:36 +05:30
&:focus button,
button:focus {
opacity: 1;
}
}
2023-05-27 22:25:52 +05:30
2023-07-09 08:55:56 +05:30
#trial-status-sidebar-widget:hover {
text-decoration: none;
@include gl-text-contrast-light;
}
2023-05-27 22:25:52 +05:30
}
.super-sidebar-overlay {
display: none;
}
2023-07-09 08:55:56 +05:30
.super-sidebar-peek,
.super-sidebar-peek-hint {
2023-06-20 00:43:36 +05:30
@include gl-shadow;
border-right: 0;
2023-07-09 08:55:56 +05:30
}
2023-06-20 00:43:36 +05:30
2023-07-09 08:55:56 +05:30
.super-sidebar-peek-hint {
2023-06-20 00:43:36 +05:30
@media (prefers-reduced-motion: no-preference) {
2023-07-09 08:55:56 +05:30
transition: transform $super-sidebar-transition-hint-duration ease-out;
2023-06-20 00:43:36 +05:30
}
}
2023-05-27 22:25:52 +05:30
.page-with-super-sidebar {
padding-left: 0;
2023-06-20 00:43:36 +05:30
@media (prefers-reduced-motion: no-preference) {
2023-07-09 08:55:56 +05:30
transition: padding-left $super-sidebar-transition-duration;
2023-06-20 00:43:36 +05:30
}
2023-05-27 22:25:52 +05:30
&:not(.page-with-super-sidebar-collapsed) {
.super-sidebar-overlay {
display: block;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: $black-transparent;
z-index: $super-sidebar-z-index - 1;
@include media-breakpoint-up(md) {
display: none;
}
}
}
@include media-breakpoint-up(xl) {
padding-left: $super-sidebar-width;
.super-sidebar-toggle {
display: none;
}
}
}
.page-with-super-sidebar-collapsed {
.super-sidebar {
transform: translate3d(-100%, 0, 0);
2023-06-20 00:43:36 +05:30
&.super-sidebar-peek {
transform: translate3d(0, 0, 0);
}
2023-07-09 08:55:56 +05:30
&.super-sidebar-peek-hint {
transform: translate3d(calc(#{$gl-spacing-scale-3} - 100%), 0, 0);
}
2023-05-27 22:25:52 +05:30
}
@include media-breakpoint-up(xl) {
padding-left: 0;
.super-sidebar-toggle {
display: block;
}
}
}
.gl-dark {
.super-sidebar {
.gl-new-dropdown-custom-toggle {
.btn-with-notification.btn-with-notification {
mix-blend-mode: unset;
}
}
}
}
2023-06-20 00:43:36 +05:30
.global-search-modal {
padding: 3rem 0.5rem 0;
&.gl-modal .modal-dialog {
align-items: flex-start;
}
@include gl-media-breakpoint-up(sm) {
padding: 5rem 1rem 0;
}
// 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;
}
.is-searching {
.in-search-scope-help {
position: absolute;
top: 0.625rem;
right: 2.5rem;
}
}
.gl-search-box-by-type-input-borderless {
@include gl-rounded-base;
}
.global-search-results {
max-height: 30rem;
}
}