-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix centered legacy button. #23381
Fix centered legacy button. #23381
Conversation
Size Change: +384 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
@@ -18,6 +18,16 @@ | |||
} | |||
} | |||
|
|||
.wp-block-buttons.alignleft .wp-block-button { |
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.
do we need this since it's the default style if we don't have alignments?
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.
Yes because the default in RTL settings is right aligned.
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.
But wouldn't the style be flipped in the RTL mode?
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.
No, the alignment buttons are the specific exception because the class names are explicitly set.
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.
Does this mean we need to wrap these with /*!rtl:begin:ignore*/
?
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.
MAYBE.
Yes. Actually it does. On it.
@kjellr I bundled some RTL / alignment fixes in this patch. Can you sanity check them? |
Good catch. I think the last one got it? |
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.
Ah wait, I think I missed something — Check out the margins for left/right items when RTL styles are active in that screenshot. I think Riad's note above is still valid. |
Ack, I'll make a follow-up. |
Fixes #23291.
The legacy button (singular) block could not be centered.
Before:
After:
This PR also adds an explicit "align left" rule for the Buttons (plural) block, which matters in RTL contexts.