fix: Correct CJK/emoji orientation in collapsed columns (#1098) - #1180
Open
BradGroux wants to merge 1 commit into
Open
fix: Correct CJK/emoji orientation in collapsed columns (#1098)#1180BradGroux wants to merge 1 commit into
BradGroux wants to merge 1 commit into
Conversation
…munity#1098) Collapsed column titles used `writing-mode: vertical-lr` on the wrapper with `transform: rotate(180deg)` on individual text elements. This caused CJK characters and emoji to appear upside-down because the rotation was applied per-element rather than to the overall text flow. Changed approach to use `writing-mode: vertical-rl` with `rotate(180deg)` on the wrapper itself. This achieves the same visual result for Latin text (reading bottom-to-top) while preserving correct orientation for CJK characters, emoji, and other non-Latin scripts. Fixes obsidian-community#1098
25 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a column (lane) is collapsed horizontally, CJK characters and emoji in the title appear upside-down. Latin characters display correctly because they have no inherent orientation in vertical writing mode, but CJK and emoji glyphs get flipped by the per-element
rotate(180deg).Screenshots from #1098:
Root Cause
The collapsed column styling used:
This was a workaround for
sideways-lr(not widely supported). The problem is thatrotate(180deg)on individual text elements flips CJK/emoji glyphs upside-down since these characters have inherent orientation in vertical writing modes.Fix
Moved the rotation to the wrapper level and switched writing mode:
vertical-rl+rotate(180deg)on the wrapper achieves the same bottom-to-top reading direction for Latin text while preserving correct glyph orientation for CJK characters and emoji — no per-element rotation needed.Testing
Fixes #1098