After a while, i wanted to hide the scroll bar for my .horizontal-scroll
class. This one worked for me:
Before:
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: #f4f7f5;
}
::-webkit-scrollbar {
width: 10px;
background-color: #f4f7f5;
}
::-webkit-scrollbar-thumb {
background-color: #222823;
}
.horizontal-scroll::-webkit-scrollbar {
display: none !important;
}
After:
html::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: #f4f7f5;
}
html:has(.horizontal-scroll)::-webkit-scrollbar {
display: none !important;
}
html::-webkit-scrollbar {
width: 10px;
background-color: #f4f7f5;
}
html::-webkit-scrollbar-thumb {
background-color: #222823;
}
::-webkit-scrollbar
completely overrides default scrollbar, and there is no way to reset this override. – Knotweed