Add a scrollbar to notebook/default, improve chat scrollbar style (#3403)

---------

Co-authored-by: oobabooga <112222186+oobabooga@users.noreply.github.com>
This commit is contained in:
Pete 2023-08-02 11:02:36 -04:00 committed by GitHub
parent 6c521ce967
commit 6afc1a193b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 10 deletions

View file

@ -154,4 +154,32 @@ button {
.markdown ul ol {
font-size: 100% !important;
}
}
.pretty_scrollbar::-webkit-scrollbar {
width: 10px;
}
.pretty_scrollbar::-webkit-scrollbar-track {
background: transparent;
}
.pretty_scrollbar::-webkit-scrollbar-thumb,
.pretty_scrollbar::-webkit-scrollbar-thumb:hover {
background: #c5c5d2;
border-radius: 10px;
}
.dark .pretty_scrollbar::-webkit-scrollbar-thumb,
.dark .pretty_scrollbar::-webkit-scrollbar-thumb:hover {
background: #374151;
border-radius: 10px;
}
.pretty_scrollbar::-webkit-resizer {
background: #c5c5d2;
}
.dark .pretty_scrollbar::-webkit-resizer {
background: #374151;
}

View file

@ -16,3 +16,10 @@ main_parent.addEventListener('click', function(e) {
extensions.style.display = 'none';
}
});
const textareaElements = document.querySelectorAll('.add_scrollbar textarea');
for(i = 0; i < textareaElements.length; i++) {
textareaElements[i].classList.remove('scroll-hide');
textareaElements[i].classList.add('pretty_scrollbar');
textareaElements[i].style.resize = "none";
}