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

268 lines
5.3 KiB
SCSS

// styles that apply to the reply pane that slides up to compose replies
// hack, this needs to be done cleaner
.private-message input.span8 {
width: 47%;
}
.composer-popup-container {
display: none !important; // can be removed if inline JS CSS is removed from composer-popup
}
.composer-popup {
display: none !important; // can be removed if inline JS CSS is removed from composer-popup
}
#reply-control {
// used for upload link
.composer-bottom-right {
position: absolute;
bottom: -32px;
right: -5px;
}
.toggle-preview { display:none; }
.preview-wrapper { display:none; }
#mobile-uploader { display: none; }
#draft-status, #file-uploading, .mobile-file-upload {
float: right;
margin-right: 8px;
}
#file-uploading {
left: 51%;
font-size: 0.857em;
color: scale-color($secondary, $lightness: 50%);
}
#draft-status {
color: scale-color($primary, $lightness: 75%);
}
transition: height 0.4s ease;
width: 100%;
z-index: 1039;
height: 0;
background-color: dark-light-diff($primary, $secondary, 90%, -60%);
bottom: 0;
font-size: 1em;
position: fixed;
.toggler {
width: 15px;
right: 1px;
position: absolute;
font-size: 1.071em;
color: scale-color($primary, $lightness: 50%);
padding: 0 10px 5px 10px;
&:before {
font-family: "FontAwesome";
content: "\f078";
}
}
a.cancel {
padding-left: 7px;
float: left;
margin-top: 6px;
}
.control-row {
margin: 0 0 0 5px;
.reply-to {
overflow: hidden;
max-width: 92%;
white-space: nowrap;
}
}
.saving-text {
display: none;
}
.draft-text {
display: none;
}
.grippie {
display: none;
}
// The various states
&.open {
max-height: 100%; // ensure no overflow e.g. on small Android
height: 270px;
}
&.closed {
height: 0 !important;
}
&.draft {
height: 35px !important;
cursor: pointer;
border-top: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
.draft-text {
display: block;
position: absolute;
margin-right: 40px;
}
.toggler {
&:before {
font-family: "FontAwesome";
content: "\f077";
}
}
}
&.saving {
height: 40px !important;
border-top: 1px solid dark-light-diff($primary, $secondary, 90%, -60%);
.saving-text {
display: block;
}
.toggler {
&:before {
font-family: "FontAwesome";
content: "\f00d";
}
}
}
// if this is a new topic, make room for the category field in the editor on
// a small screen mobile device
&.edit-title {
&.open {
max-height: 100%; // ensure no overflow e.g. on small Android
height: 250px;
}
.contents {
input#reply-title {
padding: 5px;
margin-top: 6px;
width: 99%;
box-sizing: border-box;
}
.wmd-controls {
transition: top 0.3s ease;
top: 110px;
}
}
}
.contents {
padding: 8px 5px 0 5px;
.form-element {
.select2-container {
width: 99%;
margin-top: 6px;
a {
padding-top: 4px;
height: 28px;
}
b {
margin-top: 4px;
}
}
}
.edit-reason-input, .display-edit-reason {
display: none;
}
.edit-reason-input {
display: inline-block;
margin-left: 2px;
#edit-reason {
margin: 0;
padding: 2px;
}
}
#reply-title {
margin-right: 10px;
&:disabled {
background-color: scale-color($primary, $lightness: 75%);
}
}
.wmd-input:disabled {
background-color: scale-color($primary, $lightness: 75%);
}
.wmd-input {
color: darken($primary, 40%);
}
.wmd-input {
bottom: 35px;
}
.submit-panel {
position: absolute;
display: block;
bottom: 2px;
}
}
.category-input {
// hack, select2 is using inline styles
.select2-container {
width: 99% !important;
}
}
.popup-tip .close {
padding: 0 2px 2px 8px; // so my fingers can touch the little x
}
.title-input .popup-tip {
width: 240px;
right: 5px;
}
.category-input .popup-tip {
width: 240px;
right: 5px;
}
.textarea-wrapper .popup-tip {
top: 28px;
}
button.btn.no-text {
margin: 7px 0 0 5px;
position: absolute;
}
}
#reply-control.edit-title.private-message {
.wmd-controls {
transition: top 0.3s ease;
top: 120px;
}
}
#reply-control {
.wmd-controls {
left: 10px;
right: 10px;
position: absolute;
top: 40px;
bottom: 50px;
display: block;
.wmd-input {
width: 100%;
height: 100%;
min-height: 100%;
padding: 7px;
margin: 0;
background-color: $secondary;
word-wrap: break-word;
box-sizing: border-box;
}
.wmd-input {
position: absolute;
left: 0;
top: 0;
}
.textarea-wrapper {
position: relative;
box-sizing: border-box;
height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
.popup-tip {
margin-top: 3px;
right: 4px;
}
}
}
.wmd-button-bar {
display: none;
}
}
// make sure the category selector *NEVER* gets focus by default on mobile anywhere
.select2-hidden,
.select2-search,
.select2-focusser {
display:none !important;
}