~/css/scrollbar-generator
CSS Scrollbar Generator
Design a custom scrollbar and test it in a scrollable preview: set the width, track colour, thumb colour, hover colour and corner radius. The CSS covers WebKit browsers and the standard Firefox properties in one block.
Using the CSS Scrollbar Generator
Two ways to style scrollbars
Chrome, Edge and Safari use the ::-webkit-scrollbar pseudo-elements, which allow full control over width, colours and radius. Firefox and the CSS standard use scrollbar-width and scrollbar-color, which are simpler. The generated CSS includes both, so every browser gets a styled scrollbar.
Keep it usable
A scrollbar is a control, not just decoration. Keep the thumb clearly visible against the track and wide enough to grab. Very thin, low-contrast scrollbars look sleek but frustrate people with less precise mice and anyone with low vision.
Scoped or global
Styling only one scrolling panel, such as a sidebar or code block, is usually better than changing the scrollbar for the whole page. Tick "Apply to the whole page" if you do want a site-wide style.
Mobile behaviour
Phones and tablets use overlay scrollbars that appear only while scrolling and mostly ignore these styles. Custom scrollbars are a desktop refinement.
Frequently asked questions
Why does Firefox look different?
Firefox only supports the standard properties: a thumb colour, a track colour and a thin or auto width. It does not support radius or hover colours.
Can I hide the scrollbar but keep scrolling?
Yes, with scrollbar-width: none and ::-webkit-scrollbar { display: none }, but make sure people can still tell the area scrolls.
Does this affect accessibility?
Only if the thumb becomes hard to see. Keep strong contrast between thumb and track.