0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-09 21:45:25 +08:00
discourse/plugins/chat/assets/stylesheets/common/chat-composer.scss
Joffrey JAFFEUX 796e80f939
UI: slightly reduce padding above chat composer (#35546)
It's a very minor detail, but it seems slightly too much atm and every
space we can win on mobile is good.

Before:
<img width="782" height="94" alt="Screenshot 2025-10-22 at 15 25 12"
src="https://github.com/user-attachments/assets/a224326c-1874-42c0-9399-745b20284d75"
/>

After:
<img width="780" height="101" alt="Screenshot 2025-10-22 at 15 25 06"
src="https://github.com/user-attachments/assets/e7b5dd2e-a905-48b2-bbf0-06260a7bca9e"
/>

---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
2025-10-23 09:49:18 +02:00

134 lines
2.4 KiB
SCSS
Vendored

:root {
--d-chat-input-border-color: var(--primary-low);
--d-chat-input-bg-color: rgb(var(--primary-very-low-rgb), 0.5);
--d-chat-input-focused-shadow: 0 0 1px 0 var(--tertiary);
}
.chat-composer {
&__wrapper {
display: flex;
flex-direction: column;
z-index: 3;
padding: var(--space-1) 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(--d-chat-input-border-color);
border-radius: var(--d-border-radius-large);
background: var(--d-chat-input-bg-color);
min-height: 50px;
overflow: hidden;
.chat-composer.is-focused & {
box-shadow: var(--d-chat-input-focused-shadow);
}
.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;
}
&__input {
overflow-x: hidden;
width: 100%;
appearance: none;
outline: none;
border: 0;
resize: none;
max-height: 25dvh;
background: none;
padding: 0;
margin: 5px 0;
text-overflow: ellipsis;
cursor: inherit;
white-space: pre-wrap !important;
min-width: 20px;
@include chat-scrollbar;
&[disabled] {
background: none;
.d-icon {
opacity: 0.4;
}
}
&:focus,
&:active {
outline: none;
}
&::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;
}
}