debian-mirror-gitlab/app/assets/stylesheets/pages/notes.scss
2016-02-05 20:25:01 +05:30

250 lines
4 KiB
SCSS

/**
* Notes
*/
@-webkit-keyframes targe3-note {
from { background:#fffff0; }
50% { background:#ffffd3; }
to { background:#fffff0; }
}
ul.notes {
display: block;
list-style: none;
margin: 0px;
padding: 0px;
.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;
.note-body {
overflow: auto;
.note-text {
overflow: auto;
word-wrap: break-word;
@include md-typography;
// 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 {
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;
}
}
}