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

466 lines
7.3 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-03-30 05:04:21 -04:00
&.timeline-content-form {
@media (max-width: $screen-sm-max) {
margin-left: 0;
}
}
2016-02-29 10:45:49 -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-body & {
visibility: visible;
}
}
}
}
.discussion-body {
padding-top: 15px;
}
.discussion {
overflow: hidden;
display: block;
position: relative;
}
.note {
display: block;
position: relative;
2016-04-01 15:27:39 -04:00
border-bottom: 1px solid $table-border-gray;
&.is-editting {
.note-header,
.note-text,
.edited-text {
display: none;
}
.note-edit-form {
display: block;
2016-05-30 12:33:43 -04:00
&.current-note-edit-form + .note-awards {
display: none;
}
}
}
.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
@include bulleted-list;
ul.task-list {
ul:not(.task-list) {
padding-left: 1.3em;
2015-04-29 20:36:12 -04:00
}
}
}
}
2016-05-30 12:33:43 -04:00
.note-awards {
.js-awards-block {
2016-05-31 15:32:29 -04:00
padding: 2px;
2016-05-30 12:33:43 -04:00
margin-top: 10px;
}
.award-control {
font-size: 13px;
padding: 2px 5px;
}
}
.note-header {
padding-bottom: 3px;
padding-right: 20px;
@media (min-width: $screen-sm-min) {
padding-right: 0;
}
2016-06-13 12:52:34 -04:00
@media (max-width: $screen-xs-min) {
.inline {
display: block;
}
}
}
2016-05-26 05:15:20 -04:00
.note-emoji-button {
.fa-spinner {
display: none;
}
&.is-loading {
.fa-smile-o {
display: none;
}
.fa-spinner {
display: inline-block;
}
}
}
}
}
// 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 {
2016-04-20 12:48:24 -04:00
white-space: pre-wrap;
2015-03-26 02:21:13 -04:00
}
}
.diff-file .notes_holder {
font-family: $regular_font;
2012-11-20 11:46:55 -05:00
td {
2016-04-01 15:27:39 -04:00
border: 1px solid $table-border-gray;
2012-11-20 11:46:55 -05:00
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;
2016-04-01 15:27:39 -04:00
background: $background-color;
2016-01-25 05:42:47 -05:00
color: $text-color;
2012-11-20 11:46:55 -05:00
}
2016-04-11 11:00:45 -04:00
&.notes_line2 {
text-align: center;
padding: 10px 0;
border-left: 1px solid #ddd !important;
}
2016-04-11 11:00:45 -04:00
2012-11-20 11:46:55 -05:00
&.notes_content {
2016-04-11 11:00:45 -04:00
background-color: $background-color;
2012-11-20 11:46:55 -05:00
border-width: 1px 0;
2016-03-30 11:20:43 -04:00
padding: 0;
vertical-align: top;
white-space: normal;
2016-04-11 11:00:45 -04:00
&.parallel {
2014-09-12 12:43:44 -04:00
border-width: 1px;
}
2016-04-11 11:00:45 -04:00
.notes {
background-color: $white-light;
}
2016-05-06 10:21:04 -04:00
a code {
top: 0;
margin-right: 0;
}
2012-11-20 11:46:55 -05:00
}
}
}
.discussion-header,
.note-header {
position: relative;
a {
color: inherit;
&:hover {
color: $gl-link-color;
text-decoration: none;
}
}
.author_link {
color: $gl-gray;
}
}
.note-headline-light,
.discussion-headline-light {
2016-03-30 03:48:39 -04:00
color: $notes-light-color;
}
.discussion-headline-light {
a {
color: $gl-link-color;
}
}
/**
2012-12-03 15:43:17 -05:00
* Actions for Discussions/Notes
*/
2012-12-03 15:43:17 -05:00
.discussion-actions,
.note-actions {
float: right;
margin-left: 10px;
2016-03-30 03:48:39 -04:00
color: $notes-action-color;
}
.note-actions {
position: absolute;
right: 0;
top: 0;
2016-06-13 12:52:34 -04:00
.note-action-button {
margin-left: 10px;
}
@media (min-width: $screen-sm-min) {
position: relative;
}
}
2016-04-14 09:56:05 -04:00
.discussion-actions {
@media (max-width: $screen-md-max) {
2016-04-14 09:56:05 -04:00
float: none;
margin-left: 0;
.note-action-button {
margin-left: 0;
}
}
}
2016-05-10 18:41:46 -04:00
.note-action-button {
display: inline-block;
margin-left: 0;
line-height: 20px;
@media (min-width: $screen-sm-min) {
margin-left: 10px;
line-height: 24px;
}
2015-05-14 06:18:19 -04:00
.fa {
2016-04-01 15:27:39 -04:00
color: $notes-action-color;
2016-03-31 11:18:45 -04:00
position: relative;
top: 1px;
font-size: 17px;
}
2016-04-01 15:27:39 -04:00
&.js-note-delete {
i {
&:hover {
color: $gl-text-red;
}
}
}
&.js-note-edit {
i {
&:hover {
color: $gl-link-color;
}
}
}
}
.discussion-toggle-button {
line-height: 20px;
font-size: 13px;
.fa {
margin-right: 3px;
font-size: 10px;
line-height: 18px;
vertical-align: top;
}
}
.note-role {
position: relative;
top: -2px;
display: inline-block;
padding-left: 4px;
padding-right: 4px;
2016-03-31 11:18:45 -04:00
color: $notes-role-color;
font-size: 12px;
line-height: 20px;
2016-03-30 03:48:39 -04:00
border: 1px solid $notes-role-border-color;
border-radius: $border-radius-base;
}
.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 {
display: inline-block;
2014-09-19 10:16:45 -04:00
}
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: -56px;
position: absolute;
z-index: 10;
width: 32px;
// "hide" it by default
display: none;
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
}
}
2016-04-04 06:00:29 -04:00
.disabled-comment {
margin-left: -$gl-padding-top;
margin-right: -$gl-padding-top;
background-color: $gray-light;
border-radius: $border-radius-base;
border: 1px solid $border-gray-normal;
color: $note-disabled-comment-color;
line-height: 200px;
.disabled-comment-text {
line-height: normal;
}
a {
color: $gl-link-color;
}
}
2016-06-30 12:21:57 -04:00
2016-07-27 04:27:00 -04:00
.line-resolve-all-container {
.btn-group {
margin-top: -1px;
margin-left: -4px;
}
.discussion-next-btn {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
2016-06-30 12:21:57 -04:00
.line-resolve-all {
2016-07-27 04:27:00 -04:00
display: inline-block;
padding: 5px 10px;
background-color: $background-color;
2016-06-30 12:21:57 -04:00
border: 1px solid $border-color;
border-radius: $border-radius-default;
2016-06-30 12:21:57 -04:00
2016-07-27 04:27:00 -04:00
&.has-next-btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.line-resolve-btn {
top: 1px;
margin-right: 5px;
.fa {
left: 2px;
}
2016-06-30 12:21:57 -04:00
}
}
.line-resolve-text {
vertical-align: middle;
}
.line-resolve-btn {
2016-07-27 04:27:00 -04:00
display: inline-block;
2016-06-30 12:21:57 -04:00
position: relative;
top: -1px;
width: 14px;
height: 14px;
padding: 0;
background-color: transparent;
border: 1px solid #c3c3c3;
border-radius: 50%;
outline: 0;
vertical-align: middle;
&.is-disabled {
cursor: default;
}
&:not(.is-disabled):hover,
2016-06-30 12:21:57 -04:00
&.is-active {
2016-07-27 04:27:00 -04:00
color: $gl-text-green;
2016-06-30 12:21:57 -04:00
border-color: $gl-text-green;
.fa {
2016-07-27 04:27:00 -04:00
color: $gl-text-green;
2016-06-30 12:21:57 -04:00
}
}
.fa {
2016-07-27 04:27:00 -04:00
position: relative;
2016-06-30 12:21:57 -04:00
top: 2px;
font-size: 8px;
color: $notes-action-color;
2016-06-30 12:21:57 -04:00
vertical-align: top;
}
}
2016-07-27 04:27:00 -04:00
.discussion-next-btn {
path {
fill: $gray-darkest;
2016-07-27 04:27:00 -04:00
}
}