wpt / css / css-tables / table-cell-overflow-auto-scrolled.html

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

/css/css-tables/table-cell-overflow-auto-scrolled.html

<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-tables-3/#bounding-box-assignment">
<link rel="match" href="table-cell-overflow-auto-scrolled-ref.html">
<meta name="assert" content="Table cell with overflow:auto and overflowing contents is scrollable">
<table style="table-layout: fixed; width: 100px; height: 100px; border: solid; border-spacing: 0">
  <tr>
    <td id="cell" style="background: green; overflow: auto; vertical-align: top; padding: 0">
      <div style="width: 200px; height: 50px; background: hotpink; border: 2px solid yellow"></div>
    </td>
  </tr>
</table>
<script>
onload = () => {
  cell.scrollLeft = 120;
}
</script>

/css/css-tables/table-cell-overflow-auto-scrolled-ref.html

<!DOCTYPE html>
<div style="width: 100px; height: 100px; border: solid; box-sizing: border-box">
  <div id="cell" style="width: 100%; height: 100%; background: green; overflow: auto">
     <div style="width: 200px; height: 50px; background: hotpink; border: 2px solid yellow"></div>
   </div>
</div>
<script>
onload = () => {
  cell.scrollLeft = 120;
}
</script>