I've been trying to create a solution for this but i couldn't, also didn't find anything useful. It would be great if the solution is pure vanilla JS, a few things that i saw included jQuery plugins but that's not the point here.
The CSS code is:
main::-webkit-scrollbar {
background-color: #c2c3c4;
width: 10px;
}
main::-webkit-scrollbar-thumb {
background-color: #43474C;
}
The purpose is to change theme on the page so changing this scrollbar color is important. I tried with this JS code:
main.webkitScrollBar.style.backgroundColor = 'newColor';
This obviously didn't work. Also tried that line with some modifications but nothing happens. Thanks in advance!