mirror of
https://github.com/discourse/discourse.git
synced 2024-12-20 01:49:26 +08:00
7776773a11
In some rare cases, this was causing the input to be invisible. The change here means the input will have a smaller max height, but since here we are limiting this to 25% of the viewport height, it should be more than fine. It's also not necessary to include the `chat-header-offset`, it ends up being only a few pixels' difference (since, again, it is divided by 4).
132 lines
2.3 KiB
SCSS
132 lines
2.3 KiB
SCSS
.chat-composer {
|
|
&__wrapper {
|
|
display: flex;
|
|
flex-direction: column;
|
|
z-index: 3;
|
|
padding: 0.5rem 0 env(safe-area-inset-bottom) 0;
|
|
|
|
.keyboard-visible & {
|
|
padding-bottom: 0;
|
|
}
|
|
|
|
#chat-full-page-uploader,
|
|
#chat-widget-uploader {
|
|
display: none;
|
|
}
|
|
|
|
.drop-a-file {
|
|
display: none;
|
|
}
|
|
|
|
.chat-replying-indicator {
|
|
padding-inline: 1rem;
|
|
}
|
|
}
|
|
|
|
.chat-composer-button,
|
|
.chat-composer-separator {
|
|
align-self: flex-end;
|
|
}
|
|
|
|
.chat-composer-separator {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
&__outer-container {
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
padding-inline: 1rem;
|
|
}
|
|
|
|
&__inner-container {
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
flex-direction: row;
|
|
border: 1px solid var(--primary-low);
|
|
border-radius: var(--d-border-radius-large);
|
|
background: rgba(var(--primary-very-low-rgb), 0.5);
|
|
min-height: 50px;
|
|
overflow: hidden;
|
|
|
|
.chat-composer.is-focused & {
|
|
box-shadow: 0 0 1px 0 var(--tertiary);
|
|
}
|
|
|
|
.chat-composer.is-disabled & {
|
|
background: var(--primary-low);
|
|
|
|
&:hover {
|
|
cursor: not-allowed;
|
|
}
|
|
}
|
|
}
|
|
|
|
&__input-container {
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
align-self: stretch;
|
|
}
|
|
|
|
--100dvh: 100vh;
|
|
@supports (height: 100dvh) {
|
|
--100dvh: 100dvh;
|
|
}
|
|
|
|
&__input {
|
|
overflow-x: hidden;
|
|
width: 100%;
|
|
appearance: none;
|
|
outline: none;
|
|
border: 0;
|
|
resize: none;
|
|
max-height: calc(var(--100dvh) / 4);
|
|
background: none;
|
|
padding: 0;
|
|
margin: 5px 0;
|
|
text-overflow: ellipsis;
|
|
cursor: inherit;
|
|
@include chat-scrollbar();
|
|
|
|
&[disabled] {
|
|
background: none;
|
|
|
|
.d-icon {
|
|
opacity: 0.4;
|
|
}
|
|
}
|
|
|
|
&:focus,
|
|
&:active {
|
|
outline: none;
|
|
}
|
|
|
|
&:placeholder-shown,
|
|
&::placeholder {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
}
|
|
|
|
&__unreliable-network {
|
|
color: var(--danger);
|
|
padding: 0 0.5em;
|
|
}
|
|
}
|
|
|
|
.chat-composer-message-details {
|
|
margin: 0 1rem 0.5rem 1rem;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.cancel-message-action {
|
|
margin-left: auto;
|
|
}
|
|
}
|