This particular issue was first discussed 14 years ago on Stack Overflow, but a definitive solution still remains elusive.
My goal is to have both CJK and Latin characters displayed vertically, with their bottoms facing the right side.
While writing-mode: sideways-rl
achieves the desired result in Firefox, it remains unsupported by other browsers as of 2023 (https://caniuse.com/?search=sideways)
https://i.stack.imgur.com/n3Qcb.png
Several suggestions have been made to use vertical-rl
along with text flipping techniques like scale(-1)
or rotate(180deg)
. While this method works for Latin characters, CJK text ends up being displayed upside-down.
writing-mode: vertical-rl
transform: rotate(180deg)
https://i.stack.imgur.com/aDZsh.png
I also attempted rotating the entire horizontal text container -90°, but encountered alignment and rendering issues due to HTML computations occurring before the transform
property. Workarounds such as margin: -100px; padding: 100px
proved cumbersome and often led to further problems like misaligned pointer hitboxes.