<!DOCTYPE html>
<p>Test passes if the text is aligned.</p>
<div style="writing-mode: vertical-lr; text-orientation: sideways;">
  before
  <div style="display: inline-block; background: green; width: 100px; height: 50px;">grid</div>
  after
</div>

