gitlab-org--gitlab-foss/app/assets/stylesheets/framework/markdown_area.scss
2018-01-08 09:27:50 +00:00

270 lines
4.3 KiB
SCSS

.div-dropzone-wrapper {
.div-dropzone {
position: relative;
.div-dropzone-hover {
position: absolute;
top: 50%;
left: 50%;
margin-top: -11.5px;
margin-left: -15px;
opacity: 0;
font-size: 30px;
transition: opacity 200ms ease-in-out;
pointer-events: none;
}
.div-dropzone-spinner {
position: absolute;
bottom: 10px;
right: 5px;
opacity: 0;
font-size: 20px;
transition: opacity 200ms ease-in-out;
}
.div-dropzone-icon {
display: block;
text-align: center;
font-size: inherit;
}
.div-dropzone-progress {
position: absolute;
top: 7px;
left: -40px;
width: 35px;
font-size: 13px;
text-align: right;
}
.dz-preview {
display: none;
}
}
}
.div-dropzone-alert {
margin-top: 5px;
margin-bottom: 0;
transition: opacity 200ms ease-in-out;
}
.md-area {
position: relative;
}
.md-header {
.nav-links {
a {
width: 100%;
padding-top: 0;
line-height: 19px;
&.btn.btn-xs {
padding: 2px 5px;
}
&:focus {
margin-top: -10px;
padding-top: 10px;
}
}
}
}
.md-header-tab {
@media (max-width: $screen-xs-max) {
flex: 1;
width: 100%;
border-bottom: 1px solid $border-color;
text-align: center;
}
}
.nav-links {
li.md-header-toolbar {
margin-left: auto;
display: none;
&.active {
display: block;
@media (max-width: $screen-xs-max) {
flex: none;
display: flex;
justify-content: center;
width: 100%;
padding-top: $gl-padding-top;
padding-bottom: $gl-padding-top;
}
}
}
}
.referenced-users {
color: $gl-text-color;
padding-top: 10px;
}
.md-preview-holder {
min-height: 167px;
padding: 10px 0;
overflow-x: auto;
}
.markdown-area {
border-radius: 0;
background: $white-light;
border: 1px solid $md-area-border;
min-height: 140px;
max-height: 500px;
padding: 5px;
box-shadow: none;
width: 100%;
}
.md {
&.md-preview-holder {
// Reset ul style types since we're nested inside a ul already
@include bulleted-list;
}
// On diffs code should wrap nicely and not overflow
code {
white-space: pre-wrap;
word-break: keep-all;
}
hr {
// Darken 'whitesmoke' a bit to make it more visible in note bodies
border-color: darken($gray-normal, 8%);
margin: 10px 0;
}
// Border around images in issue and MR comments.
img:not(.emoji) {
border: 1px solid $white-normal;
padding: 5px;
margin: 5px 0;
// Ensure that image does not exceed viewport
max-height: calc(100vh - 100px);
}
table {
@include markdown-table;
}
}
.toolbar-btn {
float: left;
padding: 0 7px;
background: transparent;
border: 0;
outline: 0;
svg {
width: 14px;
height: 14px;
margin-top: 3px;
fill: $gl-text-color-secondary;
}
&:hover,
&:focus {
svg {
fill: $gl-link-color;
}
}
}
.toolbar-fullscreen-btn {
margin-left: $gl-padding;
margin-right: -5px;
@media (max-width: $screen-xs-max) {
margin-left: 0;
margin-right: 0;
}
}
.atwho-view {
overflow-y: auto;
overflow-x: hidden;
.name,
small.aliases,
small.params {
float: left;
}
small.aliases,
small.params {
padding: 2px 5px;
}
small.description {
float: right;
padding: 3px 5px;
}
.avatar-inline {
margin-bottom: 0;
}
.cur {
.avatar {
@include disableAllAnimation;
border: 1px solid $white-light;
}
}
ul > li {
@include clearfix;
white-space: nowrap;
}
// TODO: fallback to global style
.atwho-view-ul {
padding: 8px 1px;
li {
padding: 8px 16px;
border: 0;
&.cur {
background-color: $gray-darker;
color: $gl-text-color;
small {
color: inherit;
}
}
div.avatar {
display: inline-flex;
justify-content: center;
align-items: center;
.center {
line-height: 14px;
}
}
strong {
color: $gl-text-color;
}
}
}
}
@media (max-width: $screen-xs-max) {
.atwho-view-ul {
width: 350px;
}
.atwho-view ul li {
overflow: hidden;
text-overflow: ellipsis;
}
}