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

775 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;
2017-08-17 22:00:37 +05:30
.note-created-ago,
.note-updated-at {
2018-05-09 12:01:36 +05:30
white-space: normal;
2016-06-02 11:05:42 +05:30
}
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 {
display: block;
2016-06-02 11:05:42 +05:30
position: relative;
2017-09-10 17:25:29 +05:30
.diff-content {
overflow: visible;
}
2015-04-26 12:48:37 +05:30
}
2017-09-10 17:25:29 +05:30
> li { // .timeline-entry
padding: 0;
2015-04-26 12:48:37 +05:30
display: block;
2016-06-02 11:05:42 +05:30
position: relative;
2017-09-10 17:25:29 +05:30
border-bottom: 0;
@include notes-media('min', $screen-sm-min) {
padding-left: $note-icon-gutter-width;
}
.timeline-entry-inner {
padding: $gl-padding $gl-btn-padding;
border-bottom: 1px solid $white-normal;
}
&:target,
&.target {
border-bottom: 1px solid $white-normal;
&:not(:first-child) {
border-top: 1px solid $white-normal;
margin-top: -1px;
}
.timeline-entry-inner {
border-bottom: 0;
}
}
.timeline-icon {
@include notes-media('min', $screen-sm-min) {
margin-left: -$note-icon-gutter-width;
}
}
.timeline-content {
margin-left: $note-icon-gutter-width;
@include notes-media('min', $screen-sm-min) {
margin-left: 0;
}
}
2017-08-17 22:00:37 +05:30
&.being-posted {
pointer-events: none;
opacity: 0.5;
.dummy-avatar {
background-color: $kdb-border;
border: 1px solid darken($kdb-border, 25%);
}
.note-headline-light,
.fa-spinner {
margin-left: 3px;
}
}
&.note-discussion {
2017-09-10 17:25:29 +05:30
.timeline-entry-inner {
2017-08-17 22:00:37 +05:30
padding: $gl-padding 10px;
}
}
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
.editing-spinner {
display: none;
}
&.is-requesting {
.note-timestamp {
display: none;
}
.editing-spinner {
display: inline-block;
}
}
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 {
@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;
2017-09-10 17:25:29 +05:30
word-wrap: break-word;
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-09-10 17:25:29 +05:30
margin-top: 16px;
}
}
2015-04-26 12:48:37 +05:30
.note-header {
2016-06-22 15:30:34 +05:30
2017-09-10 17:25:29 +05:30
@include notes-media('max', $screen-xs-min) {
2016-06-22 15:30:34 +05:30
.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;
clear: both;
.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;
}
p {
display: inline;
margin: 0;
&::first-letter {
text-transform: lowercase;
}
}
}
2017-09-10 17:25:29 +05:30
.timeline-icon {
float: left;
2015-04-26 12:48:37 +05:30
2017-09-10 17:25:29 +05:30
@include notes-media('min', $screen-sm-min) {
margin-left: 0;
width: auto;
}
svg {
width: 16px;
height: 16px;
fill: $gray-darkest;
margin-top: 2px;
}
}
.timeline-content {
@include notes-media('min', $screen-sm-min) {
margin-left: 30px;
2017-08-17 22:00:37 +05:30
}
}
.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 {
2017-09-10 17:25:29 +05:30
p:first-child {
2017-08-17 22:00:37 +05:30
display: none;
}
2018-03-17 18:26:18 +05:30
&.system-note-commit-list:not(.hide-shade) {
2017-08-17 22:00:37 +05:30
max-height: 70px;
overflow: hidden;
display: block;
ul {
margin: 3px 0 3px 16px !important;
}
p:first-child {
display: none;
}
&::after {
content: '';
width: 100%;
2017-09-10 17:25:29 +05:30
height: 70px;
2017-08-17 22:00:37 +05:30
position: absolute;
left: 0;
bottom: 0;
background: linear-gradient(rgba($white-light, 0.1) -100px, $white-light 100%);
}
}
}
}
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
.line_content {
white-space: pre-wrap;
}
}
2018-03-17 18:26:18 +05:30
.diff-file {
.is-over {
.add-diff-note {
display: inline-block;
}
}
2015-04-26 12:48:37 +05:30
2018-03-17 18:26:18 +05:30
// Merge request notes in diffs
// Diff is inline
.notes_content .note-header .note-headline-light {
display: inline-block;
position: relative;
}
2015-04-26 12:48:37 +05:30
2018-03-17 18:26:18 +05:30
.notes_holder {
font-family: $regular_font;
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
td {
border: 1px solid $white-normal;
border-left: 0;
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
&.notes_line {
vertical-align: middle;
text-align: center;
padding: 10px 0;
background: $gray-light;
color: $text-color;
}
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
&.notes_line2 {
text-align: center;
padding: 10px 0;
border-left: 1px solid $note-line2-border !important;
2015-04-26 12:48:37 +05:30
}
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
&.notes_content {
background-color: $gray-light;
border-width: 1px 0;
padding: 0;
vertical-align: top;
white-space: normal;
&.parallel {
border-width: 1px;
2017-08-17 22:00:37 +05:30
}
2018-03-17 18:26:18 +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;
}
2017-08-17 22:00:37 +05:30
}
2018-03-17 18:26:18 +05:30
.notes {
background-color: $white-light;
}
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
a code {
top: 0;
margin-right: 0;
}
2016-06-02 11:05:42 +05:30
}
}
}
}
.discussion-header,
2018-03-17 18:26:18 +05:30
.note-header-info {
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;
2018-03-17 18:26:18 +05:30
.note-header-author-name {
text-decoration: underline;
}
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;
2017-09-10 17:25:29 +05:30
@include notes-media('max', $screen-xs-max) {
2017-08-17 22:00:37 +05:30
flex-flow: row wrap;
}
}
.note-header-info {
min-width: 0;
padding-bottom: 8px;
2018-03-17 18:26:18 +05:30
&.discussion {
padding-bottom: 0;
}
2017-08-17 22:00:37 +05:30
}
2017-09-10 17:25:29 +05:30
.system-note .note-header-info {
padding-bottom: 0;
}
2017-08-17 22:00:37 +05:30
.note-header-author-name {
2017-09-10 17:25:29 +05:30
@include notes-media('max', $screen-xs-max) {
2017-08-17 22:00:37 +05:30
display: none;
}
}
.note-headline-light {
display: inline;
2017-09-10 17:25:29 +05:30
@include notes-media('max', $screen-xs-min) {
2017-08-17 22:00:37 +05:30
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;
}
2018-03-17 18:26:18 +05:30
a:hover {
text-decoration: underline;
}
2017-08-17 22:00:37 +05:30
}
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;
2018-03-17 18:26:18 +05:30
@include notes-media('max', $screen-md-max) {
float: none;
margin-left: 0;
}
.btn-group > .discussion-next-btn {
margin-left: -1px;
}
2016-06-02 11:05:42 +05:30
}
.note-actions {
2017-09-10 17:25:29 +05:30
align-self: flex-start;
2017-08-17 22:00:37 +05:30
flex-shrink: 0;
2017-09-10 17:25:29 +05:30
display: inline-flex;
align-items: center;
2017-08-17 22:00:37 +05:30
margin-left: 10px;
color: $gray-darkest;
2016-06-22 15:30:34 +05:30
2017-09-10 17:25:29 +05:30
@include notes-media('max', $screen-xs-max) {
2017-08-17 22:00:37 +05:30
float: none;
margin-left: 0;
2016-06-22 15:30:34 +05:30
}
2017-09-10 17:25:29 +05:30
}
.more-actions {
display: flex;
align-items: flex-end;
.tooltip {
white-space: nowrap;
}
}
.more-actions-toggle {
&:hover .icon,
&:focus .icon {
color: $blue-600;
}
}
.more-actions-dropdown {
width: 180px;
min-width: 180px;
2016-06-02 11:05:42 +05:30
}
2015-04-26 12:48:37 +05:30
2017-09-10 17:25:29 +05:30
.note-actions-item {
2018-03-17 18:26:18 +05:30
margin-left: 12px;
2017-09-10 17:25:29 +05:30
display: flex;
align-items: center;
2017-09-10 17:25:29 +05:30
&.more-actions {
// compensate for narrow icon
margin-left: 10px;
}
2017-09-10 17:25:29 +05:30
}
.note-action-button {
line-height: 1;
padding: 0;
min-width: 16px;
color: $gray-darkest;
2018-03-17 18:26:18 +05:30
fill: $gray-darkest;
2015-09-11 14:41:01 +05:30
2016-06-02 11:05:42 +05:30
.fa {
position: relative;
2017-09-10 17:25:29 +05:30
font-size: 16px;
2016-06-02 11:05:42 +05:30
}
2017-08-17 22:00:37 +05:30
svg {
2018-03-17 18:26:18 +05:30
@include btn-svg;
2017-08-17 22:00:37 +05:30
}
.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;
2018-03-17 18:26:18 +05:30
fill: $gl-link-color;
2017-08-17 22:00:37 +05:30
}
.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 {
2018-03-17 18:26:18 +05:30
margin: 0 3px;
}
.note-role-special {
2016-06-02 11:05:42 +05:30
position: relative;
2018-03-17 18:26:18 +05:30
display: inline-block;
color: $gl-text-color-secondary;
2016-06-02 11:05:42 +05:30
font-size: 12px;
2018-03-17 18:26:18 +05:30
text-shadow: 0 0 15px $gl-text-color-inverted;
2016-06-02 11:05:42 +05:30
}
2015-04-26 12:48:37 +05:30
/**
* Line note button on the side of diffs
*/
2017-09-10 17:25:29 +05:30
.line_holder .is-over:not(.no-comment-btn) {
.add-diff-note {
opacity: 1;
}
}
2017-08-17 22:00:37 +05:30
.add-diff-note {
2018-03-17 18:26:18 +05:30
@include btn-comment-icon;
2017-09-10 17:25:29 +05:30
opacity: 0;
2017-08-17 22:00:37 +05:30
margin-top: -2px;
margin-left: -55px;
position: absolute;
z-index: 10;
}
2015-04-26 12:48:37 +05:30
2017-09-10 17:25:29 +05:30
.discussion-body,
.diff-file {
.notes .note {
border-bottom: 1px solid $white-normal;
.timeline-entry-inner {
padding-left: $gl-padding;
padding-right: $gl-padding;
2018-03-17 18:26:18 +05:30
border-bottom: 0;
2015-04-26 12:48:37 +05:30
}
}
}
2016-06-02 11:05:42 +05:30
.disabled-comment {
background-color: $gray-light;
border-radius: $border-radius-base;
border: 1px solid $border-gray-normal;
color: $note-disabled-comment-color;
2017-09-10 17:25:29 +05:30
padding: 90px 0;
2016-06-02 11:05:42 +05:30
2018-03-17 18:26:18 +05:30
&.discussion-locked {
border: 0;
background-color: $white-light;
}
2016-06-02 11:05:42 +05:30
a {
color: $gl-link-color;
}
}
2016-09-13 17:45:13 +05:30
.line-resolve-all-container {
2017-09-10 17:25:29 +05:30
@include notes-media('min', $screen-sm-min) {
2017-08-17 22:00:37 +05:30
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
2018-03-17 18:26:18 +05:30
.btn {
svg path {
fill: $gray-darkest;
}
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
&.discussion-create-issue-btn {
margin-left: -4px;
border-radius: 0;
border-right: 0;
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
a {
padding: 0;
line-height: 0;
2017-08-17 22:00:37 +05:30
2018-03-17 18:26:18 +05:30
&:hover {
text-decoration: none;
border: 0;
}
}
2017-08-17 22:00:37 +05:30
}
}
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;
2018-03-27 19:54:05 +05:30
padding: 6px 10px;
2017-08-17 22:00:37 +05:30
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;
2018-03-17 18:26:18 +05:30
border: 0;
2016-09-13 17:45:13 +05:30
outline: 0;
2018-03-17 18:26:18 +05:30
color: $gray-darkest;
2017-09-10 17:25:29 +05:30
transition: color $general-hover-transition-duration $general-hover-transition-curve;
2016-09-13 17:45:13 +05:30
&.is-disabled {
cursor: default;
}
2017-09-10 17:25:29 +05:30
&:not(.is-disabled) {
&:hover,
&:focus {
color: $gl-text-green;
}
}
2016-09-13 17:45:13 +05:30
&.is-active {
color: $gl-text-green;
2017-09-10 17:25:29 +05:30
&:hover,
&:focus {
color: $gl-text-green-hover;
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
}
}