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

477 lines
8.6 KiB
SCSS
Raw Normal View History

2013-09-06 03:37:07 +08: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;
float: left;
}
.add-warning {
width: 300px;
display: inline-block;
position: relative;
top: -30px;
margin-left: 20px;
2013-09-06 03:37:07 +08:00
}
.composer-popup-container {
max-width: 1500px;
margin-left: auto;
margin-right: auto;
}
.composer-popup {
2015-12-29 05:51:07 +08:00
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 10px 35px 10px;
2013-09-06 03:37:07 +08:00
box-shadow: 3px 3px 3px rgba(0,0,0, 0.34);
2017-06-12 10:20:14 +08:00
background: $highlight-medium;
&.urgent {
2017-06-12 10:20:14 +08:00
background: $danger-low;
}
2013-09-06 03:37:07 +08:00
&.education-message {
2017-06-12 10:20:14 +08:00
background-color: $tertiary-low;
}
h3 {
margin-bottom: 10px;
}
2013-09-06 03:37:07 +08:00
p {
margin-bottom: 10px;
2013-09-06 03:37:07 +08:00
}
a.close {
position: absolute;
right: 10px;
bottom: 10px;
color: $primary;
padding: 6px 4px 2px 4px;
font-size: 1.071em;
&:before {
content: 'esc';
font-size: 0.85em;
margin-right: 0.5em;
}
2013-09-06 03:37:07 +08:00
}
a.close:hover {
opacity: 1.0;
}
ul.topics {
list-style: none;
margin: 0;
padding: 0;
li {
font-weight: normal;
margin-top: 8px;
2013-09-06 03:37:07 +08:00
}
}
}
.custom-body {
2017-06-12 10:20:14 +08:00
background-color: $tertiary-low;
p {
max-width: 98%;
}
}
.similar-topics {
2017-06-12 10:20:14 +08:00
background-color: $tertiary-low;
2013-09-06 03:37:07 +08:00
a[href] {
2017-06-12 10:20:14 +08:00
color: $primary-medium;
2013-09-06 03:37:07 +08:00
}
.posts-count {
2017-10-11 04:07:46 +08:00
background-color: dark-light-choose($tertiary, $tertiary-medium);
2013-09-06 03:37:07 +08:00
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
.search-link {
.fa, .blurb {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-high, $secondary-medium);
}
}
.badge-wrapper {
padding-left: 5px;
}
2013-09-06 03:37:07 +08:00
}
.composer-popup:nth-of-type(2) {
margin-left: 10px;
2015-12-29 05:51:07 +08:00
width: calc(50% - 65px);
2013-09-06 03:37:07 +08:00
}
// only disabled when the device is touch-only
.touch.mobile-device #reply-control.open .grippie {
2015-09-15 11:09:12 +08:00
display: none;
}
2013-09-06 03:37:07 +08:00
#reply-control {
.toggle-preview, #draft-status, #file-uploading {
position: absolute;
bottom: -31px;
margin-top: 0;
2013-09-06 03:37:07 +08:00
}
.toggle-preview {
right: 5px;
}
#draft-status, #file-uploading {
2013-09-06 03:37:07 +08:00
right: 51%;
}
#file-uploading {
font-size: 0.857em;
2013-09-06 03:37:07 +08:00
}
2014-12-23 19:09:17 +08:00
transition: height 0.4s ease;
2013-09-06 03:37:07 +08:00
width: 100%;
z-index: 999;
height: 0;
2017-06-12 10:20:14 +08:00
background-color: $primary-low;
bottom: 0;
font-size: 1em;
2013-09-06 03:37:07 +08:00
position: fixed;
.toggler {
2014-10-22 14:17:54 +08:00
right: 1px;
2013-09-06 03:37:07 +08:00
position: absolute;
i { font-size: 1.1em; }
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
2014-10-22 14:17:54 +08:00
padding: 0 10px 5px 10px;
2013-09-06 03:37:07 +08:00
}
a.cancel {
padding-left: 7px;
}
.control-row {
margin: 0 5px 0 5px;
2013-09-06 03:37:07 +08:00
}
.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-06 03:37:07 +08:00
}
&.draft {
height: 40px !important;
cursor: pointer;
2017-06-12 10:20:14 +08:00
border-top: 1px solid $primary-low;
2013-09-06 03:37:07 +08:00
.draft-text {
display: block;
i {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
}
2013-09-06 03:37:07 +08:00
}
}
&.saving {
height: 40px !important;
2017-06-12 10:20:14 +08:00
border-top: 1px solid $primary-low;
2013-09-06 03:37:07 +08:00
.saving-text {
display: block;
}
}
.reply-area {
max-width: 1500px;
margin-left: auto;
margin-right: auto;
float: none;
.ac-wrap {
padding-left: 10px;
}
2013-09-06 03:37:07 +08:00
}
// When the post is new (new topic) the sizings are different
&.edit-title {
2013-09-06 03:37:07 +08:00
&.open {
height: 400px;
}
.contents {
2013-11-19 02:50:43 +08:00
input#reply-title {
2013-09-06 03:37:07 +08:00
padding: 7px 10px;
margin-bottom: 0;
color: $primary;
width: 400px;
2013-09-06 03:37:07 +08:00
}
.wmd-controls {
2014-12-23 19:09:17 +08:00
transition: top 0.3s ease;
2013-09-06 03:37:07 +08:00
top: 100px;
}
}
}
.contents {
2015-09-26 03:56:49 +08:00
padding-left: 10px;
padding-top: 5px;
2013-09-06 03:37:07 +08:00
min-width: 1280px;
.form-element {
position: relative;
display: inline-block;
2017-10-20 03:51:08 +08:00
.category-input .category-chooser {
2013-09-06 03:37:07 +08:00
width: 430px;
@include medium-width { width: 285px; }
@include small-width { width: 220px; }
2017-10-20 03:51:08 +08:00
.select-box-kit-header {
padding: 7px 10px;
}
2013-09-06 03:37:07 +08:00
}
}
2013-11-19 02:50:43 +08:00
.edit-reason-input {
display: inline-block;
position: absolute;
margin-left: 10px;
top: 18px;
#edit-reason {
margin: -7px 0 0;
2013-11-19 02:50:43 +08:00
padding: 5px;
float: left;
width: 300px;
2013-11-19 02:50:43 +08:00
}
}
#reply-title {
color: $primary;
margin-right: 5px;
2013-09-06 03:37:07 +08:00
float: left;
&:disabled {
2017-06-12 10:20:14 +08:00
background-color: $primary-low;
2013-09-06 03:37:07 +08:00
}
}
#topic-featured-link {
padding: 7px 10px;
margin: 6px 10px 3px 0;
width: 400px;
}
.d-editor-input:disabled {
2017-06-12 10:20:14 +08:00
background-color: $primary-low;
2013-09-06 03:37:07 +08:00
}
.d-editor-input, .d-editor-preview {
color: $primary;
}
2013-09-06 03:37:07 +08:00
.d-editor-preview {
2017-06-12 10:20:14 +08:00
border: 1px dashed $primary-low;
overflow: auto;
visibility: visible;
cursor: default;
2013-09-06 03:37:07 +08:00
video {
max-width: 100%;
2014-12-09 04:39:36 +08:00
max-height: 500px;
2013-09-06 03:37:07 +08:00
height: auto;
}
audio {
max-width: 100%;
}
&.hidden {
width: 0;
visibility: hidden;
}
}
.d-editor-input {
2013-09-06 03:37:07 +08:00
bottom: 35px;
}
2013-09-06 03:37:07 +08:00
.submit-panel {
width: 28%;
2013-09-06 03:37:07 +08:00
position: absolute;
display: block;
bottom: 8px;
}
.future-date-input .examples {
margin-top: 0;
padding-bottom: 8px;
}
2013-09-06 03:37:07 +08:00
}
.title-input, .category-input, .show-admin-options {
2013-09-06 03:37:07 +08:00
display: inline;
float: left;
2013-09-06 03:37:07 +08:00
}
.show-admin-options {
vertical-align: top;
margin-top: 8px;
2017-06-12 10:20:14 +08:00
background: $primary-low;
&:hover {
color: $secondary;
background: $primary;
}
}
2013-09-06 03:37:07 +08:00
.title-input .popup-tip {
width: 300px;
2015-09-14 00:30:39 +08:00
margin-top: 8px;
left: 150px;
2013-09-06 03:37:07 +08:00
}
.category-input .popup-tip {
width: 240px;
left: 432px;
top: -19px;
2013-09-06 03:37:07 +08:00
}
}
.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;
}
2015-04-04 14:37:22 +08:00
i {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
2015-04-04 14:37:22 +08:00
}
2013-09-06 03:37:07 +08:00
}
#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%;
2013-09-06 03:37:07 +08:00
}
}
2013-09-06 03:37:07 +08:00
.wmd-controls {
left: 30px;
right: 30px;
2013-09-06 03:37:07 +08:00
position: absolute;
bottom: 48px;
top: 50px;
2013-09-06 03:37:07 +08:00
.d-editor-input, .d-editor-preview {
-moz-box-sizing: border-box;
box-sizing: border-box;
2013-09-06 03:37:07 +08:00
width: 100%;
height: 100%;
min-height: auto;
2013-09-06 03:37:07 +08:00
padding: 7px;
margin: 0;
background-color: $secondary;
2013-09-06 03:37:07 +08:00
word-wrap: break-word;
}
.d-editor-input, .d-editor-preview-header {
2013-09-06 03:37:07 +08:00
position: absolute;
left: 0;
top: 0;
border: 0px;
border-top: 30px solid transparent;
@include border-radius-all(0);
2013-09-06 03:37:07 +08:00
}
.d-editor-preview-header {
font-size: 0.929em;
2014-03-27 22:18:48 +08:00
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 {
2013-09-06 03:37:07 +08:00
position: relative;
-moz-box-sizing: border-box;
box-sizing: border-box;
2013-09-06 03:37:07 +08:00
height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
}
.d-editor-textarea-wrapper {
width: 50%;
2013-09-06 03:37:07 +08:00
padding-right: 5px;
float: left;
.popup-tip {
margin-top: 3px;
right: 4px;
}
}
.d-editor-preview-wrapper {
width: 50%;
2013-09-06 03:37:07 +08:00
padding-left: 5px;
float: right;
}
}
.d-editor-button-bar {
2013-09-06 03:37:07 +08:00
top: 0;
position: absolute;
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
background-color: $secondary;
2013-09-06 03:37:07 +08:00
z-index: 100;
overflow: hidden;
width: 50%;
-moz-box-sizing: border-box;
box-sizing: border-box;
button {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-high, $secondary-high);
}
2013-09-06 03:37:07 +08:00
}
}
#reply-control.topic-featured-link-only.open {
height: 200px;
}
2013-09-06 03:37:07 +08:00
.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;
}
}
}