<!DOCTYPE html>
<div style="display: grid; width: 100px; height: 100px; background: gray;">
  <div style="writing-mode: vertical-rl; background: cyan; justify-self: end; direction: rtl;">one<br>two</div>
  <div style="writing-mode: vertical-lr; font-size: 30px; background: lime; justify-self: start; direction: rtl;">one<br>two</div>
</div>
