I have a textarea that has a particular background colour. How can I set the scrollbar's background of that textarea to have the same background as the textarea? ClaudeAI told me this: /* Style the scrollbar for WebKit browsers (Chrome, Safari, etc.) */ textarea::-webkit-scrollbar { width: 12px; /* width of the entire scrollbar */ }
textarea::-webkit-scrollbar-track { background: inherit; /* color of the tracking area */ }
textarea::-webkit-scrollbar-thumb { background-color: #888; /* color of the scroll thumb */ border-radius: 6px; /* roundness of the scroll thumb */ border: 3px solid inherit; /* creates padding around scroll thumb */ }
/* Style the scrollbar for Firefox */ textarea { scrollbar-width: thin; scrollbar-color: #888 inherit; } But I can't find a way to implement this in Toddle. Thanks! 🙏
I think this should be doable with this package: Scrollbar Generator
👍1
Patrick Mast
1 year ago
Thanks @Armand, but I want to learn how to do this, also for future CSS styling. So, for this example, I'd like to learn how to do it natively, without using a package.