gitlab-org--gitlab-foss/app/assets/stylesheets/pages/notes.scss

283 lines
4.5 KiB
SCSS
Raw Normal View History

2012-02-26 17:41:53 -05:00
/**
* 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;
2016-02-29 10:45:49 -05:00
.timeline-icon {
float: left;
}
.timeline-content {
2016-02-29 10:55:50 -05:00
margin-left: 55px;
2016-02-29 10:45:49 -05:00
}
2016-02-29 11:01:28 -05:00
.note_created_ago, .note-updated-at {
2016-02-29 10:49:48 -05:00
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";
}
2015-05-14 06:18:19 -04:00
a {
color: $gl-gray;
2015-05-14 06:18:19 -04:00
&:hover {
text-decoration: underline;
}
}
}
.author {
color: #4c4e54;
margin-right: 3px;
&:hover {
2015-03-06 23:02:34 -05:00
color: $gl-link-color;
}
}
.author-username {
}
2015-05-12 06:16:34 -04:00
.note-role {
float: right;
2015-05-14 06:18:19 -04:00
margin-top: 1px;
2015-05-12 06:16:34 -04:00
border: 1px solid #bbb;
background-color: transparent;
color: $gl-gray;
2015-05-12 06:16:34 -04:00
}
}
.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;
2016-03-17 09:18:16 -04:00
// 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;
2015-04-29 20:36:12 -04:00
}
}
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
2015-03-26 02:21:13 -04:00
.discussion-body .diff-file {
.diff-header > span {
margin-right: 10px;
}
.line_content {
white-space: pre-wrap;
}
}
.diff-file .notes_holder {
font-family: $regular_font;
2012-11-20 11:46:55 -05:00
td {
border: 1px solid #ddd;
border-left: none;
&.notes_line {
2016-02-29 11:02:57 -05:00
vertical-align: middle;
2012-11-20 11:46:55 -05:00
text-align: center;
padding: 10px 0;
background: #fff;
2016-01-25 05:42:47 -05:00
color: $text-color;
2012-11-20 11:46:55 -05:00
}
&.notes_line2 {
text-align: center;
padding: 10px 0;
border-left: 1px solid #ddd !important;
}
2012-11-20 11:46:55 -05:00
&.notes_content {
background-color: #fff;
2012-11-20 11:46:55 -05:00
border-width: 1px 0;
padding-top: 0;
vertical-align: top;
2014-09-12 12:43:44 -04:00
&.parallel{
border-width: 1px;
}
2012-11-20 11:46:55 -05:00
}
}
}
/**
2012-12-03 15:43:17 -05:00
* Actions for Discussions/Notes
*/
2012-12-03 15:43:17 -05:00
.discussion,
.note {
.discussion-actions,
.note-actions {
float: right;
2015-05-14 06:18:19 -04:00
margin-left: 10px;
a {
2015-05-12 06:16:34 -04:00
margin-left: 5px;
color: $gl-gray;
2015-05-14 06:18:19 -04:00
i.fa {
font-size: 16px;
line-height: 16px;
}
&:hover {
2015-05-14 06:18:19 -04:00
@extend .cgray;
&.danger { @extend .cred; }
}
}
}
}
.diff-file .note .note-actions {
right: 0;
top: 0;
2011-11-12 06:04:43 -05:00
}
2012-09-12 20:12:44 -04:00
2012-11-20 11:46:55 -05:00
/**
2012-12-03 15:43:17 -05:00
* Line note button on the side of diffs
2012-11-20 11:46:55 -05:00
*/
2012-12-03 15:43:17 -05:00
.diff-file tr.line_holder {
2014-09-19 10:16:45 -04:00
@mixin show-add-diff-note {
filter: alpha(opacity=100);
opacity: 1.0;
}
2012-11-20 11:46:55 -05:00
.add-diff-note {
margin-top: -4px;
@include border-radius(40px);
background: #fff;
padding: 4px;
font-size: 16px;
2015-03-06 23:02:34 -05:00
color: $gl-link-color;
margin-left: -60px;
position: absolute;
z-index: 10;
width: 32px;
transition: all 0.2s ease;
// "hide" it by default
2012-11-20 11:46:55 -05:00
opacity: 0.0;
filter: alpha(opacity=0);
2012-11-20 11:46:55 -05:00
&:hover {
background: $gl-info;
color: #fff;
2014-09-19 10:16:45 -04:00
@include show-add-diff-note;
2012-11-20 11:46:55 -05:00
}
}
// "show" the icon also if we just hover somewhere over the line
2012-11-20 11:46:55 -05:00
&:hover > td {
.add-diff-note {
2014-09-19 10:16:45 -04:00
@include show-add-diff-note;
}
2012-07-10 13:15:33 -04:00
}
}