Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spacer: Add RTL support #41172

Merged
merged 2 commits into from
May 23, 2022
Merged

Spacer: Add RTL support #41172

merged 2 commits into from
May 23, 2022

Conversation

walbo
Copy link
Member

@walbo walbo commented May 19, 2022

What?

This PR flips the value of the margin and padding when the layout switches from LRT to RTL, so that the original intent of the value is preserved.

Why?

Improve RTL experience in WordPress

How?

Used rtl to flip the values of marginRight, marginLeft, paddingRight and paddingLeft

Testing Instructions

Tested in Storybook

Screenshots or screencast

Before After
spacer-before spacer-after

@walbo walbo added [Type] Enhancement A suggestion for improvement. [Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components labels May 19, 2022
@walbo walbo requested a review from ajitbohra as a code owner May 19, 2022 21:57
@walbo walbo changed the title Spacer: Add RTL support Spacer: Add RTL support May 23, 2022
@walbo walbo added the Internationalization (i18n) Issues or PRs related to internationalization efforts label May 23, 2022
@walbo walbo requested a review from ciampo May 23, 2022 17:54
Copy link
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

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

Code changes LGTM 🚀 Thank you!

CI failures don't seem related to these changes, so maybe re-running them or rebasing will fix them

@walbo walbo force-pushed the fix/components-spacer-rtl branch from f134c22 to 2703766 Compare May 23, 2022 19:20
@ciampo ciampo requested a review from mirka May 23, 2022 20:30
@ciampo ciampo merged commit df32bdd into trunk May 23, 2022
@ciampo ciampo deleted the fix/components-spacer-rtl branch May 23, 2022 20:30
@github-actions github-actions bot added this to the Gutenberg 13.4 milestone May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system Internationalization (i18n) Issues or PRs related to internationalization efforts [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants