scrollbar-width-paint-002.html (2095B)
1 <!doctype html> 2 <html class="reftest-wait"> 3 <title>CSS Scrollbars: paint test when updating scrollbar-width, with overflow:auto</title> 4 <link rel="author" title="Felipe Erias Morandeira" href="mailto:felipeerias@gmail.com" /> 5 <link rel="match" href="scrollbar-width-paint-002-ref.html" /> 6 <link rel="mismatch" href="scrollbar-width-paint-002-mis-ref.html" /> 7 <link rel="help" href="https://www.w3.org/TR/css-scrollbars-1/" /> 8 <script src="/common/reftest-wait.js"></script> 9 <style> 10 body { 11 display: flex; 12 flex-wrap: wrap; 13 } 14 15 .container { 16 scrollbar-gutter: stable; 17 overflow: scroll; 18 flex: 0 0; 19 height: 200px; 20 min-width: 200px; 21 margin: 1px; 22 padding: 0px; 23 border: none; 24 background: deepskyblue; 25 } 26 27 .content { 28 height: 100%; 29 width: 100%; 30 } 31 32 .container.auto { 33 scrollbar-width: auto; 34 } 35 36 .container.thin { 37 scrollbar-width: thin; 38 } 39 40 .container.none { 41 scrollbar-width: none; 42 } 43 44 .content.plain { 45 background: red; 46 } 47 48 .content.gradient { 49 background: linear-gradient(135deg, red, blue); 50 } 51 </style> 52 <div id="one" class="container auto"> 53 <div class="content plain"></div> 54 </div> 55 <div id="two" class="container thin"> 56 <div class="content plain"></div> 57 </div> 58 <div id="three" class="container none"> 59 <div class="content plain"></div> 60 </div> 61 <div id="four" class="container auto"> 62 <div class="content gradient"></div> 63 </div> 64 <div id="five" class="container thin"> 65 <div class="content gradient"></div> 66 </div> 67 <div id="six" class="container none"> 68 <div class="content gradient"></div> 69 </div> 70 <script> 71 requestAnimationFrame(() => requestAnimationFrame(() => { 72 document.getElementById('one').style.scrollbarWidth = 'thin'; 73 document.getElementById('two').style.scrollbarWidth = 'auto'; 74 document.getElementById('three').style.scrollbarWidth = 'auto'; 75 document.getElementById('four').style.scrollbarWidth = 'none'; 76 document.getElementById('five').style.scrollbarWidth = 'none'; 77 document.getElementById('six').style.scrollbarWidth = 'thin'; 78 79 takeScreenshot(); 80 })); 81 </script>