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

492 lines
9.2 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 {
position: absolute;
width: calc(50% - 55px);
max-width: 724px;
top: 16px;
bottom: 16px;
left: 50%;
// The composer goes off-center at 1550px
@media (min-width: 1550px) {
left: calc(50% - 15px);
}
overflow-y: auto;
z-index: 110;
padding: 10px;
box-shadow: 3px 3px 3px rgba(0,0,0, 0.34);
background: $highlight-medium;
&.urgent {
background: $danger-low;
}
&.education-message {
background-color: $tertiary-low;
}
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;
}
ul.topics {
list-style: none;
margin: 0;
padding: 0;
li {
font-weight: normal;
margin-top: 8px;
}
}
}
.custom-body {
background-color: $tertiary-low;
p {
max-width: 98%;
}
}
.similar-topics {
background-color: $tertiary-low;
a[href] {
color: $primary-medium;
}
.posts-count {
background-color: dark-light-choose(scale-color($tertiary, $lightness: -40%), scale-color($tertiary, $lightness: 40%));
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
.search-link {
.fa, .blurb {
color: dark-light-choose(scale-color($primary, $lightness: 45%), scale-color($secondary, $lightness: 55%));
}
}
.badge-wrapper {
padding-left: 5px;
}
}
.composer-popup:nth-of-type(2) {
margin-left: 10px;
width: calc(50% - 65px);
}
// only disabled when the device is touch-only
.touch.mobile-device #reply-control.open .grippie {
display: none;
}
#reply-control {
.toggle-preview, #draft-status, #file-uploading {
position: absolute;
bottom: -31px;
margin-top: 0;
}
.toggle-preview {
right: 5px;
}
#draft-status, #file-uploading {
right: 51%;
}
#file-uploading {
font-size: 0.857em;
}
transition: height 0.4s ease;
width: 100%;
z-index: 999;
height: 0;
background-color: $primary-low;
bottom: 0;
font-size: 1em;
position: fixed;
.toggler {
right: 1px;
position: absolute;
i { font-size: 1.1em; }
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
padding: 0 10px 5px 10px;
}
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 $primary-low;
.draft-text {
display: block;
i {
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
}
}
}
&.saving {
height: 40px !important;
border-top: 1px solid $primary-low;
.saving-text {
display: block;
}
}
.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-left: 10px;
padding-top: 5px;
min-width: 1280px;
.form-element {
position: relative;
display: inline-block;
.select2-container {
width: 400px;
margin-top: 5px;
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: -7px 0 0;
padding: 5px;
float: left;
width: 300px;
}
}
#reply-title {
color: $primary;
margin-right: 10px;
float: left;
&:disabled {
background-color: $primary-low;
}
}
#topic-featured-link {
padding: 7px 10px;
margin: 6px 10px 3px 0;
width: 400px;
}
.d-editor-input:disabled {
background-color: $primary-low;
}
.d-editor-input, .d-editor-preview {
color: $primary;
}
.d-editor-preview {
border: 1px dashed $primary-low;
overflow: auto;
visibility: visible;
cursor: default;
video {
max-width: 100%;
max-height: 500px;
height: auto;
}
audio {
max-width: 100%;
}
&.hidden {
width: 0;
visibility: hidden;
}
}
.d-editor-input {
bottom: 35px;
}
.submit-panel {
width: 28%;
position: absolute;
display: block;
bottom: 8px;
}
.auto-update-input .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: $primary-low;
&:hover {
color: $secondary;
background: $primary;
}
}
.title-input .popup-tip {
width: 300px;
margin-top: 8px;
left: 150px;
}
.category-input .popup-tip {
width: 240px;
left: 432px;
top: -19px;
}
}
.reply-to {
margin-bottom: 10px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
color: $tertiary;
@media (min-width: 1101px) {
max-width: 80%;
}
@media (max-width: 1100px) {
max-width: 500px;
}
@media (max-width: 600px) {
max-width: 300px;
}
i {
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
}
}
#reply-control {
.wmd-controls.hide-preview {
.d-editor-input {
width: 100%;
}
.d-editor-button-bar {
width: 100%;
}
.d-editor-preview-wrapper {
display: none;
}
.d-editor-textarea-wrapper {
width: 100%;
}
}
.wmd-controls {
left: 30px;
right: 30px;
position: absolute;
bottom: 48px;
top: 50px;
.d-editor-input, .d-editor-preview {
-moz-box-sizing: border-box;
box-sizing: border-box;
width: 100%;
height: 100%;
min-height: auto;
padding: 7px;
margin: 0;
background-color: $secondary;
word-wrap: break-word;
}
.d-editor-input, .d-editor-preview-header {
position: absolute;
left: 0;
top: 0;
border: 0px;
border-top: 30px solid transparent;
@include border-radius-all(0);
}
.d-editor-preview-header {
font-size: 0.929em;
line-height: 18px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
overflow: scroll;
.marker, .caret {
display: inline-block;
vertical-align: top;
}
}
.d-editor, .d-editor-container, .d-editor-textarea-wrapper, .d-editor-preview-wrapper {
position: relative;
-moz-box-sizing: border-box;
box-sizing: border-box;
height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
}
.d-editor-textarea-wrapper {
width: 50%;
padding-right: 5px;
float: left;
.popup-tip {
margin-top: 3px;
right: 4px;
}
}
.d-editor-preview-wrapper {
width: 50%;
padding-left: 5px;
float: right;
}
}
.d-editor-button-bar {
top: 0;
position: absolute;
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
background-color: $secondary;
z-index: 100;
overflow: hidden;
width: 50%;
-moz-box-sizing: border-box;
box-sizing: border-box;
button {
color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%));
}
}
}
#reply-control.topic-featured-link-only.open {
height: 200px;
}
.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;
}
}
}