Fix style for message-input-editor

This commit is contained in:
dimitrievgs 2025-10-19 16:48:59 +03:00
parent 1a7c1de507
commit e39be5259c
2 changed files with 24 additions and 24 deletions

View File

@ -255,8 +255,6 @@
) !important; /* Переменная для наведения */ ) !important; /* Переменная для наведения */
} }
/* Добавляем стили для нового интерфейса ввода */
.chat-input-container { .chat-input-container {
border-top: 1px solid var(--background-modifier-border); border-top: 1px solid var(--background-modifier-border);
padding: 8px 10px 4px 10px; padding: 8px 10px 4px 10px;
@ -270,43 +268,37 @@
margin-bottom: 8px; margin-bottom: 8px;
} }
/*.message-input-editor {
outline: none;
font-size: 14px;
line-height: 1.4;
min-height: 20px;
padding: 8px 0;
color: var(--text-normal);
position: relative;
}*/
.message-input-editor { .message-input-editor {
min-height: 20px; min-height: 20px;
max-height: 200px; max-height: 200px;
overflow-y: auto; overflow-y: auto;
word-wrap: break-word; word-wrap: break-word;
white-space: pre-wrap; white-space: pre-wrap;
padding: 0; /*8px 0*/ /* Отступы для контента и плейсхолдера */
line-height: 1.5; /* Высота строки для контента и плейсхолдера */
box-sizing: border-box; /* Включаем padding в общую ширину/высоту */
}
/* Скрываем <br> элемент, когда редактор пуст и плейсхолдер активен */
.message-input-editor.is-empty > br {
display: none;
} }
.message-input-editor.is-empty::before { .message-input-editor.is-empty::before {
content: attr(data-placeholder); content: attr(data-placeholder);
color: var(--text-muted); color: var(--text-muted);
position: absolute;
pointer-events: none; pointer-events: none;
display: block; /* Делаем плейсхолдер блочным элементом, чтобы он занимал место и переносил строки */
} }
.message-input-editor[data-placeholder]::before { .message-input-editor[data-placeholder]::before {
content: attr(data-placeholder); content: attr(data-placeholder);
color: var(--text-muted); color: var(--text-muted);
position: absolute; /* position: absolute; <-- УДАЛЕНО: Свойство будет применяться только когда .is-empty */
pointer-events: none; pointer-events: none;
opacity: 0.6; opacity: 0.6;
} }
.message-input-editor.is-empty[data-placeholder]::before {
display: block;
}
.message-input-editor:not(.is-empty)[data-placeholder]::before, .message-input-editor:not(.is-empty)[data-placeholder]::before,
.message-input-editor:focus[data-placeholder]::before { .message-input-editor:focus[data-placeholder]::before {
display: none; display: none;
@ -345,6 +337,9 @@
.model-select-container { .model-select-container {
position: relative; position: relative;
display: flex; /* Добавляем flex-контейнер */
align-items: center; /* Выравниваем элементы по центру */
gap: 8px; /* Добавляем расстояние между кнопкой и индикатором */
} }
.model-select-button { .model-select-button {

File diff suppressed because one or more lines are too long