gitlab-org--gitlab-foss/app/assets/stylesheets/pages/notes.scss
Phil Hughes 7dde8b2cf0 Fix spacing below edit note form
Also changed to allow the CSS to decide what should be hidden when editting
2016-03-18 17:23:54 +00:00

282 lines
4.5 KiB
SCSS

/**
* Notes
*/
@-webkit-keyframes targe3-note {
from { background: #fffff0; }
50% { background: #ffffd3; }
to { background: #fffff0; }
}
ul.notes {
display: block;
list-style: none;
margin: 0;
padding: 0;
.timeline-icon {
float: left;
}
.timeline-content {
margin-left: 55px;
}
.note_created_ago, .note-updated-at {
white-space: nowrap;
}
.system-note {
font-size: 14px;
padding-top: 10px;
padding-bottom: 10px;
background: #fdfdfd;
.timeline-icon {
.avatar {
visibility: hidden;
}
}
}
.discussion-header,
.note-header {
@extend .cgray;
a:hover {
text-decoration: none;
}
.avatar {
float: left;
margin-right: 10px;
}
.discussion-last-update,
.note-last-update {
&:before {
content: "\00b7";
}
a {
color: $gl-gray;
&:hover {
text-decoration: underline;
}
}
}
.author {
color: #4c4e54;
margin-right: 3px;
&:hover {
color: $gl-link-color;
}
}
.author-username {
}
.note-role {
float: right;
margin-top: 1px;
border: 1px solid #bbb;
background-color: transparent;
color: $gl-gray;
}
}
.discussion-body {
padding-top: 15px;
}
.discussion {
overflow: hidden;
display: block;
position: relative;
}
.note {
display: block;
position: relative;
&.is-editting {
.note-header,
.note-text,
.edited-text {
display: none;
}
.note-edit-form {
display: block;
}
}
.note-body {
overflow: auto;
.note-text {
overflow: auto;
word-wrap: break-word;
@include md-typography;
// On diffs code should wrap nicely and not overflow
pre {
code {
white-space: pre-wrap;
}
}
// Reset ul style types since we're nested inside a ul already
& > ul {
list-style-type: disc;
ul {
list-style-type: circle;
ul {
list-style-type: square;
}
}
}
ul.task-list {
ul:not(.task-list) {
padding-left: 1.3em;
}
}
hr {
// Darken 'whitesmoke' a bit to make it more visible in note bodies
border-color: darken(#f5f5f5, 8%);
margin: 10px 0;
}
}
}
.note-header {
padding-bottom: 3px;
}
&:last-child {
border-bottom: 1px solid $border-color;
}
}
}
// Diff code in discussion view
.discussion-body .diff-file {
.diff-header > span {
margin-right: 10px;
}
.line_content {
white-space: pre-wrap;
}
}
.diff-file .notes_holder {
font-family: $regular_font;
td {
border: 1px solid #ddd;
border-left: none;
&.notes_line {
vertical-align: middle;
text-align: center;
padding: 10px 0;
background: #fff;
color: $text-color;
}
&.notes_line2 {
text-align: center;
padding: 10px 0;
border-left: 1px solid #ddd !important;
}
&.notes_content {
background-color: #fff;
border-width: 1px 0;
padding-top: 0;
vertical-align: top;
&.parallel{
border-width: 1px;
}
}
}
}
/**
* Actions for Discussions/Notes
*/
.discussion,
.note {
.discussion-actions,
.note-actions {
float: right;
margin-left: 10px;
a {
margin-left: 5px;
color: $gl-gray;
i.fa {
font-size: 16px;
line-height: 16px;
}
&:hover {
@extend .cgray;
&.danger { @extend .cred; }
}
}
}
}
.diff-file .note .note-actions {
right: 0;
top: 0;
}
/**
* Line note button on the side of diffs
*/
.diff-file tr.line_holder {
@mixin show-add-diff-note {
filter: alpha(opacity=100);
opacity: 1.0;
}
.add-diff-note {
margin-top: -4px;
@include border-radius(40px);
background: #fff;
padding: 4px;
font-size: 16px;
color: $gl-link-color;
margin-left: -60px;
position: absolute;
z-index: 10;
width: 32px;
transition: all 0.2s ease;
// "hide" it by default
opacity: 0.0;
filter: alpha(opacity=0);
&:hover {
background: $gl-info;
color: #fff;
@include show-add-diff-note;
}
}
// "show" the icon also if we just hover somewhere over the line
&:hover > td {
.add-diff-note {
@include show-add-diff-note;
}
}
}