CKTIS / CSS
scrollbar-width — scrollbar thickness
The scrollbar-width property specifies the desired thickness of a container’s scrollbars. It accepts auto, thin, or none; it neither sets a pixel dimension nor enables scrolling by itself.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
scrollbar-width: auto | thin | none;scrollbar-width applies to scroll containers. auto uses the default thickness, thin requests thinner but still usable scrollbars, and none hides scrollbars without disabling scrolling by other means. Lengths and percentages are not allowed; CSS-wide keywords are also available.
The initial value is auto. The property is not inherited; its computed value is the specified keyword, and animation is discrete. A value on the root element (html) applies to the viewport; a value on body is not propagated there.
thin may look like auto because of platform constraints or user preferences. Do not assume a particular thickness or a permanently visible scrollbar. Use thinner scrollbars for cramped areas, not merely decoration. With none, provide a visual scrolling hint and alternative scrolling controls, including for mouse users without a wheel.
A value other than auto causes nonstandard scrollbar-styling mechanisms, such as the ::-webkit-scrollbar family, to be ignored. The example uses overflow: auto to handle overflowing content and scrollbar-width: thin only to request scrollbar thickness.
Examples
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Request a thin scrollbar</title>
<style>
#panel {
box-sizing: border-box;
width: 240px;
height: 100px;
overflow: auto;
scrollbar-width: thin;
border: 1px solid;
}
.content { min-height: 300px; }
</style>
</head>
<body>
<div id="panel" tabindex="0" role="region" aria-label="Vertical scrolling example">
<div class="content">This content is taller than the panel.</div>
</div>
<script>
const panel = document.getElementById('panel');
console.log(`Computed scrollbar-width: ${getComputedStyle(panel).scrollbarWidth}`);
panel.scrollTop = 20;
console.log(`Can scroll vertically: ${panel.scrollTop > 0}`);
panel.scrollTop = 0;
</script>
</body>
</html>Result
Computed scrollbar-width: thin Can scroll vertically: true
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.