discourse/app/assets/stylesheets/common/d-editor.scss

186 lines
2.8 KiB
SCSS
Raw Normal View History

.d-editor-container {
2017-11-08 04:39:26 -05:00
display: flex;
flex-grow: 1;
max-width: 100%;
}
.d-editor-overlay {
position: absolute;
background-color: black;
opacity: 0.8;
z-index: z("modal","overlay");
}
.d-editor-modals {
position: absolute;
z-index: z("modal","content");
}
2017-11-08 04:39:26 -05:00
.d-editor {
display: flex;
flex-grow: 1;
min-height: 0;
}
.d-editor .d-editor-modal {
min-width: 400px;
@media screen and (max-width: 424px) {
min-width: 300px;
}
position: absolute;
background-color: $secondary;
2017-06-11 22:20:14 -04:00
border: 1px solid $primary-low;
padding: 1em;
top: 25px;
input {
width: 95%;
}
h3 {
margin-bottom: 0.5em;
}
}
2017-11-08 04:39:26 -05:00
.d-editor-textarea-wrapper,
.d-editor-preview-wrapper {
flex: 1;
}
.d-editor-textarea-wrapper {
display: flex;
flex-direction: column;
background-color: $secondary;
position: relative;
border: 1px solid $primary-medium;
textarea {
background: transparent;
}
2017-11-08 04:39:26 -05:00
}
.d-editor-preview-wrapper {
max-width: 49%;
margin-left: 1%;
2017-11-08 04:39:26 -05:00
display: flex;
flex-direction: column;
}
.d-editor-button-bar {
2017-11-08 04:39:26 -05:00
display: flex;
align-items: center;
border-bottom: none;
2017-11-08 04:39:26 -05:00
min-height: 30px;
padding-left: 3px;
border-bottom: 1px solid $primary-low;
button {
background-color: transparent;
color: $primary-high;
}
.btn:not(.no-text) {
2018-01-12 17:27:38 -05:00
font-size: $font-up-1;
}
.btn.bold {
font-weight: bolder;
}
.btn.italic {
font-style: italic;
}
}
.d-editor-spacer {
width: 1px;
height: 20px;
2017-11-08 04:39:26 -05:00
margin: 0 5px;
2017-06-11 22:20:14 -04:00
background-color: $primary-low;
display: inline-block;
}
.d-editor-preview-wrapper {
overflow: auto;
cursor: default;
}
2017-11-08 04:39:26 -05:00
.d-editor-input,
.d-editor-preview {
box-sizing: border-box;
flex: 1 1 100%;
width: 100%;
2017-11-08 04:39:26 -05:00
margin: 0;
min-height: auto;
word-wrap: break-word;
-webkit-appearance: none;
border-radius: 0;
2017-11-08 04:39:26 -05:00
&:focus {
box-shadow: none;
border: 0;
outline: 0;
}
}
2017-11-08 04:39:26 -05:00
.d-editor-input {
border: 0;
padding: 10px;
height: 100%;
2017-11-08 04:39:26 -05:00
overflow-x: hidden;
resize: none;
2017-11-08 04:39:26 -05:00
}
.d-editor-preview {
height: auto;
}
.d-editor-plugin {
display: flex;
flex: 1 1;
overflow: auto;
}
2017-11-08 04:39:26 -05:00
.composing-whisper .d-editor-preview {
font-style: italic;
color: $primary-medium !important;
}
.d-editor-preview > *:first-child {
margin-top: 0;
}
2017-11-08 04:39:26 -05:00
.hide-preview .d-editor-preview-wrapper {
display: none;
flex: 0;
}
.user-preferences .bio-composer,
.edit-category-tab-topic-template {
textarea {
width: 100%;
}
.d-editor-container {
display: block;
}
.d-editor-textarea-wrapper {
border: 1px solid $primary-low;
2018-01-30 09:31:18 -05:00
min-height: 14em;
}
.d-editor-button-bar .btn {
padding: 6px 8px;
}
.d-editor-preview-wrapper {
max-width: 100%;
margin: 10px 0 0 0;
}
.d-editor-preview {
2017-11-10 11:57:02 -05:00
background-color: $primary-very-low;
padding: 5px;
}
}
.user-preferences .bio-composer {
padding: 10px;
border: 1px solid $primary-low;
}