-
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
Buttons Block: Add text align to block toolbar, and replace align #44614
Comments
I think there may be valid cases for both button alignment and button text alignment? |
Each row of buttons is a single buttons block, with two button blocks inside, each set to 50% width. Here's a code example
Good catch, centered works for me. However I'm not convinced left aligned does, I think we'd have to test in RTL language. It simply applies the
If it was possible to insert a Button (singular) outside of the containing Buttons block, I could see a use case, since it would apply a float and you could have text wrapping around it. However since the container is there, alignments on the button blocks inside make less sense, since they'll only ever float inside the container. You could still right-float the Buttons parent container itself, to have text float around it, but if I want a center or right-aligned button, I can use the container justification dropdown. Or is there a use case I'm missing? Thank you for looking! 🙏 |
The Buttons block supports setting the width of buttons, but does not offer a way to change text alignment. In the following screenshots, the blocks have set their individual alignments to center, left, and right:
However the "alignment" dropdown doesn't work in this case, because it simply applies
align[left|right|center]
classes. These are the legacy float based classes that were relevant when the Button block stood alone (see also #39937). Those classes need to still exist for legacy content that uses the Button in this way, but the controls are not useful anymore. In that light, we could replace those alignments with a text alignment dropdown, so we can do this:The text was updated successfully, but these errors were encountered: