I have successfully customized the default CSS of browser scrollbars for Chrome and Edge, but I am facing issues with Firefox. Is there a way to sync the scrollbar styling in Firefox with Chrome and Edge? Currently, I am unable to apply border radius to the scrollbar in Firefox.
Here is the code I have used:
/* Custom Scroll Bar */
/* Works on Firefox */
* {
scrollbar-width: thin !important;
scrollbar-color: #65676a #1e1f22 !important;
}
/* Works on Chrome, Edge, and Safari */
*::-webkit-scrollbar {
width: 1.2rem !important;
height: 1.2rem !important;
}
*::-webkit-scrollbar-track {
background: #1e1f22 !important;
}
*::-webkit-scrollbar-thumb {
background-color: #65676a !important;
border-radius: 2rem !important;
border: 0.3rem solid #1e1f22 !important;
}
*::-webkit-scrollbar-corner {
background: #1e1f22 !important;
}
In addition, I am using Angular Framework. If there are any Angular libraries available to modify the scrollbar, please share. I have attempted ngx-scrollbar but encountered some build issues with it.