debian-mirror-gitlab/app/assets/stylesheets/pages/notes.scss

757 lines
12 KiB
SCSS
Raw Normal View History

2015-04-26 12:48:37 +05:30
/**
* Notes
*/
@-webkit-keyframes targe3-note {
2017-08-17 22:00:37 +05:30
from { background: $note-targe3-outside; }
50% { background: $note-targe3-inside; }
to { background: $note-targe3-outside; }
2015-04-26 12:48:37 +05:30
}
ul.notes {
display: block;
list-style: none;
2016-06-02 11:05:42 +05:30
margin: 0;
padding: 0;
.timeline-icon {
float: left;
2017-08-17 22:00:37 +05:30
svg {
width: 16px;
height: 16px;
fill: $gray-darkest;
position: absolute;
left: 0;
top: 16px;
}
2016-06-02 11:05:42 +05:30
}
.timeline-content {
margin-left: 55px;
&.timeline-content-form {
@media (max-width: $screen-sm-max) {
margin-left: 0;
}
}
}
2017-08-17 22:00:37 +05:30
.note-created-ago,
.note-updated-at {
2016-06-02 11:05:42 +05:30
white-space: nowrap;
}
2015-04-26 12:48:37 +05:30
2017-08-17 22:00:37 +05:30
.discussion-body {
padding-top: 8px;
2016-08-24 12:49:21 +05:30
2017-08-17 22:00:37 +05:30
.panel {
margin-bottom: 0;
2015-09-25 12:07:36 +05:30
}
}
2015-04-26 12:48:37 +05:30
.discussion {
overflow: hidden;
display: block;
2016-06-02 11:05:42 +05:30
position: relative;
2015-04-26 12:48:37 +05:30
}
.note {
2017-08-17 22:00:37 +05:30
padding: $gl-padding $gl-btn-padding 0;
2015-04-26 12:48:37 +05:30
display: block;
2016-06-02 11:05:42 +05:30
position: relative;
2017-08-17 22:00:37 +05:30
border-bottom: 1px solid $white-normal;
&.being-posted {
pointer-events: none;
opacity: 0.5;
.dummy-avatar {
display: inline-block;
height: 40px;
width: 40px;
border-radius: 50%;
background-color: $kdb-border;
border: 1px solid darken($kdb-border, 25%);
}
.note-headline-light,
.fa-spinner {
margin-left: 3px;
}
}
&.note-discussion {
&.timeline-entry {
padding: $gl-padding 10px;
}
.system-note {
padding: 0;
}
}
2016-06-02 11:05:42 +05:30
2017-08-17 22:00:37 +05:30
&.is-editing {
2016-06-02 11:05:42 +05:30
.note-header,
.note-text,
.edited-text {
display: none;
}
.note-edit-form {
display: block;
&.current-note-edit-form + .note-awards {
display: none;
}
2016-06-02 11:05:42 +05:30
}
}
2015-09-11 14:41:01 +05:30
2015-04-26 12:48:37 +05:30
.note-body {
2017-08-17 22:00:37 +05:30
overflow-x: auto;
overflow-y: hidden;
2015-09-11 14:41:01 +05:30
2015-04-26 12:48:37 +05:30
.note-text {
word-wrap: break-word;
@include md-typography;
2016-06-22 15:30:34 +05:30
// Reset ul style types since we're nested inside a ul already
@include bulleted-list;
2015-12-23 02:04:40 +05:30
ul.task-list {
ul:not(.task-list) {
padding-left: 1.3em;
2015-09-11 14:41:01 +05:30
}
}
2017-08-17 22:00:37 +05:30
table {
@include markdown-table;
}
2015-04-26 12:48:37 +05:30
}
}
2015-09-11 14:41:01 +05:30
.note-awards {
.js-awards-block {
2017-08-17 22:00:37 +05:30
margin-bottom: 16px;
}
}
2015-04-26 12:48:37 +05:30
.note-header {
2016-06-22 15:30:34 +05:30
@media (max-width: $screen-xs-min) {
.inline {
display: block;
}
}
}
.note-emoji-button {
2017-08-17 22:00:37 +05:30
position: relative;
line-height: 1;
.fa-spinner {
display: none;
}
&.is-loading {
.fa-smile-o {
display: none;
}
.fa-spinner {
display: inline-block;
}
}
2015-04-26 12:48:37 +05:30
}
2017-08-17 22:00:37 +05:30
}
.system-note {
font-size: 14px;
padding: 0;
clear: both;
@media (min-width: $screen-sm-min) {
margin-left: 65px;
}
.note-header-info {
padding-bottom: 0;
}
&.timeline-entry::after {
clear: none;
}
.system-note-message {
display: inline;
&::first-letter {
text-transform: lowercase;
}
a {
color: $gl-link-color;
text-decoration: none;
}
p {
display: inline;
margin: 0;
&::first-letter {
text-transform: lowercase;
}
}
}
.timeline-content {
padding: 14px 10px;
2015-04-26 12:48:37 +05:30
2017-08-17 22:00:37 +05:30
@media (min-width: $screen-sm-min) {
margin-left: 20px;
}
}
.note-header {
padding-bottom: 0;
}
.note-body {
overflow: hidden;
.system-note-commit-list-toggler {
color: $gl-link-color;
display: none;
padding: 10px 0 0;
cursor: pointer;
position: relative;
z-index: 2;
&:hover {
color: $gl-link-color;
text-decoration: underline;
}
}
.note-text {
& p:first-child {
display: none;
}
&.system-note-commit-list {
max-height: 70px;
overflow: hidden;
display: block;
ul {
margin: 3px 0 3px 16px !important;
.gfm-commit {
font-family: $monospace_font;
font-size: 12px;
}
}
p:first-child {
display: none;
}
&::after {
content: '';
width: 100%;
height: 67px;
position: absolute;
left: 0;
bottom: 0;
background: linear-gradient(rgba($white-light, 0.1) -100px, $white-light 100%);
}
&.hide-shade {
max-height: 100%;
overflow: auto;
&::after {
display: none;
background: transparent;
}
}
}
}
}
2015-04-26 12:48:37 +05:30
}
}
// Diff code in discussion view
.discussion-body .diff-file {
2016-11-03 12:29:30 +05:30
.file-title {
cursor: default;
&:hover {
background-color: $gray-light;
}
}
2015-04-26 12:48:37 +05:30
.diff-header > span {
margin-right: 10px;
}
2016-11-03 12:29:30 +05:30
2015-04-26 12:48:37 +05:30
.line_content {
white-space: pre-wrap;
}
}
.diff-file .notes_holder {
font-family: $regular_font;
td {
2017-08-17 22:00:37 +05:30
border: 1px solid $white-normal;
2015-04-26 12:48:37 +05:30
border-left: none;
&.notes_line {
2016-06-02 11:05:42 +05:30
vertical-align: middle;
2015-04-26 12:48:37 +05:30
text-align: center;
padding: 10px 0;
2017-08-17 22:00:37 +05:30
background: $gray-light;
2016-02-05 20:25:01 +05:30
color: $text-color;
2015-04-26 12:48:37 +05:30
}
2016-06-02 11:05:42 +05:30
2015-04-26 12:48:37 +05:30
&.notes_line2 {
text-align: center;
padding: 10px 0;
2017-08-17 22:00:37 +05:30
border-left: 1px solid $note-line2-border !important;
2015-04-26 12:48:37 +05:30
}
2016-06-02 11:05:42 +05:30
2015-04-26 12:48:37 +05:30
&.notes_content {
2017-08-17 22:00:37 +05:30
background-color: $gray-light;
2015-04-26 12:48:37 +05:30
border-width: 1px 0;
2016-06-02 11:05:42 +05:30
padding: 0;
2015-04-26 12:48:37 +05:30
vertical-align: top;
2016-06-02 11:05:42 +05:30
white-space: normal;
&.parallel {
2015-04-26 12:48:37 +05:30
border-width: 1px;
}
2016-06-02 11:05:42 +05:30
2017-08-17 22:00:37 +05:30
.discussion-notes {
&:not(:first-child) {
border-top: 1px solid $white-normal;
margin-top: 20px;
}
&:not(:last-child) {
border-bottom: 1px solid $white-normal;
margin-bottom: 20px;
}
}
2016-06-02 11:05:42 +05:30
.notes {
background-color: $white-light;
}
a code {
top: 0;
margin-right: 0;
}
}
}
}
.discussion-header,
.note-header {
position: relative;
2016-06-02 11:05:42 +05:30
a {
color: inherit;
&:hover {
color: $gl-link-color;
2017-08-17 22:00:37 +05:30
}
&:focus,
&:hover {
2016-06-02 11:05:42 +05:30
text-decoration: none;
2015-04-26 12:48:37 +05:30
}
}
2016-06-02 11:05:42 +05:30
.author_link {
2017-08-17 22:00:37 +05:30
color: $gl-text-color;
}
}
.discussion-header {
font-size: 14px;
}
.note-header {
display: flex;
justify-content: space-between;
@media (max-width: $screen-xs-max) {
flex-flow: row wrap;
}
}
.note-header-info {
min-width: 0;
padding-bottom: 8px;
}
.note-header-author-name {
@media (max-width: $screen-xs-max) {
display: none;
}
}
.note-headline-light {
display: inline;
@media (max-width: $screen-xs-min) {
display: block;
2016-06-02 11:05:42 +05:30
}
}
.note-headline-light,
.discussion-headline-light {
color: $notes-light-color;
}
.discussion-headline-light {
a {
color: $gl-link-color;
}
2015-04-26 12:48:37 +05:30
}
2017-08-17 22:00:37 +05:30
.note-headline-meta {
display: inline-block;
white-space: nowrap;
.system-note-message {
white-space: normal;
}
}
2015-04-26 12:48:37 +05:30
/**
* Actions for Discussions/Notes
*/
2017-08-17 22:00:37 +05:30
.discussion-actions {
2016-06-02 11:05:42 +05:30
float: right;
margin-left: 10px;
2017-08-17 22:00:37 +05:30
color: $gray-darkest;
2016-06-02 11:05:42 +05:30
}
.note-actions {
2017-08-17 22:00:37 +05:30
flex-shrink: 0;
// For PhantomJS that does not support flex
float: right;
margin-left: 10px;
color: $gray-darkest;
2016-06-22 15:30:34 +05:30
2017-08-17 22:00:37 +05:30
@media (max-width: $screen-xs-max) {
float: none;
margin-left: 0;
2016-06-22 15:30:34 +05:30
}
2017-08-17 22:00:37 +05:30
.note-action-button {
margin-left: 8px;
}
}
2016-06-02 11:05:42 +05:30
.discussion-actions {
@media (max-width: $screen-md-max) {
float: none;
margin-left: 0;
.note-action-button {
margin-left: 0;
}
}
}
2015-04-26 12:48:37 +05:30
2016-06-02 11:05:42 +05:30
.note-action-button {
2017-08-17 22:00:37 +05:30
display: inline;
line-height: 20px;
@media (min-width: $screen-sm-min) {
margin-left: 10px;
line-height: 24px;
}
2015-09-11 14:41:01 +05:30
2016-06-02 11:05:42 +05:30
.fa {
2017-08-17 22:00:37 +05:30
color: $gray-darkest;
2016-06-02 11:05:42 +05:30
position: relative;
font-size: 17px;
}
2017-08-17 22:00:37 +05:30
svg {
height: 16px;
width: 16px;
fill: $gray-darkest;
vertical-align: text-top;
}
.award-control-icon-positive,
.award-control-icon-super-positive {
position: absolute;
top: 0;
left: 0;
opacity: 0;
}
&:hover,
&.is-active {
2016-09-29 09:46:39 +05:30
.danger-highlight {
color: $gl-text-red;
2016-06-02 11:05:42 +05:30
}
2015-04-26 12:48:37 +05:30
2016-09-29 09:46:39 +05:30
.link-highlight {
color: $gl-link-color;
2017-08-17 22:00:37 +05:30
svg {
fill: $gl-link-color;
}
}
.award-control-icon-neutral {
opacity: 0;
}
.award-control-icon-positive {
opacity: 1;
}
}
&.is-active {
.award-control-icon-positive {
opacity: 0;
}
.award-control-icon-super-positive {
opacity: 1;
2015-04-26 12:48:37 +05:30
}
}
}
2016-06-02 11:05:42 +05:30
.discussion-toggle-button {
2017-08-17 22:00:37 +05:30
padding: 0;
background-color: transparent;
border: 0;
2016-06-02 11:05:42 +05:30
line-height: 20px;
font-size: 13px;
2017-08-17 22:00:37 +05:30
transition: color 0.1s linear;
&:hover {
color: $gl-link-color;
}
&:focus {
text-decoration: underline;
outline: none;
color: $gl-link-color;
}
2016-06-02 11:05:42 +05:30
.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;
color: $notes-role-color;
font-size: 12px;
line-height: 20px;
2017-08-17 22:00:37 +05:30
border: 1px solid $border-color;
2016-06-02 11:05:42 +05:30
border-radius: $border-radius-base;
}
2015-04-26 12:48:37 +05:30
/**
* Line note button on the side of diffs
*/
2017-08-17 22:00:37 +05:30
.add-diff-note {
display: none;
margin-top: -2px;
border-radius: 50%;
background: $white-light;
padding: 1px 5px;
font-size: 12px;
color: $blue-500;
margin-left: -55px;
position: absolute;
z-index: 10;
width: 23px;
height: 23px;
border: 1px solid $blue-500;
transition: transform .1s ease-in-out;
2015-04-26 12:48:37 +05:30
2017-08-17 22:00:37 +05:30
&:hover {
background: $blue-500;
border-color: $blue-600;
color: $white-light;
transform: scale(1.15);
}
2016-11-03 12:29:30 +05:30
2017-08-17 22:00:37 +05:30
&:active {
outline: 0;
2015-04-26 12:48:37 +05:30
}
2017-08-17 22:00:37 +05:30
}
2015-04-26 12:48:37 +05:30
2017-08-17 22:00:37 +05:30
.diff-file {
.is-over {
2015-04-26 12:48:37 +05:30
.add-diff-note {
2017-08-17 22:00:37 +05:30
display: inline-block;
2015-04-26 12:48:37 +05:30
}
}
}
2016-06-02 11:05:42 +05:30
.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-09-13 17:45:13 +05:30
.line-resolve-all-container {
2017-08-17 22:00:37 +05:30
@media (min-width: $screen-sm-min) {
margin-right: 0;
padding-left: $gl-padding;
}
> div {
white-space: nowrap;
}
2016-09-13 17:45:13 +05:30
.btn-group {
margin-left: -4px;
}
.discussion-next-btn {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
2017-08-17 22:00:37 +05:30
.btn.discussion-create-issue-btn {
margin-left: -4px;
border-radius: 0;
border-right: 0;
a {
padding: 0;
line-height: 0;
&:hover {
text-decoration: none;
border: 0;
}
}
.new-issue-for-discussion path {
fill: $gray-darkest;
}
}
2016-09-13 17:45:13 +05:30
}
.line-resolve-all {
2017-08-17 22:00:37 +05:30
vertical-align: middle;
2016-09-13 17:45:13 +05:30
display: inline-block;
2017-08-17 22:00:37 +05:30
padding: 5px 10px 6px;
background-color: $gray-light;
2016-09-13 17:45:13 +05:30
border: 1px solid $border-color;
border-radius: $border-radius-default;
&.has-next-btn {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
2017-08-17 22:00:37 +05:30
border-right: 0;
2016-09-13 17:45:13 +05:30
}
.line-resolve-btn {
margin-right: 5px;
2017-08-17 22:00:37 +05:30
svg {
vertical-align: middle;
}
}
2016-09-13 17:45:13 +05:30
}
.line-resolve-btn {
position: relative;
2017-08-17 22:00:37 +05:30
top: 0;
2016-09-13 17:45:13 +05:30
padding: 0;
background-color: transparent;
border: none;
outline: 0;
&.is-disabled {
cursor: default;
}
&:not(.is-disabled):hover,
&.is-active {
color: $gl-text-green;
2017-08-17 22:00:37 +05:30
svg {
2016-09-13 17:45:13 +05:30
fill: $gl-text-green;
}
}
svg {
2017-08-17 22:00:37 +05:30
fill: $gray-darkest;
height: 16px;
width: 16px;
}
2016-09-13 17:45:13 +05:30
2017-08-17 22:00:37 +05:30
.loading {
margin: 0;
height: auto;
2016-09-13 17:45:13 +05:30
}
}
2017-08-17 22:00:37 +05:30
.line-resolve-text {
vertical-align: middle;
}
2016-09-13 17:45:13 +05:30
.discussion-next-btn {
svg {
margin: 0;
2017-08-17 22:00:37 +05:30
2016-09-13 17:45:13 +05:30
path {
fill: $gray-darkest;
}
}
}
2017-08-17 22:00:37 +05:30
.discussion-notes .flash-container {
margin-bottom: 0;
}
// Merge request notes in diffs
.diff-file {
// Diff is side by side
.notes_content.parallel .note-header .note-header-author-name {
display: block;
}
// Diff is inline
.notes_content .note-header .note-headline-light {
display: inline-block;
position: relative;
}
}