Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-overflow/scrollbar-gutter-fixedpos-003.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Overflow Test: Root element's scrollbar-gutter is accounted for when computing hypothetical box in fixed-pos positioning</title>
<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
<link rel="match" href="scrollbar-gutter-fixedpos-003-ref.html">
<style>
:root {
scrollbar-gutter: stable both-edges;
}
body {
margin: 0;
}
.box {
width: 100px;
height: 100px;
}
</style>
<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
<div class="box" style="position: fixed; background: green"></div>
<div class="box" style="background: red"></div>