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

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

907 lines
16 KiB
SCSS
Raw Normal View History

2015-09-11 14:41:01 +05:30
.content-wrapper {
width: 100%;
2015-09-25 12:07:36 +05:30
.container-fluid {
padding: 0 $gl-padding;
2015-09-25 12:07:36 +05:30
&.container-blank {
background: none;
padding: 0;
2018-03-17 18:26:18 +05:30
border: 0;
2015-09-25 12:07:36 +05:30
}
}
2015-09-11 14:41:01 +05:30
}
2020-10-24 23:57:45 +05:30
.page-initialised .content-wrapper {
2022-08-27 11:52:29 +05:30
transition: padding $gl-transition-duration-medium;
2020-10-24 23:57:45 +05:30
}
2016-06-02 11:05:42 +05:30
.right-sidebar-collapsed {
padding-right: 0;
2022-07-16 23:28:13 +05:30
&:not(.is-merge-request) {
@include media-breakpoint-up(sm) {
&:not(.wiki-sidebar):not(.build-sidebar):not(.issuable-bulk-update-sidebar) .content-wrapper {
padding-right: $gutter-collapsed-width;
}
2017-08-17 22:00:37 +05:30
}
2022-07-16 23:28:13 +05:30
}
2016-11-03 12:29:30 +05:30
2022-07-16 23:28:13 +05:30
&.is-merge-request {
2022-07-23 23:45:48 +05:30
@include media-breakpoint-up(lg) {
2022-07-16 23:28:13 +05:30
.content-wrapper {
padding-right: $gutter-collapsed-width;
}
2016-11-03 12:29:30 +05:30
}
2016-06-02 11:05:42 +05:30
}
.sidebar-collapsed-icon {
2016-08-24 12:49:21 +05:30
.btn {
background-color: $gray-light;
}
2018-03-17 18:26:18 +05:30
&:not(.disabled) {
cursor: pointer;
}
svg {
width: $gl-padding;
height: $gl-padding;
}
2016-06-02 11:05:42 +05:30
}
2015-09-11 14:41:01 +05:30
}
2016-06-02 11:05:42 +05:30
.right-sidebar-expanded {
padding-right: 0;
2021-03-11 19:13:27 +05:30
z-index: $zindex-dropdown-menu;
2016-06-02 11:05:42 +05:30
2022-07-16 23:28:13 +05:30
&.right-sidebar-merge-requests {
2022-07-23 23:45:48 +05:30
width: 300px;
2022-07-16 23:28:13 +05:30
@include media-breakpoint-up(md) {
z-index: auto;
}
.shortcut-sidebar-dropdown-toggle {
margin-right: 0 !important;
}
}
2018-11-08 19:23:39 +05:30
@include media-breakpoint-only(sm) {
2017-09-10 17:25:29 +05:30
&:not(.wiki-sidebar):not(.build-sidebar):not(.issuable-bulk-update-sidebar) .content-wrapper {
2018-11-18 11:00:15 +05:30
padding-right: $gutter-collapsed-width;
}
2016-06-02 11:05:42 +05:30
}
2022-07-23 23:45:48 +05:30
&:not(.is-merge-request) {
@include media-breakpoint-up(md) {
.content-wrapper {
padding-right: $gutter-width;
}
2017-08-17 22:00:37 +05:30
}
2016-06-02 11:05:42 +05:30
}
2015-09-11 14:41:01 +05:30
}
2016-09-13 17:45:13 +05:30
.right-sidebar {
2023-06-20 00:43:36 +05:30
border-left: 1px solid $gray-50;
2020-04-22 19:07:51 +05:30
2022-07-16 23:28:13 +05:30
&.right-sidebar-merge-requests {
2022-07-23 23:45:48 +05:30
@include media-breakpoint-up(lg) {
2022-07-16 23:28:13 +05:30
border-left: 0;
}
}
&:not(.right-sidebar-merge-requests) {
.sidebar-container,
.issuable-sidebar {
// Add 100px so that potentially visible vertical scroll bar is hidden
width: calc(100% + 100px);
}
2020-04-22 19:07:51 +05:30
}
2017-09-10 17:25:29 +05:30
}
@mixin maintain-sidebar-dimensions {
display: block;
width: $gutter-width;
}
.issues-bulk-update.right-sidebar {
@include maintain-sidebar-dimensions;
width: 0;
padding: 0;
2022-08-27 11:52:29 +05:30
transition: width $gl-transition-duration-medium;
2017-09-10 17:25:29 +05:30
&.right-sidebar-expanded {
@include maintain-sidebar-dimensions;
width: $gutter-width;
.issuable-sidebar-header {
// matches `.top-area .nav-controls` for issuable index pages
padding: 11px 0;
}
.block:last-of-type {
2018-03-17 18:26:18 +05:30
border: 0;
2017-09-10 17:25:29 +05:30
}
}
&.right-sidebar-collapsed {
@include maintain-sidebar-dimensions;
width: 0;
padding: 0;
.block {
padding: 16px 0;
width: 250px;
border-bottom: 1px solid $border-color;
}
2017-08-17 22:00:37 +05:30
}
2017-09-10 17:25:29 +05:30
.issuable-sidebar {
padding: 0 3px;
2017-08-17 22:00:37 +05:30
}
2023-05-27 22:25:52 +05:30
.block {
border-bottom: 0;
padding-top: 0;
}
2016-09-13 17:45:13 +05:30
}
2018-03-17 18:26:18 +05:30
2018-10-15 14:42:47 +05:30
.issuable-sidebar .labels {
.value.dont-hide ~ .selectbox {
padding-top: $gl-padding-8;
}
2020-11-24 15:15:51 +05:30
// This is for sidebar components using gl-button for the Edit button to be consistent with the
// rest of the sidebar, and could be removed once the sidebar has been fully converted to use
// gitlab-ui components.
.title .gl-button {
2022-07-16 23:28:13 +05:30
font-weight: $gl-font-weight-bold;
.gl-button {
color: $gl-text-color;
}
2020-11-24 15:15:51 +05:30
}
2018-10-15 14:42:47 +05:30
}
2018-03-17 18:26:18 +05:30
.pikaday-container {
.pika-single {
margin-top: 2px;
width: 250px;
}
.dropdown-menu-toggle {
line-height: 20px;
}
}
.sidebar-collapsed-icon .sidebar-collapsed-value {
font-size: 12px;
}
2019-07-07 11:18:12 +05:30
.ancestor-tree {
.vertical-timeline {
position: relative;
list-style: none;
margin: 0;
padding: 0;
&::before {
content: '';
2020-10-24 23:57:45 +05:30
border-left: 1px solid $gray-300;
2019-07-07 11:18:12 +05:30
position: absolute;
top: $gl-padding;
bottom: $gl-padding;
2019-12-21 20:55:43 +05:30
left: map-get($spacers, 2) - px-to-rem(1px);
2019-07-07 11:18:12 +05:30
}
&-row {
margin-top: map-get($spacers, 3);
&:nth-child(1) {
margin-top: 0;
}
}
2023-03-04 22:38:38 +05:30
$line-height: map-get($spacers, 4) + px-to-rem(2px);
2019-07-07 11:18:12 +05:30
&-icon {
/**
* 2px extra is to give a little more height than needed
* to hide timeline line before/after the element starts/ends
*/
2023-03-04 22:38:38 +05:30
height: $line-height;
2019-07-07 11:18:12 +05:30
z-index: 1;
position: relative;
padding: $gl-padding-4 0;
&.opened {
color: $green-500;
}
&.closed {
color: $blue-500;
}
}
&-content {
2023-03-04 22:38:38 +05:30
line-height: $line-height;
2019-07-07 11:18:12 +05:30
margin-left: $gl-padding-8;
}
}
}
2020-04-22 19:07:51 +05:30
.health-status {
.dropdown-body {
.health-divider {
2020-07-28 23:09:34 +05:30
border-top-color: $gray-100;
2020-04-22 19:07:51 +05:30
}
.dropdown-item:not(.health-dropdown-item) {
padding: 0;
}
}
}
2021-09-04 01:27:46 +05:30
.toggle-right-sidebar-button {
@include side-panel-toggle;
border-bottom: 1px solid $border-color;
}
2021-10-27 15:23:28 +05:30
.edit-link {
margin-right: -$gl-spacing-scale-2;
}
2022-06-21 17:19:12 +05:30
2022-07-16 23:28:13 +05:30
.issuable-sidebar.is-merge-request .edit-link {
margin-right: 0;
}
2022-06-21 17:19:12 +05:30
.assignee-grid {
grid-template-areas: ' attention user';
grid-template-columns: min-content 1fr;
}
.reviewer-grid {
grid-template-areas: ' user approval rerequest';
grid-template-columns: 1fr min-content min-content;
&.attention-requests {
grid-template-areas: ' attention user approval';
grid-template-columns: min-content 1fr min-content;
}
}
2023-06-20 00:43:36 +05:30
.merge-request-approved-icon {
animation: approval-animate 350ms ease-in;
}
@include keyframes(approval-animate) {
0% {
transform: scale(0);
}
75% {
transform: scale(1.4);
}
100% {
transform: scale(1);
}
}
2022-06-21 17:19:12 +05:30
.assignee-grid,
.reviewer-grid {
[data-css-area='attention'] {
grid-area: attention;
2022-07-23 23:45:48 +05:30
button.selected svg {
fill: $orange-500;
}
2022-06-21 17:19:12 +05:30
}
[data-css-area='user'] {
grid-area: user;
}
}
2023-03-04 22:38:38 +05:30
@mixin right-sidebar {
position: fixed;
2023-06-20 00:43:36 +05:30
top: calc(#{$header-height} + #{$calc-application-bars-height});
bottom: calc(#{$calc-application-footer-height} + var(--mr-review-bar-height));
2023-03-04 22:38:38 +05:30
right: 0;
transition: width $gl-transition-duration-medium;
background-color: $white;
z-index: 200;
overflow: hidden;
}
.right-sidebar {
&:not(.right-sidebar-merge-requests) {
@include right-sidebar;
2023-06-20 00:43:36 +05:30
@include media-breakpoint-down(sm) {
z-index: 251;
}
2023-03-04 22:38:38 +05:30
}
&.right-sidebar-merge-requests {
@include media-breakpoint-down(md) {
@include right-sidebar;
z-index: 251;
}
}
a:not(.btn) {
color: inherit;
&:hover {
color: $blue-800;
}
}
.gl-label .gl-label-link:hover {
color: inherit;
}
.btn-link {
color: inherit;
}
.issuable-header-text {
margin-top: 7px;
}
.gutter-toggle {
display: flex;
align-items: center;
margin-left: 20px;
padding: 4px;
border-radius: 4px;
height: 24px;
&:hover {
color: $gl-text-color;
background: $gray-50;
}
&:hover,
&:focus {
text-decoration: none;
}
}
&.right-sidebar-merge-requests {
.block,
.sidebar-contained-width,
.issuable-sidebar-header {
width: 100%;
}
.block {
@include media-breakpoint-up(lg) {
padding: $gl-spacing-scale-4 0 $gl-spacing-scale-5;
}
&.participants {
border-bottom: 0;
}
}
}
.block,
.sidebar-contained-width,
.issuable-sidebar-header {
@include clearfix;
padding: $gl-spacing-scale-4 0 $gl-spacing-scale-5;
border-bottom: 1px solid $border-gray-normal;
// This prevents the mess when resizing the sidebar
// of elements repositioning themselves..
width: $gutter-inner-width;
// --
&:last-child {
border: 0;
}
&.assignee {
.author-link {
display: block;
position: relative;
&:hover {
.author {
text-decoration: underline;
}
}
}
}
&.time-tracking,
&.participants,
&.subscriptions,
&.with-sub-blocks {
padding-top: $gl-spacing-scale-5;
}
}
.block-first {
padding-top: 0;
}
.title {
color: $gl-text-color;
line-height: $gl-line-height-20;
.avatar {
margin-left: 0;
}
}
.selectbox {
display: none;
&.show {
display: block;
}
}
.btn-clipboard:hover {
color: $gl-text-color;
}
.issuable-sidebar {
height: 100%;
&:not(.is-merge-request) {
overflow-y: scroll;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}
&.is-merge-request {
@include media-breakpoint-down(sm) {
overflow-y: scroll;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}
}
}
&.right-sidebar-expanded {
&:not(.right-sidebar-merge-requests) {
width: $gutter-width;
}
.value {
line-height: 1;
}
.issuable-sidebar {
padding: 0 20px;
&.is-merge-request {
@include media-breakpoint-up(lg) {
padding: 0;
.issuable-context-form {
2023-06-20 00:43:36 +05:30
$issue-sticky-header-height: 76px;
2023-03-04 22:38:38 +05:30
2023-06-20 00:43:36 +05:30
top: calc(#{$calc-application-header-height} + #{$issue-sticky-header-height});
height: calc(#{$calc-application-viewport-height} - #{$issue-sticky-header-height} - var(--mr-review-bar-height));
position: sticky;
overflow: auto;
2023-03-04 22:38:38 +05:30
padding: 0 15px;
2023-06-20 00:43:36 +05:30
margin-bottom: calc((#{$header-height} + $issue-sticky-header-height) * -1);
2023-03-04 22:38:38 +05:30
}
}
}
}
&:not(.boards-sidebar):not([data-signed-in]):not([data-always-show-toggle]) {
.issuable-sidebar-header {
display: none;
}
}
.light {
font-weight: $gl-font-weight-normal;
}
.no-value {
color: $gl-text-color-secondary;
}
.sidebar-collapsed-icon {
display: none;
}
.gutter-toggle {
text-align: center;
}
.title .gutter-toggle {
margin-top: 0;
}
.assignee .user-list .avatar {
margin: 0;
}
.hide-expanded {
display: none;
}
}
&.right-sidebar-collapsed {
/* Extra small devices (phones, less than 768px) */
display: none;
/* Small devices (tablets, 768px and up) */
&:not(.right-sidebar-merge-requests) {
@include media-breakpoint-up(sm) {
display: block;
}
}
&.right-sidebar-merge-requests {
@include media-breakpoint-up(lg) {
display: block;
}
}
width: $gutter-collapsed-width;
padding: 0;
.block,
.sidebar-contained-width,
.issuable-sidebar-header {
width: $gutter-collapsed-width - 2px;
padding: 0;
border-bottom: 0;
overflow: hidden;
}
.block,
.gutter-toggle,
.sidebar-collapsed-container {
&.with-sub-blocks .sub-block:hover,
&:not(.with-sub-blocks):hover {
background-color: $gray-100;
}
}
.participants {
border-bottom: 1px solid $border-gray-normal;
}
.hide-collapsed {
display: none;
}
.gutter-toggle {
width: 100%;
height: $sidebar-toggle-height;
margin-left: 0;
border-bottom: 1px solid $border-white-normal;
border-radius: 0;
}
a.gutter-toggle {
display: flex;
justify-content: center;
flex-direction: column;
text-align: center;
}
.merge-icon {
height: 12px;
width: 12px;
bottom: -5px;
right: 4px;
}
.sidebar-collapsed-icon {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: $sidebar-toggle-height;
text-align: center;
color: $gl-text-color-secondary;
> svg {
fill: $gl-text-color-secondary;
}
&:hover:not(.disabled),
&:hover .todo-undone {
color: $gl-text-color;
> svg {
fill: $gl-text-color;
}
}
.todo-undone {
color: $blue-600;
fill: $blue-600;
}
.author {
display: none;
}
.btn-clipboard {
/*
This change should be temporary, because the DOM currently gets
generated from a ruby definition in `app/helpers/button_helper.rb`.
As soon as the `copy to clipboard` button will be transferred to
Vue this should be adjusted as well.
*/
flex: 1;
align-self: stretch;
padding: 0;
border: 0;
background: transparent;
color: $gl-text-color-secondary;
&:hover {
color: $gl-text-color;
}
}
&.multiple-users {
display: flex;
justify-content: center;
}
}
.sidebar-avatar-counter {
width: 24px;
height: 24px;
border-radius: 12px;
~.merge-icon {
bottom: 0;
}
}
.sidebar-collapsed-user {
padding-bottom: 0;
.author-link {
padding-left: 0;
.avatar {
position: static;
margin: 0;
}
}
}
.issuable-header-btn {
display: none;
}
.multiple-users {
.btn-link {
padding: 0;
border: 0;
.avatar {
margin: 0;
}
}
.btn-link:first-child {
position: absolute;
left: 10px;
z-index: 1;
}
.btn-link:last-child {
position: absolute;
right: 10px;
&:hover {
text-decoration: none;
}
}
}
.milestone-title span,
.collapse-truncated-title {
@include str-truncated(100%);
display: block;
margin: 0 4px;
}
}
.dropdown-menu-toggle {
width: 100%;
padding-top: 6px;
}
.dropdown-menu {
width: 100%;
/*
* Overwrite hover style for dropdown items, so that they are not blue
* This should be removed during dev of https://gitlab.com/gitlab-org/gitlab-foss/issues/44040
*/
li a {
&:hover,
&:active,
&:focus,
&.is-focused {
@include dropdown-item-hover;
}
}
}
}
.issuable-show-labels {
.gl-label {
margin-bottom: 5px;
margin-right: 5px;
}
a {
display: inline-block;
.color-label {
padding: 4px $grid-size;
border-radius: $label-border-radius;
margin-right: 4px;
margin-bottom: 4px;
}
&:hover .color-label {
text-decoration: underline;
}
}
&.has-labels {
// this font size is a fix to
// prevent unintended spacing between labels
// which shows up when rendering markup has white-space
// characters present.
// see: https://css-tricks.com/fighting-the-space-between-inline-block-elements/#article-header-id-3
font-size: 0;
margin-bottom: -5px;
}
}
.assignee,
.reviewer {
.merge-icon {
color: $orange-400;
position: absolute;
bottom: -3px;
right: -3px;
filter: drop-shadow(0 0 0.5px $white) drop-shadow(0 0 1px $white) drop-shadow(0 0 2px $white);
}
}
.participants-author {
&:nth-of-type(8n) {
2023-05-27 22:25:52 +05:30
margin-right: 0;
2023-03-04 22:38:38 +05:30
}
.avatar.avatar-inline {
margin: 0;
}
}
.participants-more,
.user-list-more {
margin-left: 5px;
a,
.btn-link {
color: $gl-text-color-secondary;
}
.btn-link {
padding: 0;
}
.btn-link:hover {
color: $blue-800;
text-decoration: none;
}
.btn-link:focus {
text-decoration: none;
}
}
.sidebar-help-wrap {
.sidebar-help-state {
margin: 16px -20px -20px;
padding: 16px 20px;
}
.help-state-toggle-enter-active {
transition: all 0.8s ease;
}
.help-state-toggle-leave-active {
transition: all 0.5s ease;
}
.help-state-toggle-enter,
.help-state-toggle-leave-active {
opacity: 0;
}
}
.time-tracker {
.sidebar-collapsed-icon {
> .stopwatch-svg {
display: inline-block;
}
svg {
width: 16px;
height: 16px;
fill: $gl-text-color-secondary;
}
&:hover svg {
fill: $gl-text-color;
}
}
.compare-meter {
&.over_estimate {
.time-remaining,
.compare-value.spent {
color: $red-500;
}
}
}
.compare-display-container {
font-size: 13px;
}
}
/*
* Following overrides are done to prevent
* legacy dropdown styles from influencing
* GitLab UI components used within GlDropdown
*/
.right-sidebar-collapsed {
.sidebar-grouped-item {
.sidebar-collapsed-icon {
margin-bottom: 0;
}
.sidebar-collapsed-divider {
line-height: 5px;
font-size: 12px;
color: $gray-500;
+ .sidebar-collapsed-icon {
padding-top: 0;
}
}
}
}
@include media-breakpoint-down(sm) {
// Overriding the following rule with the negative margin
// https://gitlab.com/gitlab-org/gitlab/-/blob/146c43c931c3743a140529307aea616e4aa9ff21/app/assets/stylesheets/framework/sidebar.scss#L1-5
.container-fluid {
.issuable-list,
.issues-filters,
.epics-filters {
margin: 0 (-$gl-padding);
}
}
}