2015-07-17 13:35:34 +08:00
|
|
|
// ------------------------------------
|
|
|
|
// Composer
|
|
|
|
|
|
|
|
.Composer {
|
|
|
|
pointer-events: auto;
|
|
|
|
.box-shadow(0 2px 6px @shadow-color);
|
|
|
|
|
|
|
|
&.minimized {
|
2015-07-28 18:26:43 +08:00
|
|
|
height: 46px;
|
2015-07-17 13:35:34 +08:00
|
|
|
cursor: pointer;
|
2015-07-28 18:26:43 +08:00
|
|
|
background: @control-bg;
|
2015-07-17 13:35:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.Composer-controls {
|
|
|
|
list-style: none;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
.ComposerBody-content {
|
|
|
|
.minimized & {
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.ComposerBody-header {
|
|
|
|
list-style: none;
|
|
|
|
padding: 1px 0;
|
|
|
|
margin: 0 0 10px;
|
|
|
|
|
|
|
|
.minimized & {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
> li {
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: -4px;
|
|
|
|
}
|
|
|
|
h3 {
|
|
|
|
margin: 0;
|
|
|
|
line-height: 1.5em;
|
2016-02-26 10:19:49 +08:00
|
|
|
color: @secondary-color;
|
2015-07-17 13:35:34 +08:00
|
|
|
|
|
|
|
&, input, a {
|
|
|
|
font-size: 14px;
|
|
|
|
font-weight: normal;
|
|
|
|
}
|
2016-02-26 10:19:49 +08:00
|
|
|
input, a {
|
|
|
|
color: inherit;
|
|
|
|
}
|
2015-07-17 13:35:34 +08:00
|
|
|
input {
|
|
|
|
font-size: 16px;
|
2015-07-23 13:05:05 +08:00
|
|
|
width: 500px;
|
2015-07-17 13:35:34 +08:00
|
|
|
|
|
|
|
&, &[disabled], &:focus {
|
|
|
|
background: none;
|
|
|
|
border: 0;
|
|
|
|
padding: 0 20px 0 0;
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.icon {
|
|
|
|
font-size: 14px;
|
2017-07-22 10:15:42 +08:00
|
|
|
margin-right: 3px;
|
2015-07-17 13:35:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.fa-minus.minimize {
|
|
|
|
vertical-align: -5px;
|
|
|
|
}
|
|
|
|
.Composer-controls {
|
|
|
|
position: absolute;
|
|
|
|
right: 10px;
|
|
|
|
top: 10px;
|
|
|
|
z-index: 1;
|
|
|
|
|
|
|
|
& li {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
.minimized & {
|
|
|
|
top: 7px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.ComposerBody-loading {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
background: fade(@body-bg, 90%);
|
2017-11-05 13:51:18 +08:00
|
|
|
display: none;
|
2015-07-17 13:35:34 +08:00
|
|
|
border-radius: @border-radius @border-radius 0 0;
|
|
|
|
|
|
|
|
&.active {
|
2017-11-05 13:51:18 +08:00
|
|
|
display: block;
|
2015-07-17 13:35:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.ComposerBody-editor {
|
|
|
|
.minimized & {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// On phones, show the composer as a fixed overlay that covers the whole
|
|
|
|
// screen. The controls are hidden (except for the 'x', which is the back-
|
|
|
|
// control), and the avatar hidden.
|
|
|
|
@media @phone {
|
|
|
|
.Composer {
|
|
|
|
position: fixed;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
z-index: @zindex-composer;
|
|
|
|
background: @body-bg;
|
|
|
|
|
|
|
|
&:not(.minimized) {
|
2015-08-04 09:57:51 +08:00
|
|
|
position: absolute;
|
2015-07-17 13:35:34 +08:00
|
|
|
top: 0;
|
2017-11-05 13:55:21 +08:00
|
|
|
height: 300px !important;
|
2015-07-17 13:35:34 +08:00
|
|
|
padding-top: @header-height-phone;
|
|
|
|
|
|
|
|
&:before {
|
|
|
|
content: " ";
|
|
|
|
.header-background();
|
2015-08-04 09:57:51 +08:00
|
|
|
position: absolute;
|
2015-07-17 13:35:34 +08:00
|
|
|
opacity: 0;
|
|
|
|
|
|
|
|
.visible& {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
& .Composer-controls {
|
2015-08-04 09:57:51 +08:00
|
|
|
position: static;
|
2015-07-17 13:35:34 +08:00
|
|
|
z-index: @zindex-header + 1;
|
|
|
|
|
|
|
|
li:not(.App-backControl) {
|
|
|
|
display: none;
|
|
|
|
}
|
2015-08-04 09:57:51 +08:00
|
|
|
.App-backControl {
|
|
|
|
position: absolute !important;
|
|
|
|
}
|
2015-07-17 13:35:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-11-21 10:46:05 +08:00
|
|
|
.Composer-controls .fa-minus:before {
|
|
|
|
content: @fa-var-times;
|
|
|
|
}
|
2015-08-04 09:57:51 +08:00
|
|
|
.composer-backdrop {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
z-index: @zindex-composer - 1;
|
|
|
|
background-color: @overlay-bg;
|
|
|
|
opacity: 0.9;
|
|
|
|
}
|
2015-07-17 13:35:34 +08:00
|
|
|
.ComposerBody-content {
|
|
|
|
.minimized & {
|
|
|
|
margin-right: 50px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.ComposerBody-avatar {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
.ComposerBody-header {
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
|
|
|
> li {
|
|
|
|
display: block;
|
|
|
|
border-bottom: 1px solid @control-bg;
|
|
|
|
padding: 10px 15px;
|
|
|
|
|
|
|
|
.minimized & {
|
|
|
|
border-bottom: 0;
|
|
|
|
padding: 15px;
|
|
|
|
}
|
2015-11-21 10:46:05 +08:00
|
|
|
|
|
|
|
.normal &:first-child {
|
|
|
|
margin: -@header-height-phone 50px 0;
|
|
|
|
text-align: center;
|
|
|
|
position: relative;
|
|
|
|
z-index: @zindex-header + 1;
|
|
|
|
border: 0;
|
|
|
|
white-space: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
2016-02-26 10:19:49 +08:00
|
|
|
|
|
|
|
h3 {
|
|
|
|
color: @header-control-color;
|
|
|
|
}
|
2015-11-21 10:46:05 +08:00
|
|
|
}
|
2015-07-17 13:35:34 +08:00
|
|
|
}
|
2016-09-03 21:42:59 +08:00
|
|
|
h3 input {
|
|
|
|
width: 100% !important;
|
2015-07-17 13:35:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.ComposerBody-editor {
|
|
|
|
padding: 15px;
|
2015-11-21 10:46:05 +08:00
|
|
|
}
|
|
|
|
.ComposerBody-editor .TextEditor-controls .item-submit {
|
|
|
|
position: absolute !important;
|
2015-07-17 13:35:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// On larger screens, show the composer as a window at the bottom of the
|
|
|
|
// content area. We hide a lot of the content when the composer is minimized.
|
|
|
|
@media @tablet-up {
|
|
|
|
.App-composer {
|
|
|
|
position: fixed;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
z-index: @zindex-composer;
|
|
|
|
pointer-events: none;
|
|
|
|
.transition(left 0.2s);
|
|
|
|
}
|
|
|
|
.Composer {
|
|
|
|
border-radius: @border-radius @border-radius 0 0;
|
|
|
|
background: fade(@body-bg, 95%);
|
|
|
|
transform: translateZ(0); // Fix for Chrome bug where a transparent white background is actually gray
|
|
|
|
position: relative;
|
|
|
|
height: 300px;
|
|
|
|
.transition(~"background 0.2s, box-shadow 0.2s");
|
|
|
|
|
|
|
|
&.active, &.fullScreen {
|
|
|
|
background: @body-bg;
|
|
|
|
}
|
|
|
|
&.active:not(.fullScreen) {
|
2015-07-28 14:39:57 +08:00
|
|
|
.box-shadow(~"0 0 0 2px @{primary-color}, 0 2px 6px @{shadow-color}");
|
2015-07-17 13:35:34 +08:00
|
|
|
}
|
|
|
|
&.fullScreen {
|
|
|
|
position: fixed;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
right: 0;
|
|
|
|
margin: 0;
|
|
|
|
height: auto;
|
2015-08-04 09:19:33 +08:00
|
|
|
border-radius: 0;
|
2015-07-17 13:35:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.Composer-controls {
|
|
|
|
.fullScreen & .Button {
|
|
|
|
padding: 13px;
|
|
|
|
width: auto;
|
|
|
|
|
|
|
|
.Button-icon {
|
|
|
|
font-size: 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.ComposerBody-header {
|
|
|
|
.fullScreen & {
|
|
|
|
margin-bottom: 20px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.Composer-content {
|
|
|
|
padding: 20px 20px 0;
|
|
|
|
|
|
|
|
.minimized & {
|
|
|
|
padding: 12px 20px;
|
|
|
|
}
|
|
|
|
.fullScreen & {
|
|
|
|
max-width: 900px;
|
|
|
|
margin: 0 auto;
|
|
|
|
padding: 30px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.Composer-handle {
|
|
|
|
height: 15px;
|
|
|
|
margin-bottom: -17px;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
.minimized &, .fullScreen & {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.ComposerBody-avatar {
|
|
|
|
float: left;
|
|
|
|
.Avatar--size(64px);
|
|
|
|
|
|
|
|
.minimized &, .fullScreen & {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.ComposerBody-content {
|
2016-04-08 12:22:17 +08:00
|
|
|
margin-left: 85px;
|
2015-07-17 13:35:34 +08:00
|
|
|
|
|
|
|
.minimized &, .fullScreen & {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.ComposerBody-editor {
|
|
|
|
.fullScreen & textarea {
|
|
|
|
font-size: 16px;
|
|
|
|
}
|
|
|
|
}
|
2015-11-21 10:46:05 +08:00
|
|
|
.ComposerBody--discussion .ComposerBody-header .item-title {
|
|
|
|
display: none;
|
|
|
|
}
|
2015-07-17 13:35:34 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@media @desktop-up {
|
|
|
|
.Composer:not(.fullScreen) {
|
2015-09-16 14:34:15 +08:00
|
|
|
.App--index & {
|
2016-04-08 12:22:17 +08:00
|
|
|
margin-left: 220px;
|
2015-09-16 14:34:15 +08:00
|
|
|
margin-right: -20px;
|
|
|
|
}
|
2015-08-04 09:19:33 +08:00
|
|
|
.App--discussion & {
|
|
|
|
margin-left: -20px;
|
2015-09-22 15:42:50 +08:00
|
|
|
margin-right: 205px;
|
2015-07-17 13:35:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media @desktop-hd {
|
|
|
|
.hasPane.panePinned .App-composer {
|
|
|
|
left: @pane-width;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ------------------------------------
|
|
|
|
// Text Editor
|
|
|
|
|
2016-09-03 21:42:59 +08:00
|
|
|
.TextEditor textarea {
|
|
|
|
border-radius: 0;
|
|
|
|
padding: 0 0 10px;
|
|
|
|
border: 0;
|
|
|
|
resize: none;
|
|
|
|
color: @text-color;
|
|
|
|
font-size: 14px;
|
|
|
|
line-height: 1.7;
|
|
|
|
|
|
|
|
&, &:focus, &[disabled] {
|
|
|
|
background: none;
|
2015-07-17 13:35:34 +08:00
|
|
|
border: 0;
|
2016-09-03 21:42:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@media @phone {
|
|
|
|
font-size: 16px; // minimum font-size required to prevent page zoom on focus in iOS 10
|
2015-07-17 13:35:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.TextEditor-controls {
|
|
|
|
margin: 0;
|
|
|
|
padding: 15px 0;
|
|
|
|
list-style-type: none;
|
|
|
|
|
|
|
|
& li {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media @tablet-up {
|
|
|
|
.TextEditor-controls {
|
2016-04-08 12:22:17 +08:00
|
|
|
margin: 0 -20px 0 -105px;
|
2015-07-28 12:04:42 +08:00
|
|
|
padding: 10px 20px;
|
2015-07-17 13:35:34 +08:00
|
|
|
border-top: 1px solid @control-bg;
|
|
|
|
|
2015-07-28 12:04:42 +08:00
|
|
|
li {
|
|
|
|
margin-right: 5px;
|
|
|
|
}
|
|
|
|
|
2015-07-17 13:35:34 +08:00
|
|
|
.fullScreen & {
|
|
|
|
margin: 0;
|
|
|
|
border-top: 0;
|
|
|
|
padding: 20px 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|