debian-mirror-gitlab/app/assets/stylesheets/pages/notes.scss

1163 lines
21 KiB
SCSS
Raw Normal View History

2022-11-25 23:54:43 +05:30
$system-note-icon-size: 2rem;
$system-note-svg-size: 1rem;
2015-04-26 12:48:37 +05:30
2018-12-13 13:39:08 +05:30
@mixin vertical-line($left) {
&::before {
content: '';
2023-03-04 22:38:38 +05:30
border-left: 2px solid var(--gray-50, $gray-50);
2018-12-13 13:39:08 +05:30
position: absolute;
2023-01-13 00:05:48 +05:30
top: $gl-padding-6;
2018-12-13 13:39:08 +05:30
bottom: 0;
2022-11-25 23:54:43 +05:30
left: calc(#{$left} - 1px);
height: calc(100% + 1.5rem);
2018-11-08 19:23:39 +05:30
}
2018-12-13 13:39:08 +05:30
}
2018-11-08 19:23:39 +05:30
2018-12-13 13:39:08 +05:30
@mixin outline-comment() {
2019-02-15 15:39:39 +05:30
margin: $gl-padding $gl-padding 0;
2018-12-13 13:39:08 +05:30
border: 1px solid $border-color;
border-radius: $border-radius-default;
}
2022-11-25 23:54:43 +05:30
.issuable-discussion:not(.incident-timeline-events),
.limited-width-notes {
.main-notes-list > li.timeline-entry:not(:last-of-type) {
@include vertical-line(1rem);
2019-02-15 15:39:39 +05:30
}
2018-12-13 13:39:08 +05:30
}
.notes {
2015-04-26 12:48:37 +05:30
display: block;
list-style: none;
2016-06-02 11:05:42 +05:30
margin: 0;
padding: 0;
2018-12-13 13:39:08 +05:30
position: relative;
&.timeline > .timeline-entry {
margin: $gl-padding 0;
&.system-note,
&.note-form {
border: 0;
}
2022-11-25 23:54:43 +05:30
.timeline-avatar {
height: 2rem;
}
&.note-comment,
&.note-skeleton,
.draft-note {
.timeline-avatar {
margin-top: 5px;
}
.timeline-content:not(.flash-container) {
margin-left: 2.5rem;
border: 1px solid $border-color;
border-radius: $gl-border-radius-base;
background-color: $white;
padding: $gl-padding-4 $gl-padding-8;
}
2023-03-04 22:38:38 +05:30
&.draft-note .timeline-content:not(.flash-container) {
border: 0;
}
2022-11-25 23:54:43 +05:30
.note-header-info {
min-height: 2rem;
display: flex;
align-items: center;
gap: 0 0.25rem;
flex-wrap: wrap;
2023-04-23 21:23:45 +05:30
line-height: $gl-line-height-20;
padding-top: $gl-padding-6;
padding-bottom: $gl-padding-6;
2022-11-25 23:54:43 +05:30
}
}
&.note-discussion {
.timeline-content .discussion-wrapper {
background-color: transparent;
}
.timeline-content {
ul li {
&:first-of-type {
.timeline-avatar {
margin-top: 5px;
}
2023-03-04 22:38:38 +05:30
.timeline-content:not(.flash-container) {
2022-11-25 23:54:43 +05:30
margin-left: 2.5rem;
border-left: 1px solid $border-color;
border-right: 1px solid $border-color;
border-top: 1px solid $border-color;
border-top-left-radius: $gl-border-radius-base;
border-top-right-radius: $gl-border-radius-base;
background-color: $white;
padding: $gl-padding-4 $gl-padding-8;
}
}
2023-03-04 22:38:38 +05:30
&.draft-note .timeline-content:not(.flash-container) {
margin-left: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
2022-11-25 23:54:43 +05:30
&:not(:first-of-type) .timeline-entry-inner {
margin-left: 2.5rem;
border-left: 1px solid $border-color;
border-right: 1px solid $border-color;
background-color: $white;
2023-03-04 22:38:38 +05:30
.timeline-content:not(.flash-container) {
2022-11-25 23:54:43 +05:30
padding: $gl-padding-8 $gl-padding-8 $gl-padding-8 $gl-padding;
}
2023-03-04 22:38:38 +05:30
.timeline-discussion-body-footer {
padding: 0 $gl-padding-8 0;
}
2022-11-25 23:54:43 +05:30
.timeline-avatar {
margin: $gl-padding-8 0 0 $gl-padding;
}
.timeline-discussion-body {
margin-left: 2rem;
}
}
2023-03-04 22:38:38 +05:30
&:last-of-type .timeline-entry-inner {
border-bottom: 1px solid $border-color;
border-bottom-left-radius: $gl-border-radius-base;
border-bottom-right-radius: $gl-border-radius-base;
}
2022-11-25 23:54:43 +05:30
}
.diff-content {
ul li:first-of-type {
.timeline-avatar {
margin-top: 0;
}
.timeline-content {
margin-left: 0;
border: 0;
padding: 0;
}
.timeline-entry-inner {
margin-left: 2.5rem;
border-left: 1px solid $border-color;
border-right: 1px solid $border-color;
background-color: $white;
.timeline-content {
padding: $gl-padding-8 $gl-padding-8 $gl-padding-8 $gl-padding;
}
.timeline-avatar {
margin: $gl-padding-8 0 0 $gl-padding;
}
.timeline-discussion-body {
margin-left: 2rem;
}
}
}
}
}
.discussion-reply-holder {
border: 1px solid $border-color;
}
}
2018-12-13 13:39:08 +05:30
&.note-form {
margin-left: 0;
.timeline-content {
margin-left: 0;
}
}
2019-07-31 22:56:46 +05:30
.notes-content {
2018-12-13 13:39:08 +05:30
border: 0;
border-top: 1px solid $border-color;
}
}
> .note-discussion {
.card {
border: 0;
}
2019-02-15 15:39:39 +05:30
}
2018-12-13 13:39:08 +05:30
2019-09-30 21:07:59 +05:30
.discussion-toggle-replies {
border-top: 0;
border-radius: 4px 4px 0 0;
&.collapsed {
border-radius: 4px;
}
}
2017-08-17 22:00:37 +05:30
.note-created-ago,
.note-updated-at {
2018-05-09 12:01:36 +05:30
white-space: normal;
2016-06-02 11:05:42 +05:30
}
2015-04-26 12:48:37 +05:30
2017-08-17 22:00:37 +05:30
.discussion-body {
2018-11-08 19:23:39 +05:30
.card {
2017-08-17 22:00:37 +05:30
margin-bottom: 0;
2015-09-25 12:07:36 +05:30
}
2022-11-25 23:54:43 +05:30
.note-header-info {
min-height: 2rem;
display: flex;
align-items: center;
gap: 0 0.25rem;
flex-wrap: wrap;
2023-04-23 21:23:45 +05:30
padding-top: $gl-padding-6;
padding-bottom: $gl-padding-6;
line-height: $gl-line-height-20;
2022-11-25 23:54:43 +05:30
}
2021-11-18 22:05:49 +05:30
}
2015-04-26 12:48:37 +05:30
.discussion {
display: block;
2016-06-02 11:05:42 +05:30
position: relative;
2017-09-10 17:25:29 +05:30
2019-02-15 15:39:39 +05:30
.timeline-discussion-body {
overflow-x: auto;
overflow-y: hidden;
}
2017-09-10 17:25:29 +05:30
.diff-content {
overflow: visible;
2018-11-08 19:23:39 +05:30
padding: 0;
2017-09-10 17:25:29 +05:30
}
2015-04-26 12:48:37 +05:30
}
2018-11-08 19:23:39 +05:30
> li {
2015-04-26 12:48:37 +05:30
display: block;
2016-06-02 11:05:42 +05:30
position: relative;
2017-09-10 17:25:29 +05:30
2017-08-17 22:00:37 +05:30
&.being-posted {
pointer-events: none;
opacity: 0.5;
.dummy-avatar {
2020-11-24 15:15:51 +05:30
background-color: $gray-100;
border: 1px solid darken($gray-100, 25%);
2017-08-17 22:00:37 +05:30
}
}
2018-03-17 18:26:18 +05:30
.editing-spinner {
display: none;
}
&.is-requesting {
.note-timestamp {
display: none;
}
.editing-spinner {
display: inline-block;
}
}
2017-08-17 22:00:37 +05:30
&.is-editing {
2016-06-02 11:05:42 +05:30
.note-header,
.note-text,
.edited-text {
display: none;
}
2019-09-04 21:01:54 +05:30
.user-avatar-link img {
margin-top: $gl-padding-8;
}
2016-06-02 11:05:42 +05:30
.note-edit-form {
display: block;
2019-09-04 21:01:54 +05:30
margin-left: 0;
2022-11-25 23:54:43 +05:30
margin-top: 0.5rem;
&.current-note-edit-form + .note-awards {
display: none;
}
2016-06-02 11:05:42 +05:30
}
}
2015-09-11 14:41:01 +05:30
2015-04-26 12:48:37 +05:30
.note-body {
2022-11-25 23:54:43 +05:30
padding: 0 $gl-padding-8 $gl-padding-8;
2017-08-17 22:00:37 +05:30
overflow-x: auto;
overflow-y: hidden;
2015-09-11 14:41:01 +05:30
2015-04-26 12:48:37 +05:30
.note-text {
2017-09-10 17:25:29 +05:30
word-wrap: break-word;
2015-04-26 12:48:37 +05:30
}
2022-11-25 23:54:43 +05:30
.suggestions {
margin-top: 4px;
}
2015-04-26 12:48:37 +05:30
}
2015-09-11 14:41:01 +05:30
.note-awards {
.js-awards-block {
2017-09-10 17:25:29 +05:30
margin-top: 16px;
}
}
.note-emoji-button {
2017-08-17 22:00:37 +05:30
position: relative;
line-height: 1;
2015-04-26 12:48:37 +05:30
}
2017-08-17 22:00:37 +05:30
}
.system-note {
2022-11-25 23:54:43 +05:30
padding: $gl-padding-8 0;
2019-09-04 21:01:54 +05:30
margin: $gl-padding 0;
2018-12-13 13:39:08 +05:30
background-color: transparent;
2022-11-25 23:54:43 +05:30
font-size: $gl-font-size;
2017-08-17 22:00:37 +05:30
.note-header-info {
padding-bottom: 0;
}
&.timeline-entry::after {
clear: none;
}
.system-note-message {
&::first-letter {
text-transform: lowercase;
}
2020-04-08 14:13:33 +05:30
a:not(.gl-link) {
2018-11-20 20:47:30 +05:30
color: $blue-600;
2017-08-17 22:00:37 +05:30
}
p {
display: inline;
margin: 0;
&::first-letter {
text-transform: lowercase;
}
}
}
2017-09-10 17:25:29 +05:30
.timeline-content {
2018-11-08 19:23:39 +05:30
@include notes-media('min', map-get($grid-breakpoints, sm)) {
2017-09-10 17:25:29 +05:30
margin-left: 30px;
2017-08-17 22:00:37 +05:30
}
}
.note-header {
padding-bottom: 0;
}
.note-body {
overflow: hidden;
2022-11-25 23:54:43 +05:30
padding: 0;
ul {
margin: 0.5rem 0;
}
p {
margin-left: 1rem;
}
2017-08-17 22:00:37 +05:30
2019-12-26 22:10:19 +05:30
.description-version {
2020-03-13 15:44:24 +05:30
position: relative;
.btn.delete-description-history {
position: absolute;
top: 18px;
2020-04-08 14:13:33 +05:30
right: 10px;
2020-03-13 15:44:24 +05:30
}
2019-12-26 22:10:19 +05:30
pre {
max-height: $dropdown-max-height-lg;
white-space: pre-wrap;
2020-03-13 15:44:24 +05:30
padding-right: 30px;
2019-12-26 22:10:19 +05:30
}
}
2017-08-17 22:00:37 +05:30
.system-note-commit-list-toggler {
2018-11-20 20:47:30 +05:30
color: $blue-600;
2017-08-17 22:00:37 +05:30
padding: 10px 0 0;
cursor: pointer;
position: relative;
z-index: 2;
&:hover {
2018-11-20 20:47:30 +05:30
color: $blue-600;
2017-08-17 22:00:37 +05:30
text-decoration: underline;
}
}
.note-text {
2017-09-10 17:25:29 +05:30
p:first-child {
2017-08-17 22:00:37 +05:30
display: none;
}
2018-03-17 18:26:18 +05:30
&.system-note-commit-list:not(.hide-shade) {
2017-08-17 22:00:37 +05:30
max-height: 70px;
overflow: hidden;
display: block;
ul {
margin: 3px 0 3px 16px !important;
}
p:first-child {
display: none;
}
&::after {
content: '';
2017-09-10 17:25:29 +05:30
height: 70px;
2017-08-17 22:00:37 +05:30
position: absolute;
2019-02-15 15:39:39 +05:30
left: $gl-padding-24;
right: 0;
2017-08-17 22:00:37 +05:30
bottom: 0;
2021-02-22 17:27:13 +05:30
background: linear-gradient(rgba($white, 0.1) -100px, $body-bg 100%);
2017-08-17 22:00:37 +05:30
}
}
}
}
2015-04-26 12:48:37 +05:30
}
2019-07-07 11:18:12 +05:30
2019-12-21 20:55:43 +05:30
.timeline-icon {
float: left;
}
2019-07-07 11:18:12 +05:30
.system-note,
.discussion-filter-note {
.timeline-icon {
display: flex;
align-items: center;
2023-03-04 22:38:38 +05:30
background-color: $gray-50;
2019-07-07 11:18:12 +05:30
width: $system-note-icon-size;
height: $system-note-icon-size;
2023-03-04 22:38:38 +05:30
border: 1px solid $gray-50;
2019-07-07 11:18:12 +05:30
border-radius: $system-note-icon-size;
2023-01-13 00:05:48 +05:30
margin: -6px 0 0;
2019-07-07 11:18:12 +05:30
svg {
width: $system-note-svg-size;
height: $system-note-svg-size;
2023-03-04 22:38:38 +05:30
fill: $gray-600;
2019-07-07 11:18:12 +05:30
display: block;
margin: 0 auto;
}
}
}
.discussion-filter-note {
.timeline-icon {
2022-11-25 23:54:43 +05:30
width: $system-note-icon-size;
height: $system-note-icon-size;
2019-07-07 11:18:12 +05:30
margin-top: -8px;
}
}
2015-04-26 12:48:37 +05:30
}
2022-11-25 23:54:43 +05:30
.card .notes {
.system-note {
margin: 0;
padding: 0;
}
.timeline-icon {
margin: 8px 0 0 14px;
}
}
2015-04-26 12:48:37 +05:30
// Diff code in discussion view
.discussion-body .diff-file {
2016-11-03 12:29:30 +05:30
.file-title {
cursor: default;
2022-11-25 23:54:43 +05:30
border-top: 0;
2018-12-13 13:39:08 +05:30
border-radius: 0;
2022-11-25 23:54:43 +05:30
margin-left: 2.5rem;
2016-11-03 12:29:30 +05:30
2019-02-15 15:39:39 +05:30
@media (min-width: map-get($grid-breakpoints, md)) {
2022-10-11 01:57:18 +05:30
--initial-top: calc(#{$header-height} + #{$mr-tabs-height});
&.is-sidebar-moved {
2022-11-25 23:54:43 +05:30
--initial-top: calc(#{$header-height} + #{$mr-tabs-height + 24px});
2022-10-11 01:57:18 +05:30
}
2019-02-15 15:39:39 +05:30
.with-performance-bar & {
2022-10-11 01:57:18 +05:30
--top: 123px;
2019-02-15 15:39:39 +05:30
}
}
2016-11-03 12:29:30 +05:30
&:hover {
background-color: $gray-light;
}
2018-12-13 13:39:08 +05:30
.btn-clipboard {
top: 10px;
}
2016-11-03 12:29:30 +05:30
}
2015-04-26 12:48:37 +05:30
.line_content {
white-space: pre-wrap;
}
2022-11-25 23:54:43 +05:30
.diff-content {
margin-left: 2.5rem;
&.outdated-lines-wrapper {
margin-left: 0;
}
.line_holder td:first-of-type {
@include gl-border-l;
}
.line_holder td:last-of-type {
@include gl-border-r;
}
.discussion-notes {
margin-left: -2.5rem;
.notes {
background-color: transparent;
}
.notes-content {
border: 0;
}
.timeline-content {
border-top: 0 !important;
border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
}
}
}
2015-04-26 12:48:37 +05:30
}
2018-12-13 13:39:08 +05:30
.tab-pane.notes {
.diff-file .notes .system-note {
margin: 0;
}
}
.tab-pane.diffs {
.system-note {
padding: 0 $gl-padding;
margin-left: 20px;
}
.notes > .note-discussion li.note.system-note {
border-bottom: 0;
2019-09-04 21:01:54 +05:30
padding: 0;
2018-12-13 13:39:08 +05:30
}
}
2018-03-17 18:26:18 +05:30
.diff-file {
2021-01-29 00:20:46 +05:30
.diff-grid-left:hover,
.diff-grid-right:hover,
2018-03-17 18:26:18 +05:30
.is-over {
.add-diff-note {
2019-09-04 21:01:54 +05:30
display: inline-flex;
justify-content: center;
align-items: center;
2018-03-17 18:26:18 +05:30
}
}
2015-04-26 12:48:37 +05:30
2018-12-13 13:39:08 +05:30
.discussion-notes {
&:not(:last-child) {
margin-bottom: 0;
}
.system-note {
2022-11-25 23:54:43 +05:30
background-color: transparent;
padding: 0;
.timeline-icon {
margin-top: -2px;
}
.timeline-entry-inner .timeline-icon {
margin-top: $grid-size;
margin-left: 14px;
}
2018-12-13 13:39:08 +05:30
}
}
2018-03-17 18:26:18 +05:30
// Merge request notes in diffs
// Diff is inline
2019-07-31 22:56:46 +05:30
.notes-content .note-header .note-headline-light {
2018-03-17 18:26:18 +05:30
display: inline-block;
position: relative;
}
2015-04-26 12:48:37 +05:30
2019-09-30 21:07:59 +05:30
.notes-content .discussion-notes.diff-discussions {
border-bottom: 1px solid $border-color;
&:nth-last-child(1) {
border-bottom: 0;
}
}
2018-03-17 18:26:18 +05:30
.notes_holder {
2018-11-18 11:00:15 +05:30
font-family: $regular-font;
2016-06-02 11:05:42 +05:30
2021-01-29 00:20:46 +05:30
.diff-td,
2018-03-17 18:26:18 +05:30
td {
2019-02-15 15:39:39 +05:30
border: 1px solid $border-color;
2018-03-17 18:26:18 +05:30
border-left: 0;
2016-06-02 11:05:42 +05:30
2019-07-31 22:56:46 +05:30
&.notes-content {
2018-03-17 18:26:18 +05:30
border-width: 1px 0;
padding: 0;
vertical-align: top;
white-space: normal;
2019-12-04 20:38:33 +05:30
// Fixes subpixel rounding issue https://gitlab.com/gitlab-org/gitlab-foss/issues/53973
2019-07-31 22:56:46 +05:30
// background-color is needed for dark code preference
padding-bottom: 1px;
2020-04-22 19:07:51 +05:30
background-color: $white;
2019-07-31 22:56:46 +05:30
2018-03-17 18:26:18 +05:30
&.parallel {
border-width: 1px;
2018-12-05 23:21:45 +05:30
&.new {
border-right-width: 0;
}
2023-04-23 21:23:45 +05:30
.note-header {
flex-wrap: wrap;
align-items: center;
}
2017-08-17 22:00:37 +05:30
}
2018-03-17 18:26:18 +05:30
.notes {
2020-04-22 19:07:51 +05:30
background-color: $white;
2018-03-17 18:26:18 +05:30
}
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
a code {
top: 0;
margin-right: 0;
}
2016-06-02 11:05:42 +05:30
}
}
}
}
2018-12-13 13:39:08 +05:30
.diffs {
.discussion-notes {
margin-left: 0;
border-left: 0;
}
.note-wrapper {
&.system-note {
border: 0;
margin-left: 20px;
}
}
.discussion-reply-holder {
2023-04-23 21:23:45 +05:30
border-top: 0;
2018-12-13 13:39:08 +05:30
border-radius: 0 0 $border-radius-default $border-radius-default;
position: relative;
2019-09-30 21:07:59 +05:30
.discussion-form {
width: 100%;
background-color: $gray-light;
padding: 0;
}
.disabled-comment {
padding: $gl-vert-padding 0;
width: 100%;
}
2018-12-13 13:39:08 +05:30
}
}
2019-09-04 21:01:54 +05:30
.code-commit .notes-content,
.diff-viewer > .image ~ .note-container {
2020-04-22 19:07:51 +05:30
background-color: $white;
2022-11-25 23:54:43 +05:30
li.note-comment {
padding: $gl-padding-8 $gl-padding-8 $gl-padding-8 $gl-padding;
.avatar {
margin-right: 0;
}
.note-body {
padding: $gl-padding-4 0 $gl-padding-8;
margin-left: 2.5rem;
}
}
2018-12-13 13:39:08 +05:30
}
2019-09-04 21:01:54 +05:30
.diff-viewer > .image ~ .note-container form.new-note {
margin-left: 0;
}
2016-06-02 11:05:42 +05:30
.discussion-header,
2018-03-17 18:26:18 +05:30
.note-header-info {
2016-06-02 11:05:42 +05:30
a {
color: inherit;
2020-05-24 23:13:21 +05:30
&:hover,
&.hover {
2018-11-20 20:47:30 +05:30
color: $blue-600;
2017-08-17 22:00:37 +05:30
}
&:focus,
&:hover {
2016-06-02 11:05:42 +05:30
text-decoration: none;
2018-03-17 18:26:18 +05:30
.note-header-author-name {
text-decoration: underline;
}
2015-04-26 12:48:37 +05:30
}
}
2016-06-02 11:05:42 +05:30
2018-11-18 11:00:15 +05:30
.author-link {
2017-08-17 22:00:37 +05:30
color: $gl-text-color;
}
2020-05-24 23:13:21 +05:30
// Prevent flickering of link when hovering between `author-name-link` and `.author-username-link`
.author-name-link + .author-username .author-username-link {
position: relative;
&::before {
content: '';
position: absolute;
right: 100%;
width: 0.25rem;
height: 100%;
top: 0;
bottom: 0;
}
}
2017-08-17 22:00:37 +05:30
}
.discussion-header {
2019-09-30 21:07:59 +05:30
box-sizing: content-box;
2018-12-13 13:39:08 +05:30
.note-header-info {
padding-bottom: 0;
}
2019-07-07 11:18:12 +05:30
2022-11-25 23:54:43 +05:30
.timeline-avatar {
margin-top: 5px;
}
2019-07-07 11:18:12 +05:30
.timeline-content {
overflow-x: auto;
overflow-y: hidden;
2022-11-25 23:54:43 +05:30
border-radius: $gl-border-radius-base;
padding: $gl-padding-8 !important;
@include gl-border;
&.expanded {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
2019-07-07 11:18:12 +05:30
}
2018-12-13 13:39:08 +05:30
2019-09-30 21:07:59 +05:30
&.note-wrapper {
display: flex;
align-items: center;
2022-07-23 23:45:48 +05:30
padding-right: $gl-padding;
2018-12-13 13:39:08 +05:30
}
2017-08-17 22:00:37 +05:30
}
.note-header {
display: flex;
justify-content: space-between;
2023-04-23 21:23:45 +05:30
align-items: flex-start;
2021-11-18 22:05:49 +05:30
> .note-header-info,
> .note-actions {
flex-grow: 1;
flex-shrink: 1;
}
}
.note {
@include notes-media('max', map-get($grid-breakpoints, sm) - 1) {
.note-header {
2022-11-25 23:54:43 +05:30
.note-actions > :first-child {
margin-left: 0;
2021-11-18 22:05:49 +05:30
}
}
}
2017-08-17 22:00:37 +05:30
}
.note-header-info {
min-width: 0;
2022-10-11 01:57:18 +05:30
padding-left: $gl-padding-8;
2018-03-17 18:26:18 +05:30
&.discussion {
padding-bottom: 0;
}
2017-08-17 22:00:37 +05:30
}
2017-09-10 17:25:29 +05:30
.system-note .note-header-info {
padding-bottom: 0;
}
2017-08-17 22:00:37 +05:30
.note-headline-light {
display: inline;
2016-06-02 11:05:42 +05:30
}
.note-headline-light,
.discussion-headline-light {
2018-11-20 20:47:30 +05:30
color: $gl-text-color-secondary;
2016-06-02 11:05:42 +05:30
}
.discussion-headline-light {
a {
2018-11-20 20:47:30 +05:30
color: $blue-600;
2016-06-02 11:05:42 +05:30
}
2015-04-26 12:48:37 +05:30
}
2017-08-17 22:00:37 +05:30
.note-headline-meta {
2019-07-07 11:18:12 +05:30
.note-timestamp {
white-space: nowrap;
}
2018-03-17 18:26:18 +05:30
a:hover {
text-decoration: underline;
}
2020-04-08 14:13:33 +05:30
2020-05-24 23:13:21 +05:30
.gl-label-link:hover {
2020-04-08 14:13:33 +05:30
text-decoration: none;
color: inherit;
.gl-label-text:last-of-type {
text-decoration: underline;
}
}
2017-08-17 22:00:37 +05:30
}
2015-04-26 12:48:37 +05:30
/**
* Actions for Discussions/Notes
*/
2017-08-17 22:00:37 +05:30
.discussion-actions {
2016-06-02 11:05:42 +05:30
float: right;
2017-08-17 22:00:37 +05:30
color: $gray-darkest;
2018-03-17 18:26:18 +05:30
2018-12-13 13:39:08 +05:30
@include media-breakpoint-down(xs) {
width: 100%;
2021-10-27 15:23:28 +05:30
margin: 0 0 $gl-padding-8;
2018-12-13 13:39:08 +05:30
}
2018-03-17 18:26:18 +05:30
.btn-group > .discussion-next-btn {
margin-left: -1px;
}
2018-12-13 13:39:08 +05:30
2019-09-30 21:07:59 +05:30
.btn-group > .discussion-create-issue-btn {
margin-left: -2px;
}
2018-12-13 13:39:08 +05:30
svg {
height: 15px;
}
2016-06-02 11:05:42 +05:30
}
.note-actions {
2021-11-18 22:05:49 +05:30
justify-content: flex-end;
flex-shrink: 1;
2017-09-10 17:25:29 +05:30
display: inline-flex;
align-items: center;
2022-11-25 23:54:43 +05:30
margin-left: $gl-padding-8;
2020-10-24 23:57:45 +05:30
color: $gray-400;
2016-06-22 15:30:34 +05:30
2018-11-08 19:23:39 +05:30
@include notes-media('max', map-get($grid-breakpoints, sm) - 1) {
2022-11-25 23:54:43 +05:30
justify-content: flex-start;
2017-08-17 22:00:37 +05:30
float: none;
2022-11-25 23:54:43 +05:30
.note-actions__mobile-spacer {
flex-grow: 1;
}
2016-06-22 15:30:34 +05:30
}
2017-09-10 17:25:29 +05:30
}
.more-actions {
display: flex;
align-items: flex-end;
.tooltip {
white-space: nowrap;
}
}
.more-actions-toggle {
&:hover .icon,
&:focus .icon {
color: $blue-600;
}
}
.more-actions-dropdown {
width: 180px;
min-width: 180px;
2016-06-02 11:05:42 +05:30
}
2015-04-26 12:48:37 +05:30
2017-09-10 17:25:29 +05:30
.note-actions-item {
2018-03-17 18:26:18 +05:30
margin-left: 12px;
2017-09-10 17:25:29 +05:30
display: flex;
align-items: center;
2017-09-10 17:25:29 +05:30
&.more-actions {
// compensate for narrow icon
margin-left: 10px;
}
2017-09-10 17:25:29 +05:30
}
.note-action-button {
2018-12-05 23:21:45 +05:30
@include emoji-menu-toggle-button;
2015-04-26 12:48:37 +05:30
}
2016-06-02 11:05:42 +05:30
.discussion-toggle-button {
2022-11-25 23:54:43 +05:30
padding: 0 $gl-padding-8 0 0;
2017-08-17 22:00:37 +05:30
background-color: transparent;
border: 0;
2016-06-02 11:05:42 +05:30
line-height: 20px;
font-size: 13px;
2017-08-17 22:00:37 +05:30
transition: color 0.1s linear;
&:hover {
2018-11-20 20:47:30 +05:30
color: $blue-600;
2017-08-17 22:00:37 +05:30
}
&:focus {
text-decoration: underline;
outline: none;
2018-11-20 20:47:30 +05:30
color: $blue-600;
2017-08-17 22:00:37 +05:30
}
2016-06-02 11:05:42 +05:30
}
.note-role {
2021-01-29 00:20:46 +05:30
margin: 0 8px;
2016-06-02 11:05:42 +05:30
}
2015-04-26 12:48:37 +05:30
/**
* Line note button on the side of diffs
*/
2021-01-29 00:20:46 +05:30
.diff-grid-left:hover,
.diff-grid-right:hover,
2017-09-10 17:25:29 +05:30
.line_holder .is-over:not(.no-comment-btn) {
.add-diff-note {
opacity: 1;
2018-11-08 19:23:39 +05:30
z-index: 101;
2017-09-10 17:25:29 +05:30
}
}
2020-10-24 23:57:45 +05:30
.tooltip-wrapper.add-diff-note {
2019-09-04 21:01:54 +05:30
margin-left: -52px;
2017-08-17 22:00:37 +05:30
position: absolute;
2018-11-08 19:23:39 +05:30
top: 50%;
transform: translateY(-50%);
2017-08-17 22:00:37 +05:30
z-index: 10;
}
2015-04-26 12:48:37 +05:30
2020-10-24 23:57:45 +05:30
.note-button.add-diff-note {
@include btn-comment-icon;
opacity: 0;
2021-09-30 23:02:18 +05:30
will-change: opacity;
2020-10-24 23:57:45 +05:30
&[disabled] {
background: $white;
border-color: $gray-200;
2020-11-24 15:15:51 +05:30
color: $gray-300;
2020-10-24 23:57:45 +05:30
cursor: not-allowed;
}
}
2021-04-29 21:17:54 +05:30
.unified-diff-components-diff-note-button {
&::before {
background-color: $blue-500;
mask-image: asset_url('icons-stacked.svg#comment');
mask-repeat: no-repeat;
mask-size: cover;
mask-position: center;
content: '';
width: 12px;
height: 12px;
}
2023-01-13 00:05:48 +05:30
&:hover:not([disabled]),
2021-04-29 21:17:54 +05:30
&.inverted {
&::before {
background-color: $white;
}
}
}
2016-06-02 11:05:42 +05:30
.disabled-comment {
background-color: $gray-light;
border-radius: $border-radius-base;
border: 1px solid $border-gray-normal;
color: $note-disabled-comment-color;
2019-10-12 21:52:04 +05:30
padding: $gl-padding-8 0;
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
&.discussion-locked {
border: 0;
2020-04-22 19:07:51 +05:30
background-color: $white;
2018-03-17 18:26:18 +05:30
}
2019-09-04 21:01:54 +05:30
a:not(.learn-more) {
2018-11-20 20:47:30 +05:30
color: $blue-600;
2016-06-02 11:05:42 +05:30
}
}
2016-09-13 17:45:13 +05:30
.line-resolve-btn {
position: relative;
2017-08-17 22:00:37 +05:30
top: 0;
2016-09-13 17:45:13 +05:30
padding: 0;
background-color: transparent;
2018-03-17 18:26:18 +05:30
border: 0;
2016-09-13 17:45:13 +05:30
outline: 0;
2017-09-10 17:25:29 +05:30
transition: color $general-hover-transition-duration $general-hover-transition-curve;
2016-09-13 17:45:13 +05:30
2021-01-29 00:20:46 +05:30
&[disabled] {
padding: 0 8px !important;
box-shadow: none !important;
.gl-button-loading-indicator {
margin-right: 0 !important;
}
}
2016-09-13 17:45:13 +05:30
&.is-disabled {
cursor: default;
}
2017-09-10 17:25:29 +05:30
&:not(.is-disabled) {
&:hover,
&:focus {
2021-01-29 00:20:46 +05:30
svg {
color: $green-600;
}
2017-09-10 17:25:29 +05:30
}
}
2016-09-13 17:45:13 +05:30
&.is-active {
2021-01-29 00:20:46 +05:30
svg {
@include gl-text-green-500;
}
2016-09-13 17:45:13 +05:30
2017-09-10 17:25:29 +05:30
&:hover,
&:focus {
2021-01-29 00:20:46 +05:30
svg {
color: $green-700;
}
2016-09-13 17:45:13 +05:30
}
}
2017-08-17 22:00:37 +05:30
.loading {
margin: 0;
height: auto;
2016-09-13 17:45:13 +05:30
}
}
2018-11-08 19:23:39 +05:30
// Vue refactored diff discussion adjustments
.files {
.diff-discussions {
.note-discussion.timeline-entry {
padding-left: 0;
2022-11-25 23:54:43 +05:30
ul.notes li.note-wrapper {
2023-03-04 22:38:38 +05:30
.timeline-content:not(.flash-container) {
2022-11-25 23:54:43 +05:30
padding: $gl-padding-8 $gl-padding-8 $gl-padding-8 $gl-padding;
}
.timeline-avatar {
margin: $gl-padding-8 0 0 $gl-padding;
}
}
ul.notes {
li.toggle-replies-widget {
margin-left: 0;
border-left: 0;
border-right: 0;
}
2023-03-04 22:38:38 +05:30
.discussion-reply-holder {
2022-11-25 23:54:43 +05:30
margin-left: 0;
}
}
2018-11-08 19:23:39 +05:30
&:last-child {
border-bottom: 0;
}
> .timeline-entry-inner {
padding: 0;
> .timeline-content {
margin-left: 0;
}
> .timeline-icon {
display: none;
}
}
.discussion-body {
padding-top: 0;
.discussion-wrapper {
2018-12-05 23:21:45 +05:30
border: 0;
2018-11-08 19:23:39 +05:30
}
}
}
}
2023-03-04 22:38:38 +05:30
.draft-note-component.draft-note.timeline-entry {
2022-11-25 23:54:43 +05:30
.timeline-content:not(.flash-container) {
padding: $gl-padding-8 $gl-padding-8 $gl-padding-8 $gl-padding;
}
.timeline-avatar {
margin: $gl-padding-8 0 0 $gl-padding;
}
}
2018-11-08 19:23:39 +05:30
.diff-comment-form {
display: block;
}
}
2018-12-13 13:39:08 +05:30
.discussion-filter-container {
.dropdown-menu {
margin-bottom: $gl-padding-4;
}
}
//This needs to be deleted when Snippet/Commit comments are convered to Vue
2019-12-04 20:38:33 +05:30
// See https://gitlab.com/gitlab-org/gitlab-foss/issues/53918#note_117038785
2018-12-13 13:39:08 +05:30
.unstyled-comments {
.discussion-header {
2022-11-25 23:54:43 +05:30
padding: $gl-padding 0;
2018-12-13 13:39:08 +05:30
}
.discussion-form-container {
padding: $gl-padding;
}
}