3 <title>CSS Scrollbars: scrollbar-width thin on the root overrides ::-webkit-scrollbar on the root
</title>
4 <link rel=
"author" title=
"Luke Warlow" href=
"mailto:luke@warlow.dev" />
5 <link rel=
"help" href=
"https://drafts.csswg.org/css-scrollbars-1/" />
6 <script src=
"/resources/testharness.js"></script>
7 <script src=
"/resources/testharnessreport.js"></script>
8 <script src=
"/css/support/parsing-testcommon.js"></script>
11 scrollbar-width: thin;
14 :root::-webkit-scrollbar {
27 background: lightsalmon;
31 /* force vertical scroll */
40 <div id=
"content"></div>
42 <div id=
"expander"></div>
46 let root
= document
.documentElement
;
47 let body
= document
.body
;
48 let content
= document
.getElementById('content');
50 assert_less_than(root
.offsetWidth
, window
.innerWidth
, "viewport has a scrollbar");
51 assert_equals(body
.offsetWidth
, root
.offsetWidth
, "body matches root");
52 assert_equals(content
.offsetWidth
, body
.offsetWidth
, "content matches body");
53 }, "scrollbar-width thin on the root overrides ::-webkit-scrollbar");