-
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
Migrate buttons & navigation to flex layout #34872
Comments
There's also some interest to get this in other blocks, such as #32680 |
Hi @oandregal It makes sense to have this automatically applied but I don't think it's a separate or new block support. In a recent refactor to the social icons block @ntsekouras did, this control has been added to the "Flex Layout", in other words, any block that declares itself as a "flex layout container" will get this automatically. Do you think this address these use-cases? |
👋 - fun fact I was planning to start today the For me the justification controls should be handled by layout and I have in plans to explore that for such blocks like |
Ah, lovely. So, does that mean that buttons and navigation should be migrated to use the block supports instead ( |
No, I don't think so.. I think we should make them work with
What do you mean? They now use |
This is what I see:
Those are the typical things a block supports does automatically. As far as I understand, that's how social links do it: by using the existing Another question I have is: how this can be exposed in the |
Yes ideally, all of Buttons, Navigation and Columns maybe as well should be refactored to use the "flex" layout and they'll inherit the controls automatically.
I think allowing layout changes in theme.json is probably something we need to work on at some point but it's not straightforward, it's a bit more complex that the current simple styles we have. (Also, how to reflect these default values automatically in the UI without the block having the said attribute) |
OK. Updated title and description to better reflect the conversation. |
I've noticed that the buttons block and the navigation block both use the same "justification" options in the toolbar that are serialized to the post using the
justification-content
property.Via the
layout
support we've developed aflex
layout that already takes care of this for blocks.This is to track that we need to migrate those blocks to the new layout support.
The text was updated successfully, but these errors were encountered: