mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-25 13:58:56 +01:00
Rename some CSS variables
This commit is contained in:
parent
5466ae59a7
commit
8d0359a6d8
12
css/main.css
12
css/main.css
@ -342,20 +342,20 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
|
||||
}
|
||||
|
||||
.chat-parent {
|
||||
height: calc(100dvh - 98px - var(--chat-input-offset) - var(--my-delta));
|
||||
height: calc(100dvh - 98px - var(--header-height) - var(--input-delta));
|
||||
overflow: auto !important;
|
||||
border-radius: 0 0 8px 8px !important;
|
||||
margin-bottom: var(--my-delta) !important;
|
||||
margin-bottom: var(--input-delta) !important;
|
||||
}
|
||||
|
||||
.old-ui .chat-parent {
|
||||
height: calc(100dvh - 192px - var(--chat-input-offset) - var(--my-delta));
|
||||
margin-bottom: var(--my-delta) !important;
|
||||
height: calc(100dvh - 192px - var(--header-height) - var(--input-delta));
|
||||
margin-bottom: var(--input-delta) !important;
|
||||
}
|
||||
|
||||
.chat-parent.bigchat {
|
||||
height: calc(100dvh - 98px - var(--chat-input-offset) - var(--my-delta)) !important;
|
||||
margin-bottom: var(--my-delta) !important;
|
||||
height: calc(100dvh - 98px - var(--header-height) - var(--input-delta)) !important;
|
||||
margin-bottom: var(--input-delta) !important;
|
||||
}
|
||||
|
||||
.chat > .messages {
|
||||
|
@ -340,12 +340,12 @@ function updateCssProperties() {
|
||||
const chatInputHeight = document.querySelector('#chat-input textarea').clientHeight;
|
||||
const newChatHeight = `${chatContainer.clientHeight - chatInputHeight + 40}px`;
|
||||
document.documentElement.style.setProperty('--chat-height', newChatHeight);
|
||||
document.documentElement.style.setProperty('--my-delta', `${chatInputHeight - 40}px`);
|
||||
document.documentElement.style.setProperty('--input-delta', `${chatInputHeight - 40}px`);
|
||||
|
||||
// Set the position offset of the chat input box
|
||||
const header = document.querySelector('.header_bar');
|
||||
const chatInputOffset = `${header.clientHeight}px`;
|
||||
document.documentElement.style.setProperty('--chat-input-offset', chatInputOffset);
|
||||
const headerHeight = `${header.clientHeight}px`;
|
||||
document.documentElement.style.setProperty('--header-height', headerHeight);
|
||||
|
||||
// Offset the scroll position of the chat area
|
||||
if (chatInputHeight !== currentChatInputHeight) {
|
||||
|
Loading…
Reference in New Issue
Block a user