top: 0; left: 400px; width: 360px">

<!-- Ignore absolutely positioned grid items. -->
<div>
before text
<div class="inline-grid">
    <div style="position: absolute">absolute</div>
    <div style="margin-top: 30px">baseline</div>
</div>
after text
</div>

<!-- We don't participate in baseline alignment if there's an auto margin. -->
<div>
before text
<div class="inline-grid" style="grid-auto-rows: 40px;">
    <div>baseline</div>
    <div style="align-self: baseline; margin-top: auto">below</div>
</div>
aft