Skip to content

Align the sidebar templates' content to the start edge in RTL - #262

Closed
yashjawale wants to merge 1 commit into
WordPress:trunkfrom
yashjawale:fix/rtl-sidebar-content-261
Closed

yashjawale wants to merge 1 commit into
WordPress:trunkfrom
yashjawale:fix/rtl-sidebar-content-261

Conversation

@yashjawale

Copy link
Copy Markdown
Contributor

Fixes #261

Description

The sidebar templates' main column is a constrained layout set to "left". Core writes that as physical margins (margin-left: 0 !important) with no RTL counterpart, so in RTL the title and content hug the left edge and leave a gap on the right.

This adds an RTL-only rule in style.css that swaps the margins, so the content sits against the right edge, away from the sidebar.

Screenshots

Before

rtl-before

After

rtl-after

Testing Instructions

  1. Set the site language to an RTL language, such as Persian (fa_IR).
  2. Create a page with a title and a paragraph, and assign the Pages Sidebar template (or switch template of default Sample page).
  3. View it on the front end at 1440px wide.
  4. Confirm the title and content sit against the right edge of the main column.
  5. Switch back to an LTR language and confirm the content still sits against the left edge.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Opus 5.5
Used for: Finding the cause & writing its fix, all changes reviewed & tested manually.

@github-actions github-actions Bot added the [Area] Global Styles Issues or PRs that touch theme.json or the base stylesheet. label Nov 30, 2026
@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

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.

Co-authored-by: yashjawale <yashjawale@git.wordpress.org>
Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org>
Co-authored-by: Goudarz <goudarz@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@MaggieCabrera

Copy link
Copy Markdown
Contributor

I went a different route for this over at #263

@MaggieCabrera

Copy link
Copy Markdown
Contributor

Closing this in favor of #263, I gave you credit on that one, thanks for your PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Global Styles Issues or PRs that touch theme.json or the base stylesheet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pages Sidebar keeps the title and content on the left in RTL

2 participants