Rename some CSS variables

This commit is contained in:
oobabooga 2023-12-25 14:10:07 -08:00
parent 5466ae59a7
commit 8d0359a6d8
2 changed files with 9 additions and 9 deletions

View file

@ -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) {