<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/don-t-use-custom-css-scrollbars-sc8n6tf2v" -->

---
title: Don’t use custom CSS scrollbars | daily.dev
description: Custom CSS scrollbar styling is argued to be an accessibility trap rather than a harmless branding flourish. Overriding operating system scrollbar defaults can...
canonical: https://daily.dev/posts/don-t-use-custom-css-scrollbars-sc8n6tf2v
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Don’t use custom CSS scrollbars | daily.dev
og:description: Custom CSS scrollbar styling is argued to be an accessibility trap rather than a harmless branding flourish. Overriding operating system scrollbar defaults can...
og:url: https://daily.dev/posts/don-t-use-custom-css-scrollbars-sc8n6tf2v
og:image: https://api.daily.dev/og/posts/Sc8N6tf2V.png
og:image:alt: Don’t use custom CSS scrollbars
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Don’t use custom CSS scrollbars

**[Eric Bailey](https://daily.dev/sources/ericwbailey)** · 16 min read · 0 upvotes · 0 comments

## Summary

Custom CSS scrollbar styling is argued to be an accessibility trap rather than a harmless branding flourish. Overriding operating system scrollbar defaults can break color contrast requirements, ignore user-set OS themes, fail to honor Forced Colors mode and Increased Contrast mode, shrink touch targets below usable sizes, and confuse users who rely on consistent browser UI. The piece walks through a series of questions developers should ask before customizing scrollbars, covering performance cost, contrast compliance, theme conflicts, specialized display modes, touch target sizing, and cognitive accessibility, ultimately recommending against rolling custom scrollbars at all and pointing to further reading on the topic.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://ericwbailey.website/published/dont-use-custom-css-scrollbars>

## Questions this post answers

### Why can custom CSS scrollbars cause accessibility problems?

Custom CSS scrollbars can fail WCAG Success Criterion 1.4.11 Non-text Contrast, disappear entirely under Forced Colors mode or Windows High Contrast mode, ignore Increased Contrast Mode on macOS and iOS, override user-set Windows theme scrollbar colors, and be styled so narrow that they become nearly impossible to click, none of which happens with the browser's native scrollbar.

_Teams weighing scrollbar customization against accessibility risk can track these tradeoffs on daily.dev._

### Do custom CSS scrollbars automatically adapt to Windows High Contrast mode or Forced Colors mode?

No, scrollbars modified by CSS do not automatically adapt to Forced Colors mode or Windows High Contrast mode, and testing found that every custom scrollbar CSS generator tool evaluated lacked code to accommodate these display modes, causing the scrollbar to effectively disappear when such a mode is applied.

_Developers auditing CSS against OS display modes can follow accessibility coverage like this on daily.dev._

### Can I detect a user's Windows theme settings using CSS or JavaScript to conditionally adjust scrollbar styling?

No, there is no way to detect the presence of a custom Windows theme via CSS or JavaScript, which means a website cannot conditionally remove its custom scrollbar styling when a user has set a theme that adjusts scrollbar colors, making it impossible to proactively accommodate that preference through detection alone.

_Anyone weighing custom UI overrides against user OS preferences can keep up with this kind of accessibility nuance on daily.dev._

## Similar posts on daily.dev

- [How to Customize Scrollbars with CSS: A Full Guide](https://daily.dev/posts/how-to-customize-scrollbars-with-css-a-full-guide-wscediog8) · DigitalOcean Community · 16 upvotes · 3 comments
- [De-emphasize scrollbars in small containers](https://daily.dev/posts/de-emphasize-scrollbars-in-small-containers-zabf7n6pj) · RUBYLAND · 24 upvotes · 1 comments
- [Don't Roll Your Own ...](https://daily.dev/posts/don-t-roll-your-own--gpx1gv2zh) · Susam Pal · 0 upvotes · 0 comments
- [Custom Scrollbar Component In 2026 – Master.dev Blog](https://daily.dev/posts/custom-scrollbar-component-in-2026-master-dev-blog-va5z9lc0z) · Frontend Masters · 11 upvotes · 0 comments

---

Tags: [#css](https://daily.dev/tags/css), [#ui-design](https://daily.dev/tags/ui-design), [#accessibility](https://daily.dev/tags/accessibility)

[View this post on daily.dev](https://daily.dev/posts/don-t-use-custom-css-scrollbars-sc8n6tf2v)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Don’t use custom CSS scrollbars","url":"https://daily.dev/posts/don-t-use-custom-css-scrollbars-sc8n6tf2v","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/don-t-use-custom-css-scrollbars-sc8n6tf2v"},"datePublished":"2026-09-20T07:44:05.965Z","dateModified":"2026-09-20T07:48:07.560Z","description":"Custom CSS scrollbar styling is argued to be an accessibility trap rather than a harmless branding flourish. Overriding operating system scrollbar defaults can...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/cb10f178805900873b3f95b4a150fe76?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/cb10f178805900873b3f95b4a150fe76?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Eric Bailey","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Eric Bailey","logo":"https://media.daily.dev/image/upload/s--r1vwe6z1--/f_auto,q_auto/v1789890198/logos/ericwbailey?_a=BAMAMicg0","url":"https://daily.dev/sources/ericwbailey"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/don-t-use-custom-css-scrollbars-sc8n6tf2v","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"css,ui-design,accessibility","timeRequired":"PT16M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Eric Bailey","item":"https://daily.dev/sources/ericwbailey"},{"@type":"ListItem","position":3,"name":"Don’t use custom CSS scrollbars"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/don-t-use-custom-css-scrollbars-sc8n6tf2v#faq","mainEntity":[{"@type":"Question","name":"Why can custom CSS scrollbars cause accessibility problems?","acceptedAnswer":{"@type":"Answer","text":"Custom CSS scrollbars can fail WCAG Success Criterion 1.4.11 Non-text Contrast, disappear entirely under Forced Colors mode or Windows High Contrast mode, ignore Increased Contrast Mode on macOS and iOS, override user-set Windows theme scrollbar colors, and be styled so narrow that they become nearly impossible to click, none of which happens with the browser's native scrollbar. Teams weighing scrollbar customization against accessibility risk can track these tradeoffs on daily.dev."}},{"@type":"Question","name":"Do custom CSS scrollbars automatically adapt to Windows High Contrast mode or Forced Colors mode?","acceptedAnswer":{"@type":"Answer","text":"No, scrollbars modified by CSS do not automatically adapt to Forced Colors mode or Windows High Contrast mode, and testing found that every custom scrollbar CSS generator tool evaluated lacked code to accommodate these display modes, causing the scrollbar to effectively disappear when such a mode is applied. Developers auditing CSS against OS display modes can follow accessibility coverage like this on daily.dev."}},{"@type":"Question","name":"Can I detect a user's Windows theme settings using CSS or JavaScript to conditionally adjust scrollbar styling?","acceptedAnswer":{"@type":"Answer","text":"No, there is no way to detect the presence of a custom Windows theme via CSS or JavaScript, which means a website cannot conditionally remove its custom scrollbar styling when a user has set a theme that adjusts scrollbar colors, making it impossible to proactively accommodate that preference through detection alone. Anyone weighing custom UI overrides against user OS preferences can keep up with this kind of accessibility nuance on daily.dev."}}]}
```

