Round the file title; Add top border to conflict diffs

The file title sometimes overflows its container, which has the same
border-radius. By always rounding the file title, the overflow never
happens, so the corners always look correct.

Everywhere else there are file diffs, there is a top border to complete
the full border around the file.
This commit is contained in:
Thomas Randolph 2019-08-27 19:30:21 +00:00 committed by Clement Ho
parent 4eecb0ad96
commit 98949a13b0
2 changed files with 33 additions and 0 deletions

View file

@ -2,8 +2,14 @@
.diff-file {
margin-bottom: $gl-padding;
&.conflict {
border-top: 1px solid $border-color;
}
.file-title,
.file-title-flex-parent {
border-top-left-radius: $border-radius-default;
border-top-right-radius: $border-radius-default;
cursor: pointer;
@media (min-width: map-get($grid-breakpoints, md)) {
@ -67,6 +73,28 @@
}
}
@media (min-width: map-get($grid-breakpoints, md)) {
&.conflict .file-title,
&.conflict .file-title-flex-parent {
top: $header-height;
}
.with-performance-bar &.conflict .file-title,
.with-performance-bar &.conflict .file-title-flex-parent {
top: $header-height + $performance-bar-height;
}
.with-system-header &.conflict .file-title,
.with-system-header &.conflict .file-title-flex-parent {
top: $header-height + $system-header-height;
}
.with-system-header.with-performance-bar &.conflict .file-title,
.with-system-header.with-performance-bar &.conflict .file-title-flex-parent {
top: $header-height + $performance-bar-height + $system-header-height;
}
}
.diff-content {
background: $white-light;
color: $gl-text-color;

View file

@ -0,0 +1,5 @@
---
title: Fix file header style and position during scroll in a merge conflict resolution
merge_request: 31991
author:
type: fixed