-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
RTL fix for inlined block-styles #41762
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a code review.
With the PR applied, on RTL, using Twenty Twenty-Two.
Navigation block:
Blocks/navigation/style-rtl.css is loading.
The margin on the submenu button is correctly moved to the right of the button.
- During testing I noticed that this margin was incorrect in WordPress 6.0 without Gutenberg installed. Perhaps this can be backported to a minor release.
Query pagination block:
The arrows are pointing in the correct direction. The spacing is also correct.
This is an improvement over Gutenberg 13.4.0.
Comment pagination block:
The arrows are pointing in the correct direction. The spacing is also correct.
This is an improvement over Gutenberg 13.4.0.
I think it would be good if an RTL user could test and confirm, since there are probably more areas to test than the 3 above.
Updated the PR and rebased, this is now ready for another review 👍 |
There is a problem on all RTL sites using block themes and block CSS files This fixes loading all RTL CSS files and also add suffix to the styles object This fixes: https://wordpress.org/support/topic/rtl-problem-bug/ WordPress/gutenberg#41649 WordPress/gutenberg#41762 CC to locale managers: @naokomc @tobifjellner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good to me 👍
Does this change need backporting as it seems we have the same problem in core now https://core.trac.wordpress.org/ticket/56325? |
I rebased this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you @jorgefilipecosta and @scruffian!
Yes, it should be backported 👍 |
What?
Fixes #41649
Why?
When replacing block styles in Gutenberg, we don't account for RTL styles.
How?
Adds an extra condition to change the path for inline styles to their RTL counterpart.
Testing Instructions
Switch to an RTL language and ensure that the RTL styles get loaded.
To make testing easier, you can also add
var_dump( $style_path );
below the line that changed to see more clearly that the RTL styles are the ones that get loaded.