Files
element-web/res/css/views/rooms/_MessageComposer.pcss
Nik Rozman d8304df7f3
Some checks failed
Localazy Upload / upload (push) Failing after 0s
Static Analysis / i18n Check (push) Failing after 0s
Docker / Docker Buildx (push) Has been cancelled
Build / Build on macos-14 (push) Has been cancelled
Build / Build on ubuntu-24.04 (push) Has been cancelled
Build / Build on windows-2022 (push) Has been cancelled
Build and Deploy develop / Build & Deploy develop.element.io (push) Has been cancelled
Deploy documentation / GitHub Pages (push) Has been cancelled
Shared Component Visual Tests / Run Visual Tests (push) Has been cancelled
Static Analysis / Typescript Syntax Check (push) Has been cancelled
Static Analysis / Rethemendex Check (push) Has been cancelled
Static Analysis / ESLint (push) Has been cancelled
Static Analysis / Style Lint (push) Has been cancelled
Static Analysis / Workflow Lint (push) Has been cancelled
Static Analysis / Analyse Dead Code (push) Has been cancelled
Deploy documentation / deploy (push) Has been cancelled
Close stale issues & PRs / close (push) Has been cancelled
Update Playwright docker images / update (push) Has been cancelled
Update Jitsi / update (push) Has been cancelled
Sync labels / sync-labels (push) Failing after 1s
Localazy Download / download (push) Failing after 1s
Merge remote-tracking branch 'github.com/develop' into develop
# Conflicts:
#	package.json
#	res/css/views/rooms/_MessageComposer.pcss
#	src/components/views/rooms/EventTile.tsx
#	src/components/views/rooms/MessageComposer.tsx
#	src/utils/WellKnownUtils.ts
#	yarn.lock
2025-12-31 12:37:45 +01:00

312 lines
6.2 KiB
Plaintext

