Repository navigation
Align left-justified layouts to the start edge in RTL - #263
Conversation
Core writes a constrained layout's "left" justification as physical margins, so in RTL the content stays on the left. - Sidebar templates: the main column's justification follows is_rtl(). - Archive and search patterns: the excerpt and read more group is a Stack, whose alignment follows the text direction. Fixes #261. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
juanfra
left a comment
There was a problem hiding this comment.
Thanks! Nice, I believe this is a better approach than the CSS, and it's testing well for me.
One thing I noticed while testing is that is_rtl() follows the logged-in user profile language in the editor, and not the site. Edge case and not a blocker for this, but it's probably worth investigating more and reporting where's necessary.
In the editors is_rtl() follows the current user's language, so an editor whose profile reads the other way would save the wrong side into the template. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…umn" This reverts commit ef3e20a.
Well, that does seem like an edge case, but if someone has a LTR setting and they are an admin, it seems consistent that it behaves like a LTR site |
In RTL, the main column of the sidebar templates and the read more link in the archive and search patterns stayed on the left, because core writes a constrained layout's left justification as physical margins. They now follow the text direction, and LTR looks the same as before. Synced from WordPress/ipsum#263. See #66817. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #261. Alternative to #262, which adds CSS that a user can't easily override in the editor. This one changes only the block markup.
Description
In RTL, the main column of the sidebar templates and the "read more" link in the archive and search patterns stayed on the left. Core writes a constrained layout's "left" justification as physical margins, so it doesn't follow the text direction.
rightwhenis_rtl(),leftotherwise. LTR output is unchanged.Testing Instructions
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Fable 5.2
Used for: Finding the cause, writing the change and measuring it against trunk in both directions; reviewed by me.
🤖 Generated with Claude Code