discourse/app/assets/stylesheets/desktop/compose.scss

430 lines
7.7 KiB
SCSS

// styles that apply to the reply pane that slides up to compose replies
// hack, this needs to be done cleaner
#private-message-users {
width: 400px;
float: left;
}
.add-warning {
width: 300px;
display: inline-block;
position: relative;
top: -30px;
margin-left: 20px;
}
.composer-popup-container {
max-width: 1500px;
margin-left: auto;
margin-right: auto;
}
.composer-popup {
box-shadow: 3px 3px 3px rgba(0,0,0, 0.34);
background: dark-light-diff($highlight, $secondary, 50%, -80%);
&.urgent {
background: dark-light-diff($danger, $secondary, 50%, -40%);
}
h3 {
margin-bottom: 10px;
}
p {
margin-bottom: 10px;
}
a.close {
float: right;
color: $primary;
opacity: 0.5;
font-size: 1.071em;
}
a.close:hover {
opacity: 1.0;
}
padding: 10px;
width: 600px;
position: absolute;
ul.topics {
list-style: none;
margin: 0;
padding: 0;
li {
font-weight: normal;
margin-top: 3px;
}
}
}
.similar-topics {
background-color: scale-color($tertiary, $lightness: 60%);
a[href] {
color: #000;
}
.posts-count {
color: scale-color($tertiary, $lightness: -40%);
font-size: 0.857em;
}
}
.composer-popup:nth-of-type(2) {
margin-left: 10px;
}
// hide cancel upload link on IE9 (not supported)
.ie9 #cancel-file-upload { display: none; }
#reply-control {
.toggle-preview, #draft-status, #file-uploading {
position: absolute;
bottom: -31px;
margin-top: 0;
}
.toggle-preview {
right: 5px;
}
#file-uploading {
left: 51%;
font-size: 0.857em;
color: $primary;
}
#draft-status {
right: 51%;
color: $primary;
&.flash {
color: $danger;
}
}
transition: height 0.4s ease;
width: 100%;
z-index: 1039;
height: 0;
background-color: scale-color-diff();
bottom: 0;
font-size: 1em;
position: fixed;
.toggler {
width: 15px;
right: 1px;
position: absolute;
font-size: 1.071em;
color: $primary;
padding: 0 10px 5px 10px;
&:before {
font-family: "FontAwesome";
content: "\f078";
}
}
a.cancel {
padding-left: 7px;
}
.control-row {
margin: 0 0 0 5px;
}
.saving-text {
display: none;
}
.draft-text {
display: none;
}
.grippie {
display: none;
}
// The various states
&.open {
height: 300px;
.grippie {
display: block;
}
}
&.closed {
height: 0 !important;
}
&.draft {
height: 40px !important;
cursor: pointer;
border-top: 1px solid scale-color-diff();
.draft-text {
display: block;
}
.toggler {
&:before {
font-family: "FontAwesome";
content: "\f077";
}
}
}
&.saving {
height: 40px !important;
border-top: 1px solid scale-color-diff();
.saving-text {
display: block;
}
.toggler {
&:before {
font-family: "FontAwesome";
content: "\f00d";
}
}
}
.reply-area {
max-width: 1500px;
margin-left: auto;
margin-right: auto;
float: none;
.ac-wrap {
padding-left: 10px;
}
}
// When the post is new (new topic) the sizings are different
&.edit-title {
&.open {
height: 400px;
}
.contents {
input#reply-title {
padding: 7px 10px;
margin: 6px 10px 3px 0;
color: $primary;
}
input#reply-title {
width: 400px;
color: $primary;
}
.wmd-controls {
transition: top 0.3s ease;
top: 100px;
}
}
}
.contents {
padding: 10px;
min-width: 1280px;
.form-element {
display: inline-block;
.select2-container {
width: 400px;
margin-top: 6px;
a {
padding-top: 4px;
height: 28px;
}
b {
margin-top: 4px;
}
}
.category-combobox {
width: 430px;
@include medium-width { width: 285px; }
@include small-width { width: 220px; }
.select2-drop {
left: -9000px;
width: 428px;
@include medium-width { width: 283px; }
@include small-width { width: 218px; }
}
.select2-search input {
width: 378px;
@include medium-width { width: 233px; }
@include small-width { width: 168px; }
}
}
}
.edit-reason-input {
display: inline-block;
position: absolute;
margin-left: 10px;
top: 18px;
#edit-reason {
margin: 0;
padding: 5px;
float: left;
}
}
#reply-title {
color: $primary;
margin-right: 10px;
float: left;
&:disabled {
background-color: scale-color-diff();
}
}
#wmd-input:disabled {
background-color: scale-color-diff();
}
#wmd-input, #wmd-preview {
color: $primary;
}
#wmd-preview {
border: 1px dashed scale-color-diff();
overflow: auto;
visibility: visible;
cursor: default;
video {
max-width: 100%;
max-height: 500px;
height: auto;
}
audio {
max-width: 100%;
}
&.hidden {
width: 0;
visibility: hidden;
}
}
#wmd-input {
bottom: 35px;
}
.submit-panel {
position: absolute;
display: block;
bottom: 8px;
}
.auto-close-fields .examples {
margin-top: 0;
padding-bottom: 8px;
}
}
.title-input, .category-input, .show-admin-options {
display: inline;
}
.show-admin-options {
vertical-align: top;
margin-top: 8px;
background: scale-color-diff();
&:hover {
color: $secondary;
background: $primary;
}
}
.title-input .popup-tip {
width: 300px;
left: -8px;
margin-top: 8px;
}
.category-input .popup-tip {
width: 240px;
left: 432px;
top: -19px;
}
}
.reply-to {
margin-bottom: 10px;
}
#reply-control {
&.hide-preview {
.wmd-controls {
#wmd-input {
width: 100%;
}
.preview-wrapper {
display: none;
}
.textarea-wrapper {
width: 100%;
}
}
}
.wmd-controls {
left: 30px;
right: 30px;
position: absolute;
bottom: 48px;
top: 50px;
#wmd-input, #wmd-preview-scroller, #wmd-preview {
box-sizing: border-box;
width: 100%;
height: 100%;
min-height: 100%;
padding: 7px;
margin: 0;
background-color: $secondary;
word-wrap: break-word;
}
#wmd-input, #wmd-preview-scroller {
position: absolute;
left: 0;
top: 0;
border: 0px;
border-top: 30px solid transparent;
@include border-radius-all(0);
}
#wmd-preview-scroller {
font-size: 0.929em;
line-height: 18px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
overflow: scroll;
visibility: hidden;
.marker, .caret {
display: inline-block;
vertical-align: top;
}
}
.textarea-wrapper, .preview-wrapper {
position: relative;
box-sizing: border-box;
height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
width: 50%;
}
.textarea-wrapper {
padding-right: 5px;
float: left;
.popup-tip {
margin-top: 3px;
right: 4px;
}
}
.preview-wrapper {
padding-left: 5px;
float: right;
}
}
#wmd-button-bar {
top: 0;
position: absolute;
border-bottom: 1px solid scale-color-diff();
background-color: $secondary;
z-index: 100;
}
}
.control-row.reply-area {
padding-left: 20px;
padding-right: 20px;
}
@media all and (min-width: 1550px) {
#reply-control {
.wmd-controls {
width: 1450px;
left: auto;
right: auto;
}
}
}