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

1112 lines
20 KiB
SCSS
Raw Normal View History

2015-10-24 18:46:33 +05:30
// Common
2014-09-02 18:07:02 +05:30
.diff-file {
2016-06-02 11:05:42 +05:30
margin-bottom: $gl-padding;
2016-11-03 12:29:30 +05:30
2017-08-17 22:00:37 +05:30
.file-title,
.file-title-flex-parent {
2016-11-03 12:29:30 +05:30
cursor: pointer;
2019-02-15 15:39:39 +05:30
@media (min-width: map-get($grid-breakpoints, md)) {
2019-07-07 11:18:12 +05:30
// The `-1` below is to prevent two borders from clashing up against eachother -
// the bottom of the compare-versions header and the top of the file header
$mr-file-header-top: $mr-version-controls-height + $header-height + $mr-tabs-height - 1;
2019-03-02 22:35:43 +05:30
2019-02-15 15:39:39 +05:30
position: -webkit-sticky;
position: sticky;
2019-03-02 22:35:43 +05:30
top: $mr-file-header-top;
2019-02-15 15:39:39 +05:30
z-index: 102;
2019-07-07 11:18:12 +05:30
height: $mr-version-controls-height;
2019-02-15 15:39:39 +05:30
&::before {
content: '';
position: absolute;
top: -1px;
left: -11px;
width: 10px;
height: calc(100% + 1px);
background: $white-light;
pointer-events: none;
}
.with-performance-bar & {
2019-03-02 22:35:43 +05:30
top: $mr-file-header-top + $performance-bar-height;
}
&.is-commit {
top: $header-height + $commit-stat-summary-height;
.with-performance-bar & {
top: $header-height + $commit-stat-summary-height + $performance-bar-height;
}
}
&.is-compare {
top: $header-height + $compare-branches-sticky-header-height;
.with-performance-bar & {
top: $performance-bar-height + $header-height + $compare-branches-sticky-header-height;
}
2019-02-15 15:39:39 +05:30
}
}
2017-08-17 22:00:37 +05:30
a:hover {
text-decoration: none;
}
2016-11-03 12:29:30 +05:30
&:hover {
2017-08-17 22:00:37 +05:30
background-color: $gray-normal;
2016-11-03 12:29:30 +05:30
}
2019-07-07 11:18:12 +05:30
a,
button {
color: $gray-700;
}
2018-11-08 19:23:39 +05:30
svg {
vertical-align: middle;
2018-11-18 11:00:15 +05:30
top: -1px;
2016-11-03 12:29:30 +05:30
}
}
2014-09-02 18:07:02 +05:30
.diff-content {
2017-08-17 22:00:37 +05:30
background: $white-light;
color: $gl-text-color;
2016-06-02 11:05:42 +05:30
border-radius: 0 0 3px 3px;
2015-09-25 12:07:36 +05:30
2014-09-02 18:07:02 +05:30
.unfold {
cursor: pointer;
}
.file-mode-changed {
padding: 10px;
2018-12-05 23:21:45 +05:30
color: $gl-gray-500;
2014-09-02 18:07:02 +05:30
}
2015-09-11 14:41:01 +05:30
.suppressed-container {
padding: ($padding-base-vertical + 5px) $padding-base-horizontal;
text-align: center;
// "Changes suppressed. Click to show." link
.show-suppressed-diff {
font-size: 110%;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2015-09-11 14:41:01 +05:30
}
}
2018-05-09 12:01:36 +05:30
.diff-loading-error-block {
padding: $gl-padding * 2 $gl-padding;
text-align: center;
}
2014-09-02 18:07:02 +05:30
}
2016-11-03 12:29:30 +05:30
2014-09-02 18:07:02 +05:30
.image {
2018-11-20 20:47:30 +05:30
background: $gray-darker;
2014-09-02 18:07:02 +05:30
text-align: center;
padding: 30px;
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
.wrap {
2014-09-02 18:07:02 +05:30
display: inline-block;
}
.frame {
display: inline-block;
2017-08-17 22:00:37 +05:30
background-color: $white-light;
2014-09-02 18:07:02 +05:30
line-height: 0;
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
img {
2017-08-17 22:00:37 +05:30
border: 1px solid $white-light;
2019-07-07 11:18:12 +05:30
background-image: linear-gradient(45deg,
$border-color 25%,
transparent 25%,
transparent 75%,
$border-color 75%,
$border-color 100%),
linear-gradient(45deg,
$border-color 25%,
transparent 25%,
transparent 75%,
$border-color 75%,
$border-color 100%);
2016-09-13 17:45:13 +05:30
background-size: 10px 10px;
background-position: 0 0, 5px 5px;
2014-09-02 18:07:02 +05:30
max-width: 100%;
}
2016-11-03 12:29:30 +05:30
2014-09-02 18:07:02 +05:30
&.deleted {
border: 1px solid $deleted;
}
&.added {
border: 1px solid $added;
}
}
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
.image-info {
2014-09-02 18:07:02 +05:30
font-size: 12px;
2016-06-02 11:05:42 +05:30
margin: 5px 0 0;
2017-08-17 22:00:37 +05:30
color: $diff-image-info-color;
2014-09-02 18:07:02 +05:30
}
2015-10-24 18:46:33 +05:30
.view.swipe {
2014-09-02 18:07:02 +05:30
position: relative;
2015-10-24 18:46:33 +05:30
.swipe-frame {
2014-09-02 18:07:02 +05:30
display: block;
margin: auto;
position: relative;
}
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
.swipe-wrap {
2014-09-02 18:07:02 +05:30
overflow: hidden;
2019-07-07 11:18:12 +05:30
border-right: 1px solid $gl-gray-400;
2014-09-02 18:07:02 +05:30
position: absolute;
display: block;
top: 13px;
right: 7px;
2019-07-07 11:18:12 +05:30
&.left-oriented {
/* only for commit view (different swipe viewer) */
border-right: 0;
border-left: 1px solid $gl-gray-400;
}
}
.frame {
top: 0;
right: 0;
&.old-diff {
/* only for commit / compare view */
position: absolute;
}
&.deleted {
margin: 0;
display: block;
top: 13px;
right: 7px;
}
2014-09-02 18:07:02 +05:30
}
2017-08-17 22:00:37 +05:30
2015-10-24 18:46:33 +05:30
.swipe-bar {
2014-09-02 18:07:02 +05:30
display: block;
height: 100%;
width: 15px;
z-index: 100;
position: absolute;
cursor: pointer;
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
&:hover {
.top-handle {
2014-09-02 18:07:02 +05:30
background-position: -15px 3px;
}
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
.bottom-handle {
2014-09-02 18:07:02 +05:30
background-position: -15px -11px;
}
2015-10-24 18:46:33 +05:30
}
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
.top-handle {
2014-09-02 18:07:02 +05:30
display: block;
height: 14px;
width: 15px;
position: absolute;
2016-06-02 11:05:42 +05:30
top: 0;
2014-09-02 18:07:02 +05:30
background: image-url('swipemode_sprites.gif') 0 3px no-repeat;
}
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
.bottom-handle {
2014-09-02 18:07:02 +05:30
display: block;
height: 14px;
width: 15px;
position: absolute;
2016-06-02 11:05:42 +05:30
bottom: 0;
2014-09-02 18:07:02 +05:30
background: image-url('swipemode_sprites.gif') 0 -11px no-repeat;
}
}
2015-10-24 18:46:33 +05:30
}
//.view.swipe
.view.onion-skin {
.onion-skin-frame {
2014-09-02 18:07:02 +05:30
display: block;
margin: auto;
position: relative;
}
2016-11-03 12:29:30 +05:30
2017-08-17 22:00:37 +05:30
.frame.added,
.frame.deleted {
2014-09-02 18:07:02 +05:30
position: absolute;
display: block;
2016-06-02 11:05:42 +05:30
top: 0;
left: 0;
2014-09-02 18:07:02 +05:30
}
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
.controls {
2014-09-02 18:07:02 +05:30
display: block;
height: 14px;
width: 300px;
z-index: 100;
position: absolute;
2016-06-02 11:05:42 +05:30
bottom: 0;
2014-09-02 18:07:02 +05:30
left: 50%;
margin-left: -150px;
2015-10-24 18:46:33 +05:30
.drag-track {
2014-09-02 18:07:02 +05:30
display: block;
position: absolute;
2018-03-17 18:26:18 +05:30
top: 0;
2014-09-02 18:07:02 +05:30
left: 12px;
height: 10px;
width: 276px;
background: image-url('onion_skin_sprites.gif') -4px -20px repeat-x;
}
.dragger {
display: block;
position: absolute;
2016-06-02 11:05:42 +05:30
left: 0;
top: 0;
2014-09-02 18:07:02 +05:30
height: 14px;
width: 14px;
2016-06-02 11:05:42 +05:30
background: image-url('onion_skin_sprites.gif') 0 -34px repeat-x;
2014-09-02 18:07:02 +05:30
cursor: pointer;
}
.transparent {
display: block;
position: absolute;
top: 2px;
2016-06-02 11:05:42 +05:30
right: 0;
2014-09-02 18:07:02 +05:30
height: 10px;
width: 10px;
2016-06-02 11:05:42 +05:30
background: image-url('onion_skin_sprites.gif') -2px 0 no-repeat;
2014-09-02 18:07:02 +05:30
}
.opaque {
display: block;
position: absolute;
top: 2px;
2016-06-02 11:05:42 +05:30
left: 0;
2014-09-02 18:07:02 +05:30
height: 10px;
width: 10px;
background: image-url('onion_skin_sprites.gif') -2px -10px no-repeat;
}
}
2015-10-24 18:46:33 +05:30
}
//.view.onion-skin
2014-09-02 18:07:02 +05:30
}
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
.view-modes {
2014-09-02 18:07:02 +05:30
padding: 10px;
text-align: center;
2017-08-17 22:00:37 +05:30
background: $gray-darker;
2014-09-02 18:07:02 +05:30
2017-08-17 22:00:37 +05:30
ul,
li {
2014-09-02 18:07:02 +05:30
list-style: none;
margin: 0;
padding: 0;
display: inline-block;
}
2015-10-24 18:46:33 +05:30
li {
2017-08-17 22:00:37 +05:30
color: $diff-view-modes-color;
border-left: 1px solid $diff-view-modes-border;
2014-09-02 18:07:02 +05:30
padding: 0 12px 0 16px;
cursor: pointer;
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
&:first-child {
2018-03-17 18:26:18 +05:30
border-left: 0;
2014-09-02 18:07:02 +05:30
}
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
&:hover {
2014-09-02 18:07:02 +05:30
text-decoration: underline;
}
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
&.active {
2017-09-10 17:25:29 +05:30
cursor: default;
color: $gl-text-color;
2015-10-24 18:46:33 +05:30
&:hover {
2014-09-02 18:07:02 +05:30
text-decoration: none;
}
}
2016-11-03 12:29:30 +05:30
2015-10-24 18:46:33 +05:30
&.disabled {
2014-09-02 18:07:02 +05:30
display: none;
}
}
}
2018-03-17 18:26:18 +05:30
2018-11-08 19:23:39 +05:30
.diff-file-container {
.frame.deleted {
2018-12-13 13:39:08 +05:30
border: 1px solid $deleted;
2018-11-08 19:23:39 +05:30
background-color: inherit;
}
.frame.added {
2018-12-13 13:39:08 +05:30
border: 1px solid $added;
2018-11-08 19:23:39 +05:30
background-color: inherit;
}
.swipe.view,
.onion-skin.view {
.swipe-wrap {
top: 0;
2018-12-13 13:39:08 +05:30
left: 0;
2018-11-08 19:23:39 +05:30
}
.frame.deleted {
top: 0;
right: 0;
}
.swipe-bar {
top: 0;
.top-handle {
top: -14px;
left: -7px;
}
.bottom-handle {
bottom: -14px;
left: -7px;
}
}
.file-container {
display: inline-block;
.file-content {
padding: 0;
img {
max-width: none;
}
}
}
}
.onion-skin.view .controls {
bottom: -25px;
}
}
2018-12-13 13:39:08 +05:30
.discussion-notes .discussion-notes {
margin-left: 0;
border-left: 0;
}
2014-09-02 18:07:02 +05:30
}
2019-07-07 11:18:12 +05:30
table.code {
width: 100%;
font-family: $monospace-font;
border: 0;
border-collapse: separate;
margin: 0;
padding: 0;
table-layout: fixed;
border-radius: 0 0 $border-radius-default $border-radius-default;
tr.line_holder td {
line-height: $code-line-height;
font-size: $code-font-size;
vertical-align: top;
span {
white-space: pre-wrap;
&.context-cell {
display: inline-block;
width: 100%;
height: 100%;
}
&.line {
word-wrap: break-word;
}
}
&.diff-line-num {
user-select: none;
margin: 0;
padding: 0 10px 0 5px;
2019-07-31 22:56:46 +05:30
border-right-width: 1px;
border-right-style: solid;
2019-07-07 11:18:12 +05:30
text-align: right;
width: 50px;
position: relative;
a {
transition: none;
float: left;
width: 100%;
font-weight: $gl-font-weight-normal;
&[disabled] {
cursor: default;
&:hover,
&:active {
text-decoration: none;
}
}
}
&:not(.js-unfold-bottom) a::before {
content: attr(data-linenumber);
}
}
&.line_content {
display: block;
margin: 0;
padding: 0 1.5em;
border: 0;
position: relative;
white-space: pre-wrap;
&.parallel {
display: table-cell;
width: 46%;
span {
word-break: break-all;
}
}
&.old {
&::before {
content: '-';
position: absolute;
left: 0.5em;
}
}
&.new {
&::before {
content: '+';
position: absolute;
left: 0.5em;
}
}
}
}
&.left-side-selected {
td.line_content.parallel.right-side {
user-select: none;
}
}
&.right-side-selected {
td.line_content.parallel.left-side {
user-select: none;
}
}
}
2019-03-02 22:35:43 +05:30
.diff-stats {
align-items: center;
2019-07-07 11:18:12 +05:30
padding: 0 0.25rem;
2019-03-02 22:35:43 +05:30
.diff-stats-group {
2019-07-07 11:18:12 +05:30
padding: 0 0.25rem;
2019-03-02 22:35:43 +05:30
}
svg.diff-stats-icon {
vertical-align: text-bottom;
}
&.is-compare-versions-header {
.diff-stats-group {
2019-07-07 11:18:12 +05:30
padding: 0 0.5rem;
2019-03-02 22:35:43 +05:30
}
}
}
2014-09-02 18:07:02 +05:30
.file-content .diff-file {
margin: 0;
2018-03-17 18:26:18 +05:30
border: 0;
2015-04-26 12:48:37 +05:30
}
.diff-wrap-lines .line_content {
white-space: pre-wrap;
}
2015-09-25 12:07:36 +05:30
.inline-parallel-buttons {
float: right;
}
2015-10-24 18:46:33 +05:30
2016-06-02 11:05:42 +05:30
.files-changed {
2018-03-17 18:26:18 +05:30
border-bottom: 0;
2016-06-02 11:05:42 +05:30
}
2018-11-08 19:23:39 +05:30
.merge-request-details .file-content.image_file img {
max-height: 50vh;
}
2017-08-17 22:00:37 +05:30
.diff-stats-summary-toggler {
padding: 0;
background-color: transparent;
border: 0;
2018-11-20 20:47:30 +05:30
color: $blue-600;
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2017-08-17 22:00:37 +05:30
&:hover,
&:focus {
outline: none;
2018-11-20 20:47:30 +05:30
color: $blue-800;
2017-08-17 22:00:37 +05:30
}
2018-11-08 19:23:39 +05:30
.caret-icon {
position: relative;
top: 2px;
left: -1px;
}
2017-08-17 22:00:37 +05:30
}
2015-10-24 18:46:33 +05:30
// Mobile
@media (max-width: 480px) {
.diff-title {
margin: 0;
.file-mode {
display: none;
}
}
.diff-controls {
position: static;
text-align: center;
}
}
// Bigger screens
@media (min-width: 481px) {
.diff-title {
margin-right: 200px;
.file-mode {
margin-left: 10px;
}
}
.diff-controls {
float: right;
position: absolute;
top: 5px;
right: 15px;
}
}
2016-01-29 22:53:50 +05:30
2016-06-02 11:05:42 +05:30
.files {
.diff-file:last-child {
margin-bottom: 0;
}
}
2017-08-17 22:00:37 +05:30
.diff-comment-avatar-holders {
position: absolute;
height: 19px;
width: 19px;
margin-left: -15px;
2017-09-10 17:25:29 +05:30
z-index: 100;
2017-08-17 22:00:37 +05:30
&:hover {
.diff-comment-avatar,
.diff-comments-more-count {
@for $i from 1 through 4 {
$x-pos: 14px;
&:nth-child(#{$i}) {
@if $i == 4 {
$x-pos: 14.5px;
}
transform: translateX((($i * $x-pos) - $x-pos));
&:hover {
2017-09-10 17:25:29 +05:30
transform: translateX((($i * $x-pos) - $x-pos));
2017-08-17 22:00:37 +05:30
}
}
}
}
.diff-comments-more-count {
padding-left: 2px;
padding-right: 2px;
width: auto;
}
}
}
.diff-comment-avatar,
.diff-comments-more-count {
position: absolute;
left: 0;
width: 19px;
height: 19px;
margin-right: 0;
border-color: $white-light;
cursor: pointer;
2018-11-08 19:23:39 +05:30
transition: all 0.1s ease-out;
2017-08-17 22:00:37 +05:30
@for $i from 1 through 4 {
&:nth-child(#{$i}) {
z-index: (4 - $i);
}
}
}
.diff-comments-more-count {
width: 19px;
min-width: 19px;
padding-left: 0;
padding-right: 0;
overflow: hidden;
}
.diff-comments-more-count,
.diff-notes-collapse {
@extend .avatar-counter;
}
.diff-notes-collapse {
2018-03-17 18:26:18 +05:30
width: 24px;
height: 24px;
border-radius: 50%;
2017-08-17 22:00:37 +05:30
padding: 0;
2018-11-08 19:23:39 +05:30
transition: transform 0.1s ease-out;
2017-09-10 17:25:29 +05:30
z-index: 100;
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
.collapse-icon {
height: 50%;
width: 100%;
}
2017-08-17 22:00:37 +05:30
svg {
2018-03-17 18:26:18 +05:30
vertical-align: middle;
2017-08-17 22:00:37 +05:30
}
2018-03-17 18:26:18 +05:30
.collapse-icon,
2017-08-17 22:00:37 +05:30
path {
fill: $white-light;
}
&:focus {
outline: 0;
}
}
2017-09-10 17:25:29 +05:30
.diff-files-changed {
.inline-parallel-buttons {
position: relative;
z-index: 1;
}
.commit-stat-summary {
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(sm) {
2017-09-10 17:25:29 +05:30
margin-left: -$gl-padding;
padding-left: $gl-padding;
background-color: $white-light;
}
}
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(sm) {
2019-02-15 15:39:39 +05:30
position: -webkit-sticky;
position: sticky;
top: $header-height;
2017-09-10 17:25:29 +05:30
background-color: $white-light;
2019-02-15 15:39:39 +05:30
z-index: 200;
2017-09-10 17:25:29 +05:30
2019-02-15 15:39:39 +05:30
.with-performance-bar & {
top: $header-height + $performance-bar-height;
2017-09-10 17:25:29 +05:30
}
&.is-stuck {
padding-top: 0;
padding-bottom: 0;
2018-11-08 19:23:39 +05:30
border-top: 1px solid $white-dark;
2017-09-10 17:25:29 +05:30
border-bottom: 1px solid $white-dark;
.diff-stats-additions-deletions-expanded,
.inline-parallel-buttons {
2018-11-08 19:23:39 +05:30
display: none !important;
}
}
}
@include media-breakpoint-up(lg) {
&.is-stuck {
.diff-stats-additions-deletions-collapsed {
display: block !important;
2017-09-10 17:25:29 +05:30
}
2018-03-17 18:26:18 +05:30
}
}
}
2017-09-10 17:25:29 +05:30
.diff-file-changes {
2018-03-17 18:26:18 +05:30
max-width: 560px;
width: 100%;
2017-09-10 17:25:29 +05:30
z-index: 150;
2018-11-08 19:23:39 +05:30
min-height: $dropdown-min-height;
max-height: $dropdown-max-height;
overflow-y: auto;
margin-bottom: 0;
2017-09-10 17:25:29 +05:30
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(sm) {
2017-09-10 17:25:29 +05:30
left: $gl-padding;
}
2018-11-20 20:47:30 +05:30
.dropdown-input .dropdown-input-search {
pointer-events: all;
}
2018-03-17 18:26:18 +05:30
.diff-changed-file {
display: flex;
2017-09-10 17:25:29 +05:30
padding-top: 8px;
padding-bottom: 8px;
2018-03-17 18:26:18 +05:30
min-width: 0;
}
.diff-file-changed-icon {
margin-top: 2px;
}
.diff-changed-file-content {
display: flex;
flex-direction: column;
min-width: 0;
}
.diff-changed-file-name,
.diff-changed-blank-file-name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.diff-changed-blank-file-name {
color: $gl-text-color-tertiary;
font-style: italic;
}
.diff-changed-file-path {
color: $gl-text-color-tertiary;
}
.diff-changed-stats {
margin-left: auto;
white-space: nowrap;
2017-09-10 17:25:29 +05:30
}
}
.diff-file-changes-path {
2018-03-17 18:26:18 +05:30
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.note-container {
background-color: $gray-light;
border-top: 1px solid $white-normal;
// double jagged line divider
.discussion-notes + .discussion-notes::before,
2018-12-13 13:39:08 +05:30
.diff-file-discussions + .discussion-form::before {
2018-03-17 18:26:18 +05:30
content: '';
position: relative;
display: block;
width: 100%;
height: 10px;
background-color: $white-light;
2019-07-07 11:18:12 +05:30
background-image: linear-gradient(45deg,
transparent,
transparent 73%,
$diff-jagged-border-gradient-color 75%,
$white-light 80%),
linear-gradient(225deg,
transparent,
transparent 73%,
$diff-jagged-border-gradient-color 75%,
$white-light 80%),
linear-gradient(135deg,
transparent,
transparent 73%,
$diff-jagged-border-gradient-color 75%,
$white-light 80%),
linear-gradient(-45deg,
transparent,
transparent 73%,
$diff-jagged-border-gradient-color 75%,
$white-light 80%);
2018-11-08 19:23:39 +05:30
background-position: 5px 5px, 0 5px, 0 5px, 5px 5px;
2018-03-17 18:26:18 +05:30
background-size: 10px 10px;
background-repeat: repeat;
}
2018-12-13 13:39:08 +05:30
.diff-file-discussions + .discussion-form {
padding: $gl-padding;
&::before {
width: auto;
margin-left: -$gl-padding;
margin-right: -$gl-padding;
margin-bottom: $gl-padding;
}
}
2018-03-17 18:26:18 +05:30
.notes {
position: relative;
}
.diff-notes-collapse {
position: absolute;
left: -12px;
}
}
.diff-file .note-container > .new-note,
2018-12-13 13:39:08 +05:30
.note-container .discussion-notes.diff-discussions {
2018-03-17 18:26:18 +05:30
margin-left: 100px;
border-left: 1px solid $white-normal;
}
.notes.active {
.diff-file .note-container > .new-note,
.note-container .discussion-notes {
// Override our margin and border (set for diff tab)
// when user is on the discussion tab for MR
margin-left: inherit;
border-left: inherit;
}
}
2019-07-07 11:18:12 +05:30
.files:not([data-can-create-note='true']) .frame {
2018-03-17 18:26:18 +05:30
cursor: auto;
}
2018-12-13 13:39:08 +05:30
.frame,
.frame.click-to-comment,
.btn-transparent.image-diff-overlay-add-comment {
2018-03-17 18:26:18 +05:30
position: relative;
cursor: image-url('illustrations/image_comment_light_cursor.svg')
2019-07-07 11:18:12 +05:30
$image-comment-cursor-left-offset $image-comment-cursor-top-offset,
2018-11-08 19:23:39 +05:30
auto;
2018-03-17 18:26:18 +05:30
// Retina cursor
2019-07-07 11:18:12 +05:30
// scss-lint:disable DuplicateProperty
cursor: image-set(image-url('illustrations/image_comment_light_cursor.svg') 1x,
image-url('illustrations/image_comment_light_cursor@2x.svg') 2x)
$image-comment-cursor-left-offset $image-comment-cursor-top-offset,
2018-11-08 19:23:39 +05:30
auto;
2018-03-17 18:26:18 +05:30
.comment-indicator {
position: absolute;
padding: 0;
width: (2px * $image-comment-cursor-left-offset);
height: (2px * $image-comment-cursor-top-offset);
2019-02-15 15:39:39 +05:30
color: $blue-400;
2018-03-17 18:26:18 +05:30
// center the indicator to match the top left click region
margin-top: (-1px * $image-comment-cursor-top-offset) + 2;
margin-left: (-1px * $image-comment-cursor-left-offset) + 1;
svg {
width: 100%;
height: 100%;
}
&:focus {
outline: none;
}
}
}
2018-11-08 19:23:39 +05:30
.frame .badge.badge-pill,
.image-diff-avatar-link .badge.badge-pill,
2018-12-13 13:39:08 +05:30
.user-avatar-link .badge.badge-pill,
2018-11-08 19:23:39 +05:30
.notes > .badge.badge-pill {
2018-03-17 18:26:18 +05:30
position: absolute;
background-color: $blue-400;
color: $white-light;
border: $white-light 1px solid;
min-height: $gl-padding;
padding: 5px 8px;
border-radius: 12px;
&:focus {
outline: none;
}
}
2018-11-08 19:23:39 +05:30
.frame .badge.badge-pill,
2018-03-17 18:26:18 +05:30
.frame .image-comment-badge {
// Center align badges on the frame
transform: translate(-50%, -50%);
}
.image-comment-badge {
position: absolute;
width: 24px;
height: 24px;
padding: 0;
background: none;
border: 0;
> svg {
width: 100%;
height: 100%;
}
}
2018-12-13 13:39:08 +05:30
.image-diff-avatar-link,
.user-avatar-link {
2018-03-17 18:26:18 +05:30
position: relative;
2018-11-08 19:23:39 +05:30
.badge.badge-pill,
2018-03-17 18:26:18 +05:30
.image-comment-badge {
top: 25px;
right: 8px;
}
}
2018-11-08 19:23:39 +05:30
.notes > .badge.badge-pill {
2018-03-17 18:26:18 +05:30
display: none;
left: -13px;
}
.discussion-notes {
min-height: 35px;
&:first-child {
// First child does not have the jagged borders
min-height: 25px;
}
&.collapsed {
background-color: $white-light;
.diff-notes-collapse,
.note,
2018-11-08 19:23:39 +05:30
.discussion-reply-holder {
2018-03-17 18:26:18 +05:30
display: none;
}
2018-11-08 19:23:39 +05:30
.notes > .badge.badge-pill {
2018-03-17 18:26:18 +05:30
display: block;
}
}
}
.discussion-body .image .frame {
position: relative;
2017-09-10 17:25:29 +05:30
}
2018-12-05 23:21:45 +05:30
.diff-tree-list {
2019-07-07 11:18:12 +05:30
position: -webkit-sticky;
position: sticky;
$top-pos: $header-height + $mr-tabs-height + $mr-version-controls-height + 10px;
top: $header-height + $mr-tabs-height + $mr-version-controls-height + 10px;
max-height: calc(100vh - #{$top-pos});
padding-right: $gl-padding;
z-index: 202;
.with-performance-bar & {
$performance-bar-top-pos: $performance-bar-height + $top-pos;
top: $performance-bar-top-pos;
max-height: calc(100vh - #{$performance-bar-top-pos});
}
.drag-handle {
bottom: 16px;
transform: translateX(-6px);
}
2018-12-05 23:21:45 +05:30
}
.diff-files-holder {
flex: 1;
min-width: 0;
2019-07-07 11:18:12 +05:30
z-index: 201;
2018-12-05 23:21:45 +05:30
}
.compare-versions-container {
min-width: 0;
}
.tree-list-holder {
2019-07-07 11:18:12 +05:30
height: 100%;
2018-12-05 23:21:45 +05:30
.file-row {
margin-left: 0;
margin-right: 0;
}
}
.tree-list-scroll {
max-height: 100%;
padding-top: $grid-size;
padding-bottom: $grid-size;
border-top: 1px solid $border-color;
border-bottom: 1px solid $border-color;
overflow-y: scroll;
overflow-x: auto;
}
2018-12-13 13:39:08 +05:30
.tree-list-search {
flex: 0 0 34px;
.form-control {
padding-left: 30px;
}
2018-12-05 23:21:45 +05:30
}
.tree-list-icon {
top: 50%;
left: 10px;
transform: translateY(-50%);
&,
svg {
fill: $gl-text-color-tertiary;
}
}
.tree-list-clear-icon {
right: 10px;
left: auto;
line-height: 0;
}
@media (max-width: map-get($grid-breakpoints, md)-1) {
.diffs .files {
@include fixed-width-container;
flex-direction: column;
.diff-tree-list {
2019-07-07 11:18:12 +05:30
position: relative;
top: 0;
// !important is required to override inline styles of resizable sidebar
width: 100% !important;
2018-12-05 23:21:45 +05:30
}
.tree-list-holder {
max-height: calc(50px + 50vh);
padding-right: 0;
}
}
}
2018-12-13 13:39:08 +05:30
.image-diff-overlay,
.image-diff-overlay-add-comment {
top: 0;
left: 0;
&:active,
&:focus {
outline: 0;
}
}