wpt / css / css-shapes / shape-outside / shape-image / gradients / shape-outside-linear-gradient-horizontal-rtl.html

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

/css/css-shapes/shape-outside/shape-image/gradients/shape-outside-linear-gradient-horizontal-rtl.html

<!DOCTYPE html>
<html>
  <head>
    <title>CSS Test: Test shape-outside with linear gradient when rtl direction is applied.</title>
    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shapes-from-image">
    <link rel="help" href="http://www.w3.org/TR/css-shapes-1/#shape-outside-property">
    <link rel="match" href="reference/shape-outside-linear-gradient-horizontal-rtl-ref.html">
    <meta name="assert" content="This test verifies that shape-outside respects a simple linear gradient when rtl direction is applied.">
    <link rel="stylesheet" href="/fonts/ahem.css">
    <style>
    .container {
      inline-size: 100px;
      block-size: 200px;
      background-color: red;
      font-family: Ahem;
      font-size: 50px;
      line-height: 1;
      direction: rtl;
      color: green;
    }
    #float-left {
      float: left;
      inline-size: 100px;
      block-size: 200px;
      background: linear-gradient(to right, green 50%, transparent 50%);
      shape-outside: linear-gradient(to right, green 50%, transparent 50%);
    }
    #float-right {
      float: right;
      inline-size: 100px;
      block-size: 200px;
      background: linear-gradient(to left, green 50%, transparent 50%);
      shape-outside: linear-gradient(to left, green 50%, transparent 50%);
    }
    </style>
  </head>
  <body>
    <p>
      The test passes if you see a green square. There should be no red.
    </p>
    <div class="container">
      <div id="float-left"></div>
      x x x x
    </div>
    <div class="container">
      <div id="float-right"></div>
      x x x x
    </div>
  </body>
</html>

/css/css-shapes/shape-outside/shape-image/gradients/reference/shape-outside-linear-gradient-horizontal-rtl-ref.html

<!DOCTYPE html>
<html>
<head>
    <title>CSS Reference File</title>
    <link rel="stylesheet" href="/fonts/ahem.css">
    <style>
        body {
            overflow: hidden;
        }
        div {
            width: 50px;
            height: 200px;
            position: relative;
        }
        .non-gradient-box {
            background-color: green;
        }
        .gradient-box {
            width: 100px;
            background: linear-gradient(to right, green 50%, transparent 50%);
        }
    </style>
</head>
<body>
    <p>
        The test passes if you see a green square. There should be no red.
    </p>
    <div class="gradient-box"></div>
    <div class="non-gradient-box" style="left: 50px; top: -200px"></div>
    <div class="non-gradient-box" style="top: -200px"></div>
    <div class="gradient-box" style="top: -400px; left: 50px;"></div>
</body>
</html>