discourse/app/assets/stylesheets/application/compose.css.scss
2013-02-08 12:07:32 -08:00

373 lines
7.0 KiB
SCSS

// styles that apply to the reply pane that slides up to compose replies
@import "foundation/variables";
@import "foundation/mixins";
#reply-control {
.toggle-preview, .saving-draft {
position: absolute;
bottom: -31px;
margin-top: 0px;
}
.toggle-preview {
right: 5px;
text-decoration: underline;
}
.saving-draft {
right: 51%;
color: lighten($black, 60);
}
@include transition(height 0.4s ease);
width: 100%;
z-index: 1039;
height: 0px;
background-color: rgba($composer_background, 0.96);
bottom: 0px;
font-size: 14px;
position: fixed;
.toggler {
display: block;
width: 13px;
height: 13px;
right: 13px;
position: absolute;
font-size: 15px;
color: $darkish_gray;
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: 0px !important;
}
&.draft {
height: 40px !important;
cursor: pointer;
border-top: 1px solid $gray;
.draft-text {
display: block;
}
.toggler {
&:before {
font-family: "FontAwesome";
content: "\f077";
}
}
}
&.saving {
height: 40px !important;
border-top: 1px solid $gray;
.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: $black;
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;
}
.autocomplete {
z-index: 999;
position: absolute;
width: 200px;
background-color: $white;
border: 1px solid $gray;
ul {
list-style: none;
padding: 0;
margin: 0;
li {
border-bottom: 1px solid $light_gray;
a[href] {
padding: 5px;
display: block;
span.username {
color: lighten($black, 20);
}
span.name {
font-size: 11px;
}
&.selected {
background-color: $light_gray;
}
@include hover {
background-color: $light_gray;
text-decoration: none;
}
}
}
}
}
// When the post is new (new topic) the sizings are different
&.edit-title {
&.open {
height: 400px;
}
.contents {
input[type=text] {
padding: 7px 10px;
margin: 6px 0 3px 0;
}
.wmd-controls {
top: 110px;
}
}
}
.contents {
padding: 10px;
min-width: 1280px;
.form-element {
.chzn-container {
margin-top: 6px;
a {
padding-top: 4px;
height: 28px;
}
b {
margin-top: 4px;
}
}
}
#reply-title {
margin-right: 10px;
float: left;
&:disabled {
background-color: $light_gray;
}
}
#wmd-input:disabled {
background-color: $light_gray;
}
#wmd-input, #wmd-preview {
color: $black;
img {
// Otherwise we get the wrong size in JS
max-width: none;
}
}
#wmd-preview {
border: 1px dashed $gray;
overflow: auto;
visibility: visible;
p {
margin-top: 0;
}
&.hidden {
width: 0;
visibility: hidden;
}
}
#wmd-input {
bottom: 35px;
}
.submit-panel {
position: absolute;
display: block;
bottom: 8px;
#image-uploading {
display: inline-block;
margin-left: 330px;
font-size: 12px;
color: darken($gray, 40);
}
}
}
}
.reply-to {
margin-bottom: 10px;
margin-left: 5px;
}
#main #reply-control {
div.ac-wrap {
background-color: $white;
border: 1px solid #cccccc;
padding: 4px 10px;
@include border-radius-all(3px);
div.item {
float: left;
margin-right: 10px;
span {
padding-left: 5px;
height: 22px;
display: inline-block;
line-height: 22px;
vertical-align: bottom;
}
a {
margin-left: 4px;
font-size: 10px;
line-height: 10px;
padding: 2px 1px 1px 3px;
border-radius: 10px;
width: 10px;
display: inline-block;
border: 1px solid rgba(255, 255, 255, 0);
&:hover {
background-color: lighten($red, 45);
border: 1px solid lighten($red, 20);
text-decoration: none;
color: $white;
}
}
}
input[type="text"] {
float: left;
margin-top: 5px;
border: 0;
padding: 0;
margin: 4px 0 0;
box-shadow: none;
}
}
}
#reply-control.edit-title.private-message {
.wmd-controls {
top: 140px;
}
}
#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;
top: 60px;
bottom: 48px;
#wmd-input, #wmd-preview {
box-sizing: border-box;
-moz-box-sizing: border-box;
width: 100%;
height: 100%;
min-height: 100%;
padding: 7px;
margin: 0;
background-color: $white;
word-wrap: break-word;
}
#wmd-input {
position: absolute;
left: 0;
top: 0;
height: 100%;
min-height: 100%;
box-sizing: border-box;
border: 0;
border-top: 36px solid transparent;
@include border-radius-all(0);
transition: none;
}
.textarea-wrapper, .preview-wrapper {
position: relative;
box-sizing: border-box;
-moz-box-sizing: border-box;
height: 100%;
min-height: 100%;
margin: 0;
padding: 0;
width: 50%;
}
.textarea-wrapper {
padding-right: 5px;
float: left;
}
.preview-wrapper {
padding-left: 5px;
float: right;
}
}
#wmd-button-bar {
top: 0;
position: absolute;
border-bottom: 1px solid $inner_line;
background-color: $white;
z-index: 100;
}
}
.control-row.reply-area {
padding-left: 20px;
padding-right: 20px;
}
@media screen and (min-width: 1550px) {
#reply-control {
.wmd-controls {
width: 1450px;
left: auto;
right: auto;
}
}
}