<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Box Alignment Test: Synthesized baseline inline blocks</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-align-3/#baseline-rules">
<link rel="help" href="https://drafts.csswg.org/css-inline-3/#alignment-baseline-property">
<meta name="flags" content="ahem">
<meta name="assert" content="Inline blocks synthesized baseline use the margin box.">
<style>
.wrapper {
  border: solid thick;
  position: relative;
  width: 200px;
  height: 150px;
  margin: 10px;
}
canvas {
  width: 100px;
  height: 100px;
  background: blue;
}
.magenta-dotted-border {
  border: 5px dotted magenta;
}
.border-padding-margin {
  border: 10px solid cyan;
  padding: 15px;
  margin: 20px 0px;
  background: yellow;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>

<body onload="checkLayout('.wrapper')">

<div id="log"></div>

<div class="wrapper">
  <canvas></canvas>
  <div style="display: inline-block;" class="border-padding-margin"
      data-offset-y="30"></div>
</div>
<div class="wrapper">
  <canvas></canvas>
  <div style="display: inline-block;" class="magenta-dotted-border"
      data-offset-y="5">
    <div style="display: inline-block;" class="border-padding-margin"
        data-offset-y="30"></div>
  </div>
</div>
<div class="wrapper">
  <canvas></canvas>
  <div style="display: inline-block;" class="magenta-dotted-border"
      data-offset-y="0">
    <div class="border-padding-margin" data-offset-y="25"></div>
  </div>
</div>

</body>
