mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 05:43:38 +08:00
0b34d5ac6c
A follow-up to #15117 and #15141. Applies the previous changes to PM-specific fields, makes the preview area take the all the available height of the composer, and unifies more spacing between composer elements.
296 lines
5.1 KiB
SCSS
296 lines
5.1 KiB
SCSS
#reply-control {
|
|
.reply-area {
|
|
margin: 0 auto;
|
|
padding: 8px;
|
|
box-sizing: border-box;
|
|
height: 100%;
|
|
width: 100%;
|
|
|
|
.submit-panel {
|
|
flex-wrap: wrap;
|
|
}
|
|
}
|
|
|
|
.select-kit.is-expanded {
|
|
z-index: z("composer", "dropdown") + 1;
|
|
}
|
|
|
|
&.private-message {
|
|
.with-tags {
|
|
.title-and-category {
|
|
flex-wrap: nowrap; // force title and tags on same line for PMs
|
|
.mini-tag-chooser {
|
|
margin-bottom: 8px; // match title input margin
|
|
flex: 0 0 auto;
|
|
margin-left: 8px; // matches margin between category and tag input
|
|
width: 39%;
|
|
}
|
|
}
|
|
}
|
|
|
|
#private-message-users,
|
|
.users-input {
|
|
width: 100%;
|
|
flex: 0 0 auto;
|
|
&.can-warn {
|
|
// space for warning, inverse of mini-tag-chooser width
|
|
width: 60%;
|
|
}
|
|
}
|
|
|
|
.add-warning {
|
|
flex: 1 1 auto;
|
|
overflow: hidden;
|
|
span {
|
|
// protects the space of the user input in case there's a very long translation
|
|
@include ellipsis;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.closed {
|
|
.grippie {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.open {
|
|
.grippie {
|
|
cursor: row-resize;
|
|
padding: 4px 0;
|
|
background: var(--tertiary);
|
|
margin-top: -11px;
|
|
|
|
&:before {
|
|
content: "";
|
|
display: block;
|
|
width: 24px;
|
|
margin: auto;
|
|
border-top: 3px double var(--tertiary-medium);
|
|
}
|
|
}
|
|
}
|
|
|
|
.discourse-touch {
|
|
.open {
|
|
.grippie {
|
|
padding: 7px 0;
|
|
margin-top: -17px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.composer-popup {
|
|
box-sizing: border-box;
|
|
position: absolute;
|
|
width: calc(50% - 8px);
|
|
top: 8px; // .reply-to margin-top + .reply-area padding-top
|
|
bottom: 8px;
|
|
right: 8px;
|
|
overflow-y: auto;
|
|
z-index: z("composer", "popover");
|
|
padding: 1.5em;
|
|
box-shadow: shadow("dropdown");
|
|
background: var(--highlight-medium);
|
|
|
|
.hide-preview & {
|
|
z-index: z("composer", "dropdown") + 1;
|
|
}
|
|
|
|
&.urgent {
|
|
background: var(--danger-low);
|
|
}
|
|
|
|
&.education-message {
|
|
background-color: var(--tertiary-low);
|
|
}
|
|
|
|
&.dominating-topic-message,
|
|
&.get-a-room {
|
|
bottom: unset;
|
|
padding: 2.25em 6em 2.5em 2.25em;
|
|
p {
|
|
margin-top: 0;
|
|
font-size: var(--font-up-1);
|
|
}
|
|
button {
|
|
margin-top: 0.5em;
|
|
}
|
|
}
|
|
|
|
h3 {
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
a.close {
|
|
display: flex;
|
|
align-items: center;
|
|
position: absolute;
|
|
right: 10px;
|
|
top: 10px;
|
|
color: var(--primary);
|
|
opacity: 0.5;
|
|
font-size: $font-up-1;
|
|
&:before {
|
|
content: "esc";
|
|
font-size: $font-down-1;
|
|
margin-right: 0.5em;
|
|
}
|
|
}
|
|
|
|
a.close:hover {
|
|
opacity: 1;
|
|
}
|
|
|
|
ul {
|
|
margin: 0;
|
|
padding: 0 0 0 1.5em;
|
|
&.list,
|
|
&.topics {
|
|
list-style: none;
|
|
padding: 0;
|
|
}
|
|
|
|
li {
|
|
font-weight: normal;
|
|
margin-top: 8px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.composer-controls {
|
|
.d-chevron-down {
|
|
vertical-align: text-top;
|
|
}
|
|
}
|
|
|
|
.custom-body {
|
|
background-color: var(--tertiary-low);
|
|
p {
|
|
max-width: 98%;
|
|
}
|
|
}
|
|
|
|
.similar-topics {
|
|
background-color: var(--tertiary-low);
|
|
|
|
a[href] {
|
|
color: var(--primary);
|
|
}
|
|
|
|
.posts-count {
|
|
background-color: var(--tertiary);
|
|
}
|
|
|
|
.search-link {
|
|
.topic-title {
|
|
flex: 0 1 auto;
|
|
margin-right: 0.5em;
|
|
}
|
|
span.badge-wrapper {
|
|
margin-left: 0;
|
|
}
|
|
.blurb {
|
|
color: var(--primary-high);
|
|
}
|
|
.topic-title,
|
|
.blurb {
|
|
.d-icon {
|
|
color: var(--primary-high);
|
|
}
|
|
}
|
|
span.topic {
|
|
display: flex;
|
|
flex-direction: column;
|
|
|
|
.first-line {
|
|
flex: 1;
|
|
}
|
|
|
|
.second-line {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
|
|
.discourse-tags {
|
|
font-size: $font-down-1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.composer-popup:nth-of-type(2) {
|
|
width: calc(50% - 65px);
|
|
}
|
|
|
|
a.toggle-preview {
|
|
color: var(--primary-high);
|
|
&:hover {
|
|
color: var(--tertiary);
|
|
}
|
|
}
|
|
|
|
#draft-status,
|
|
#file-uploading {
|
|
flex-grow: 1;
|
|
text-align: right;
|
|
}
|
|
|
|
// fullscreen composer styles
|
|
.fullscreen-composer {
|
|
overflow: hidden;
|
|
|
|
.profiler-results {
|
|
display: none;
|
|
}
|
|
|
|
#reply-control {
|
|
&.fullscreen {
|
|
// important needed because of inline styles when height is changed manually with grippie
|
|
height: 100vh !important;
|
|
max-height: 100%; // prevents devices from miscalculating using vh
|
|
z-index: z("header") + 1;
|
|
|
|
@supports (--custom: property) {
|
|
height: calc(var(--composer-vh, 1vh) * 100) !important;
|
|
}
|
|
|
|
.d-editor-preview-wrapper {
|
|
margin-top: 1%;
|
|
}
|
|
|
|
.reply-to {
|
|
border-bottom: 1px solid var(--primary-low);
|
|
margin-bottom: 0;
|
|
padding-bottom: 8px;
|
|
}
|
|
|
|
.d-editor-textarea-wrapper {
|
|
border: none;
|
|
}
|
|
&.show-preview .d-editor-textarea-wrapper {
|
|
border-right: 1px solid var(--primary-low);
|
|
}
|
|
#draft-status,
|
|
#file-uploading {
|
|
margin-left: 0;
|
|
text-align: initial;
|
|
}
|
|
.composer-popup {
|
|
top: 30px;
|
|
}
|
|
&:before {
|
|
content: "";
|
|
background: var(--secondary);
|
|
width: 100%;
|
|
height: 100%;
|
|
position: fixed;
|
|
z-index: -1;
|
|
left: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|