/*
Copyright 2018-2024 New Vector Ltd.
Copyright 2015, 2016 OpenMarket Ltd
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/
.mx_MessageComposer_wrapper {
vertical-align: middle;
position: relative;
padding-left: 50px;
padding-right: 16px;
background-color: rgba(255, 255, 255, 0.05);
}
.mx_MessageComposer_replaced_wrapper {
margin-left: auto;
margin-right: auto;
}
.mx_MessageComposer_replaced_valign {
height: 60px;
display: table-cell;
vertical-align: middle;
}
.mx_MessageComposer_roomReplaced_icon {
float: left;
margin-right: 20px;
margin-top: 5px;
width: 31px;
height: 31px;
}
.mx_MessageComposer_roomReplaced_header {
font-weight: bold;
}
.mx_MessageComposer_row {
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
}
.mx_MessageComposer_actions {
display: flex;
align-items: center;
gap: 6px;
}
.mx_MessageComposer {
.mx_MessageComposer_avatar {
position: absolute;
left: 26px;
.mx_BaseAvatar {
display: block;
}
}
}
.mx_MessageComposer_e2eIconWrapper {
height: 16px; /* Match the height of the E2E icon for alignment */
padding-left: 24px; /* Space for the E2E icon */
}
.mx_MessageComposer_e2eIcon.mx_E2EIcon {
position: absolute;
left: 20px;
top: 22px;
margin-right: 0; /* Counteract the E2EIcon class */
margin-left: 3px; /* Counteract the E2EIcon class */
.mx_MessageComposer_e2eIcon {
margin: 0;
width: inherit;
height: inherit;
}
}
.mx_MessageComposer_noperm_error {
width: 100%;
height: 60px;
font-style: italic;
color: $info-plinth-fg-color;
display: flex;
align-items: center;
justify-content: center;
}
.mx_MessageComposer_input {
flex: 1;
vertical-align: middle;
display: flex;
flex-direction: column;
min-height: 60px;
justify-content: flex-start;
align-items: flex-start;
font: var(--cpd-font-body-md-regular);
margin-right: 6px;
pre {
background-color: $rte-code-bg-color;
border-radius: 3px;
padding: 10px;
}
textarea {
display: block;
width: 100%;
padding: 0px;
margin-top: 6px;
margin-bottom: 6px;
border: 0px;
resize: none;
outline: none;
box-shadow: none;
color: $primary-content;
background-color: $background;
font: var(--cpd-font-body-md-regular);
max-height: 120px;
overflow: auto;
/* hack for FF as vertical alignment of custom placeholder text is broken */
&::-moz-placeholder {
line-height: 100%;
color: $accent;
opacity: 1;
}
&::-webkit-input-placeholder {
color: $accent;
}
}
}
.mx_MessageComposer_editor {
width: 100%;
max-height: 120px;
min-height: 19px;
overflow-y: auto;
overflow-x: hidden;
word-break: break-word;
/* FIXME: rather unpleasant hack to get rid of <p/> margins. */
/* really we should be mixing in markdown-body from github-markdown-css instead */
> :first-child {
margin-top: 0 !important;
}
> :last-child {
margin-bottom: 0 !important;
}
}
@keyframes visualbell {
from {
background-color: $visual-bell-bg-color;
}
to {
background-color: $background;
}
}
.mx_GifButton_icon {
mask-image: url("$(res)/img/element-icons/room/composer/gif.svg");
mask-repeat: no-repeat;
mask-size: contain;
mask-position: center;
}
.mx_MessageComposer_input_error {
animation: 0.2s visualbell;
}
.mx_MessageComposer_button_highlight {
@mixin composerButtonHighLight;
}
.mx_MessageComposer_button {
@mixin composerButton 50%, var(--cpd-color-icon-primary), var(--cpd-color-bg-subtle-primary);
padding: 3px;
height: 20px;
width: 20px;
&:last-child {
margin-right: auto;
}
&.mx_MessageComposer_closeButtonMenu {
&::after {
background: var(--cpd-color-bg-subtle-primary);
}
&::before {
background-color: var(--cpd-color-icon-primary);
z-index: 2;
}
}
svg {
width: inherit;
height: inherit;
}
}
.mx_MessageComposer_wysiwyg {
.mx_MessageComposer_wrapper {
padding-left: 16px;
margin-top: 6px;
margin-bottom: 12px;
}
.mx_MessageComposer_row {
align-items: flex-end;
}
.mx_MessageComposer_actions {
/* Height of the composer editor */
height: 40px;
}
.mx_MediaBody {
padding-top: 4px;
padding-bottom: 4px;
}
.mx_MessageComposer_button {
@mixin composerButton 5px, $tertiary-content, $panels;
&.mx_MessageComposer_closeButtonMenu {
&::after {
background: $accent-300;
}
&::before {
background-color: $accent;
z-index: 2;
}
}
}
}
.mx_MessageComposer_buttonMenu {
width: 24px;
height: 24px;
padding: 1px;
svg {
width: 24px;
height: 24px;
}
}
.mx_MessageComposer_sendMessage {
cursor: pointer;
position: relative;
padding: var(--cpd-space-2x);
border-radius: 100%;
background-color: var(--cpd-color-icon-accent-tertiary);
height: 16px;
width: 16px;
svg {
height: inherit;
width: inherit;
color: var(--cpd-color-icon-on-solid-primary);
}
}
.mx_MatrixChat_useCompactLayout {
.mx_MessageComposer_input {
min-height: 50px;
}
.mx_MessageComposer_noperm_error {
height: 50px;
}
}
/**
* Unstable compact mode
*/
.mx_MessageComposer.mx_MessageComposer--compact {
margin-right: 0;
.mx_MessageComposer_wrapper {
padding: 0 0 0 25px;
}
.mx_MessageComposer_e2eIconWrapper {
left: 0;
}
&:not(.mx_MessageComposer_e2eStatus) {
.mx_MessageComposer_wrapper {
padding: 0;
}
}
.mx_MessageComposer_button:last-child {
margin-right: 0;
}
.mx_MessageComposer_e2eIcon {
left: 0;
}
}