Commit 759a38d6 authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch '33917-mr-comment-system-note-highlight-don-t-have-the-same-width' into 'master'

Resolve "MR comment + system note highlight don't have the same width"

Closes #33917

See merge request !12364
parents f85d0a00 b34b2990
...@@ -323,6 +323,7 @@ $note-disabled-comment-color: #b2b2b2; ...@@ -323,6 +323,7 @@ $note-disabled-comment-color: #b2b2b2;
$note-targe3-outside: #fffff0; $note-targe3-outside: #fffff0;
$note-targe3-inside: #ffffd3; $note-targe3-inside: #ffffd3;
$note-line2-border: #ddd; $note-line2-border: #ddd;
$note-icon-gutter-width: 55px;
/* /*
......
...@@ -148,8 +148,20 @@ ...@@ -148,8 +148,20 @@
padding: 6px 0; padding: 6px 0;
} }
.notes-form > li { .notes.notes-form > li.timeline-entry {
@include notes-media('max', $screen-sm-max) {
padding: 0;
}
.timeline-content {
@include notes-media('max', $screen-sm-max) {
margin: 0;
}
}
.timeline-entry-inner {
border: 0; border: 0;
}
} }
.note-edit-form { .note-edit-form {
......
...@@ -14,16 +14,6 @@ ul.notes { ...@@ -14,16 +14,6 @@ ul.notes {
margin: 0; margin: 0;
padding: 0; padding: 0;
.timeline-content {
margin-left: 55px;
&.timeline-content-form {
@include notes-media('max', $screen-sm-max) {
margin-left: 0;
}
}
}
.note-created-ago, .note-created-ago,
.note-updated-at { .note-updated-at {
white-space: nowrap; white-space: nowrap;
...@@ -46,15 +36,47 @@ ul.notes { ...@@ -46,15 +36,47 @@ ul.notes {
} }
} }
> li { > li { // .timeline-entry
padding: $gl-padding $gl-btn-padding; padding: 0;
display: block; display: block;
position: relative; position: relative;
border-bottom: 0;
@include notes-media('min', $screen-sm-min) {
padding-left: $note-icon-gutter-width;
}
.timeline-entry-inner {
padding: $gl-padding $gl-btn-padding;
border-bottom: 1px solid $white-normal; border-bottom: 1px solid $white-normal;
}
&:last-child { &:target,
// Override `.timeline > li:last-child { border-bottom: none; }` &.target {
border-bottom: 1px solid $white-normal; border-bottom: 1px solid $white-normal;
&:not(:first-child) {
border-top: 1px solid $white-normal;
margin-top: -1px;
}
.timeline-entry-inner {
border-bottom: 0;
}
}
.timeline-icon {
@include notes-media('min', $screen-sm-min) {
margin-left: -$note-icon-gutter-width;
}
}
.timeline-content {
margin-left: $note-icon-gutter-width;
@include notes-media('min', $screen-sm-min) {
margin-left: 0;
}
} }
&.being-posted { &.being-posted {
...@@ -73,7 +95,7 @@ ul.notes { ...@@ -73,7 +95,7 @@ ul.notes {
} }
&.note-discussion { &.note-discussion {
&.timeline-entry { .timeline-entry-inner {
padding: $gl-padding 10px; padding: $gl-padding 10px;
} }
} }
...@@ -152,13 +174,8 @@ ul.notes { ...@@ -152,13 +174,8 @@ ul.notes {
.system-note { .system-note {
font-size: 14px; font-size: 14px;
padding-left: 0;
clear: both; clear: both;
@include notes-media('min', $screen-sm-min) {
margin-left: 65px;
}
.note-header-info { .note-header-info {
padding-bottom: 0; padding-bottom: 0;
} }
...@@ -192,13 +209,16 @@ ul.notes { ...@@ -192,13 +209,16 @@ ul.notes {
.timeline-icon { .timeline-icon {
float: left; float: left;
@include notes-media('min', $screen-sm-min) {
margin-left: 0;
width: auto;
}
svg { svg {
width: 16px; width: 16px;
height: 16px; height: 16px;
fill: $gray-darkest; fill: $gray-darkest;
position: absolute; margin-top: 2px;
left: 0;
top: 2px;
} }
} }
...@@ -639,15 +659,12 @@ ul.notes { ...@@ -639,15 +659,12 @@ ul.notes {
.discussion-body, .discussion-body,
.diff-file { .diff-file {
.notes .note { .notes .note {
border-bottom: 1px solid $white-normal;
.timeline-entry-inner {
padding-left: $gl-padding; padding-left: $gl-padding;
padding-right: $gl-padding; padding-right: $gl-padding;
border-bottom: none;
&.system-note {
padding-left: 0;
@media (min-width: $screen-sm-min) {
margin-left: 70px;
}
} }
} }
} }
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
- if can_create_note? - if can_create_note?
%ul.notes.notes-form.timeline %ul.notes.notes-form.timeline
%li.timeline-entry %li.timeline-entry
.timeline-entry-inner
.flash-container.timeline-content .flash-container.timeline-content
.timeline-icon.hidden-xs.hidden-sm .timeline-icon.hidden-xs.hidden-sm
......
---
title: Standardize timeline note margins across different viewport sizes
merge_request: 12364
author:
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment