Many Chinese books are written from right to left and vertically. I try to use HTML/CSS to layout some Chinese texts in this way. For example,
<head>
<style>
p.rtl {
writing-mode: vertical-rl;
display: inline-block;
height: 100vh;
white-space: normal;
text-align: left;
}
body {
margin: 0px;
white-space: nowrap;
direction: rtl;
display: flex;
}
</style>
</head>
<body>
<p class="rtl">
123中文中文中文中...
</p>
...
The full code is here: https://codepen.io/mrrogerhuang/pen/ZEWeQGd
However, I find if there is a trailing punctuation mark in a paragraph, the punctuation mark is placed in the leading of the last line, like the red circle annotated texts in this macOS Safari 13 screenshot:
Chrome 84 on macOS has the same problem. Is this a browser bug?