Skip to content

Fix horizontal scroll on settings page in RTL locales - #1112

Merged
bobmatyas merged 1 commit into
trunkfrom
boost-764-wp-super-cache-settings-page-causes-horizontal-scroll-bleed
Sep 30, 2026
Merged

bobmatyas merged 1 commit into
trunkfrom
boost-764-wp-super-cache-settings-page-causes-horizontal-scroll-bleed

Conversation

@bobmatyas

@bobmatyas bobmatyas commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes BOOST-764

Reported on the forums: https://wordpress.org/support/topic/minor-ui-issue-in-rtl/

Proposed changes

  • #wpsc-dashboard used margin-left: -20px to cancel the 20px start padding on #wpcontent. In RTL, core's common-rtl.css moves that padding to the right, but the negative margin stayed on the left, pushing the dashboard 20px past the viewport edge and causing horizontal scroll across the admin page and menu.
  • Switch to margin-inline-start: -20px so the offset follows the writing direction. LTR rendering is unchanged.

Screenshots

Before

image

After

image

Testing instructions

  1. Set the site language to an RTL locale (e.g. Arabic) in Settings → General.
  2. Go to Settings → WP Super Cache.
  3. Confirm there is no horizontal scrollbar and the dashboard sits flush against the admin menu.
  4. Switch back to English and confirm the settings page looks the same as before.

Verified with core's LTR/RTL admin CSS in Chrome at 1512px wide: RTL overflow went from 20px to 0, LTR layout is identical before and after.

🤖 Generated with Claude Code

#wpsc-dashboard used margin-left: -20px to cancel #wpcontent's start
padding. In RTL, core moves that padding to the right, so the negative
left margin pushed the dashboard 20px past the viewport edge. Use
margin-inline-start so the offset follows the writing direction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@xavier-lc xavier-lc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as described

@bobmatyas

Copy link
Copy Markdown
Contributor Author

@xavier-lc Thanks for the review. Do I go ahead and merge the change? It's my first time contributing here since it was split out of the monorepo.

@bobmatyas
bobmatyas merged commit 65d7220 into trunk Sep 30, 2026
7 checks passed
@bobmatyas
bobmatyas deleted the boost-764-wp-super-cache-settings-page-causes-horizontal-scroll-bleed branch September 30, 2026 11:06
@xavier-lc xavier-lc added this to the 3.1.4 milestone Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants