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

465 lines
8.8 KiB
SCSS
Raw Normal View History

2013-09-05 15:37:07 -04:00
// 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;
2013-09-05 15:37:07 -04:00
}
.composer-popup-container {
max-width: 1500px;
margin-left: auto;
margin-right: auto;
}
.composer-popup {
@include box-shadow(3px 3px 3px rgba($primary_shadow_color, 0.14));
background: lighten($highlight, 15%);
border: 1px solid $highlight_border_color;
&.urgent {
background: lighten($warning_border_color, 15%);
border: 1px solid $warning_border_color;
}
2013-09-05 15:37:07 -04:00
h3 {
margin-bottom: 10px;
}
2013-09-05 15:37:07 -04:00
p {
margin-bottom: 10px;
2013-09-05 15:37:07 -04:00
}
a.close {
float: right;
color: $primary_text_color;
2013-09-05 15:37:07 -04:00
opacity: 0.5;
font-size: 15px;
}
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: $emphasis_background_color;
border: 1px solid $emphasis_background_color;
2013-09-05 15:37:07 -04:00
a[href] {
color: #000;
}
.posts-count {
color: darken($link_color, 40%);
2013-09-05 15:37:07 -04:00
font-size: 12px;
}
}
.composer-popup:nth-of-type(2) {
margin-left: 10px;
}
2013-09-05 15:37:07 -04:00
#reply-control {
.toggle-preview, #draft-status, #file-uploading {
position: absolute;
bottom: -31px;
margin-top: 0;
2013-09-05 15:37:07 -04:00
}
.toggle-preview {
right: 5px;
text-decoration: underline;
}
#file-uploading {
left: 51%;
font-size: 12px;
color: $secondary_text_color;
2013-09-05 15:37:07 -04:00
}
#draft-status {
right: 51%;
color: $primary_text_color;
2013-09-05 15:37:07 -04:00
&.flash {
color: $warning_text_color;
2013-09-05 15:37:07 -04:00
}
}
@include transition(height 0.4s ease);
width: 100%;
z-index: 1039;
height: 0;
2014-03-26 21:16:41 -04:00
background-color: rgba($composer_background_color, 0.96);
bottom: 0;
2013-09-05 15:37:07 -04:00
font-size: 14px;
position: fixed;
.toggler {
display: block;
width: 13px;
height: 13px;
right: 13px;
position: absolute;
font-size: 15px;
color: $primary_text_color;
2013-09-05 15:37:07 -04:00
text-decoration: none;
&:before {
font-family: "FontAwesome";
content: "\f078";
}
}
a.cancel {
text-decoration: underline;
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;
2013-09-05 15:37:07 -04:00
}
&.draft {
height: 40px !important;
cursor: pointer;
border-top: 1px solid $primary_border_color;
2013-09-05 15:37:07 -04:00
.draft-text {
display: block;
}
.toggler {
&:before {
font-family: "FontAwesome";
content: "\f077";
}
}
}
&.saving {
height: 40px !important;
border-top: 1px solid $primary_border_color;
2013-09-05 15:37:07 -04:00
.saving-text {
display: block;
}
.toggler {
&:before {
font-family: "FontAwesome";
content: "\f00d";
}
}
}
.spinner {
position: absolute;
@include fades-in(0.25s);
@include border-radius-all(10px);
left: 250px;
top: 95px;
height: 100px;
width: 70px;
height: 70px;
text-indent: -9999em;
background: {
color: $primary_text_color;
2013-09-05 15:37:07 -04:00
image: image-url("spinner_96_w.gif");
repeat: no-repeat;
size: 35px;
position: 17px 17px;
};
}
&.loading {
.spinner {
z-index: 1000;
@include visible;
}
}
.reply-area {
max-width: 1500px;
margin-left: auto;
margin-right: auto;
float: none;
}
// When the post is new (new topic) the sizings are different
&.edit-title {
2013-09-05 15:37:07 -04:00
&.open {
height: 400px;
}
.contents {
2013-11-18 13:50:43 -05:00
input#reply-title {
2013-09-05 15:37:07 -04:00
padding: 7px 10px;
margin: 6px 10px 3px 0;
color: $primary_text_color;
}
input#reply-title {
width: 400px;
color: $primary_text_color;
2013-09-05 15:37:07 -04:00
}
.wmd-controls {
@include transition(top 0.3s ease);
top: 100px;
}
}
}
.contents {
padding: 10px;
min-width: 1280px;
.form-element {
2013-11-18 13:50:43 -05:00
display: inline-block;
2013-09-05 15:37:07 -04:00
.chzn-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; }
.chzn-drop {
left: -9000px;
width: 428px;
@include medium-width { width: 283px; }
@include small-width { width: 218px; }
}
.chzn-search input {
width: 378px;
@include medium-width { width: 233px; }
@include small-width { width: 168px; }
}
}
}
2013-11-18 13:50:43 -05:00
.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_text_color;
2013-09-05 15:37:07 -04:00
margin-right: 10px;
float: left;
&:disabled {
background-color: lighten($secondary_background_color, 60%);
2013-09-05 15:37:07 -04:00
}
}
#wmd-input:disabled {
background-color: lighten($primary_background_color, 60%);
2013-09-05 15:37:07 -04:00
}
#wmd-input, #wmd-preview {
color: $primary_text_color;
2013-09-05 15:37:07 -04:00
video {
max-width: 100%;
height: auto;
}
audio {
max-width: 100%;
}
}
#wmd-preview {
border: 1px dashed $primary_border_color;
2013-09-05 15:37:07 -04:00
overflow: auto;
visibility: visible;
2013-09-05 15:37:07 -04:00
&.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;
}
2013-09-05 15:37:07 -04:00
}
.title-input, .category-input, .show-admin-options {
2013-09-05 15:37:07 -04:00
position: relative;
display: inline;
}
.show-admin-options {
vertical-align: top;
margin-top: 8px;
background: lighten($secondary_background_color, 60%);
&:hover {
color: $tertiary_text_color;
background: lighten($secondary_background_color, 35%);
}
}
2013-09-05 15:37:07 -04:00
.title-input .popup-tip {
width: 300px;
left: -8px;
margin-top: 8px;
}
.category-input .popup-tip {
width: 240px;
left: 432px;
top: -19px;
2013-09-05 15:37:07 -04:00
}
}
.reply-to {
margin-bottom: 10px;
}
#reply-control.edit-title.private-message {
.wmd-controls {
@include transition(top 0.3s ease);
top: 140px;
}
}
#reply-control {
&.hide-preview {
.wmd-controls {
#wmd-input {
width: 100%;
}
.preview-wrapper {
display: none;
}
.textarea-wrapper {
width: 100%;
}
}
}
.wmd-controls {
2014-04-21 09:56:10 -04:00
left: auto;
right: auto;
2013-09-05 15:37:07 -04:00
position: absolute;
bottom: 48px;
// this removes the topmost margin;
// if we don't have this, all posts would have extra space at the top
#wmd-preview > *:first-child {
margin-top: 0 !important;
2013-09-05 15:37:07 -04:00
}
2014-03-27 10:18:48 -04:00
#wmd-input, #wmd-preview-scroller, #wmd-preview {
@include box-sizing(border-box);
2013-09-05 15:37:07 -04:00
width: 100%;
height: 100%;
min-height: 100%;
padding: 7px;
margin: 0;
background-color: $primary_background_color;
2013-09-05 15:37:07 -04:00
word-wrap: break-word;
// set up proper header margins in post preview
h1, h2, h3, h4, h5, h6 {
margin: 30px 0 10px;
2013-09-05 15:37:07 -04:00
}
2014-03-27 10:18:48 -04:00
p {
margin-top: 19px;
}
2014-04-02 22:59:25 -04:00
blockquote p:first-of-type {margin-top: 0px;}
2013-09-05 15:37:07 -04:00
}
2014-03-27 10:18:48 -04:00
#wmd-input, #wmd-preview-scroller {
2013-09-05 15:37:07 -04:00
position: absolute;
left: 0;
top: 0;
height: 100%;
min-height: 100%;
@include box-sizing(border-box);
2013-09-05 15:37:07 -04:00
border: 0;
border-top: 30px solid transparent;
box-shadow: none;
2013-09-05 15:37:07 -04:00
@include border-radius-all(0);
transition: none;
}
2014-03-27 10:18:48 -04:00
#wmd-preview-scroller {
font-size: 13px;
line-height: 18px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: normal;
overflow: scroll;
visibility: hidden;
.marker, .caret {
display: inline-block;
vertical-align: top;
}
}
2013-09-05 15:37:07 -04:00
.textarea-wrapper, .preview-wrapper {
position: relative;
@include box-sizing(border-box);
2013-09-05 15:37:07 -04:00
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 $primary_border_color;
background-color: $primary_background_color;
2013-09-05 15:37:07 -04:00
z-index: 100;
}
}
.control-row.reply-area {
padding-left: 20px;
padding-right: 20px;
}