1

I know how to add or remove support for align left, right, center, wide, and full to a Gutenberg block, but I'm wondering does anyone know how to add support for align-none?

The challenge I'm running into is if someone clicks align-anything, there's no indication on how to revert to the default null state. I figured out that if you click 'align center' and then click it again, it removes data-align:center from the block in the editor, but the control icon still looks like it's set to align center. It's not the best UI.

  • Note that the behaviour of alignment, and what you're seeing, depends on the block you're talking about, and the editor stylesheet you're using. Please edit your question to help clarify this. For example, are you talking about an image block? Group? Cover? Paragraph? – Tom J Nowell Mar 25 at 16:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.