wpt / css / css-images / linear-gradient-body-sibling-index.html

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

/css/css-images/linear-gradient-body-sibling-index.html

<!DOCTYPE html>
<title>CSS Images Test: Linear gradient with sibling-index()</title>
<link rel="help" href="https://drafts.csswg.org/css-images/#linear-gradients">
<link rel="help" href="https://drafts.csswg.org/css-values-5/#tree-counting">
<link rel="match" href="linear-gradient-body-sibling-index-ref.html">
<link rel="assert" content"sibling-index() is 2 for body">
<style>
  body {
    background-position: top left;
    background-repeat: no-repeat;
    background-size: 100px 100px;
    background-image: linear-gradient(blue calc(20px * sibling-index()), yellow);
  }
</style>
<body>

/css/css-images/linear-gradient-body-sibling-index-ref.html

<!DOCTYPE html>
<title>CSS Test Reference</title>
<style>
  body {
    background-position: top left;
    background-repeat: no-repeat;
    background-size: 100px 100px;
    background-image: linear-gradient(blue 40px, yellow);
  }
</style>
<body>