wpt / css / css-overflow / scroll-markers / scroll-markers-added-after-content-visibility-auto.html

Status: PASS | Duration: 6ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-overflow/scroll-markers/scroll-markers-added-after-content-visibility-auto.html

<!doctype html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>::scroll-markers with content-visibility: auto ancestors, scroll group added</title>
<link rel="match" href="scroll-markers-under-content-visibility-auto-ref.html">
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker-pseudo">
<link rel="author" href="mailto:vmpstr@chromium.org">
<link rel="assert" content="::scroll-markers should be visible even if the item is content-visibility: auto offscreen">
<script src="/common/reftest-wait.js"></script>
<style>
  .scrollmarkergroup {
    scroll-marker-group: after;
  }
  #scroller {
    width: 600px;
    height: 300px;
    overflow: scroll;
  }

  #scroller div {
    width: 600px;
    height: 300px;
    margin-bottom: 20px;
    background: green;
    content-visibility: auto;
  }

  #scroller::scroll-marker-group {
    border: 3px solid black;
    padding: 5px;
    height: 20px;
    display: block;
  }

  #scroller div::scroll-marker {
    content: "";
    width: 10px;
    height: 10px;
    background-color: blue;
    border-radius: 50%;
    display: inline-block;
  }
</style>
<div id="scroller">
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
</div>

<script>
onload = () => requestAnimationFrame(() => requestAnimationFrame(() => {
  scroller.classList.add("scrollmarkergroup");
  takeScreenshot();
}));
</script>
</html>

/css/css-overflow/scroll-markers/scroll-markers-under-content-visibility-auto-ref.html

<!doctype html>
<meta charset="utf-8">
<title>::scroll-markers with content-visibility: auto ancestors ref</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker-pseudo">
<link rel="author" href="mailto:vmpstr@chromium.org">
<style>
  #scroller {
    width: 600px;
    height: 300px;
    overflow: scroll;
    scroll-marker-group: after;
  }

  #scroller div {
    width: 600px;
    height: 300px;
    margin-bottom: 20px;
    background: green;
  }

  #scroller::scroll-marker-group {
    border: 3px solid black;
    padding: 5px;
    height: 20px;
    display: block;
  }

  #scroller div::scroll-marker {
    content: "";
    width: 10px;
    height: 10px;
    background-color: blue;
    border-radius: 50%;
    display: inline-block;
  }
</style>
<div id="scroller">
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
  <div></div> <div></div> <div></div>
</div>