wpt / css / css-overflow / scroll-markers / scroll-buttons-002.html

Status: FAIL | Duration: 11ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-overflow/scroll-markers/scroll-buttons-002.html

<!doctype html>
<meta charset="utf-8">
<title>CSS Test: ::scroll-button()s style invalidation</title>
<link rel="match" href="scroll-buttons-001-ref.html">
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-buttons">
<style>
  :root {
    --scroll-buttons-background: red;
  }

  div::scroll-button(inline-start) {
    content: "";
    background: var(--scroll-buttons-background);
    display: flex;
    height: 50px;
    width: 100px;
    border: none;
  }

  div::scroll-button(down) {
    content: "";
    background: var(--scroll-buttons-background);
    display: flex;
    height: 50px;
    width: 100px;
    border: none;
  }
</style>
<p>Test passes if there is a <strong>filled green rectangle</strong>.
<div></div>
<script>
  document.documentElement.offsetTop;
  document.documentElement.style.setProperty('--scroll-buttons-background', 'green');
  document.documentElement.offsetTop;
</script>

/css/css-overflow/scroll-markers/scroll-buttons-001-ref.html

<!doctype html>
<meta charset="utf-8">
<title>CSS Test Reference File: ::scroll-button()s box creation</title>
<style>
  div {
    background: green;
    height: 100px;
    width: 100px;
  }
</style>
<p>Test passes if there is a <strong>filled green rectangle</strong>.
<div></div>