-
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
Alignments Overview #29506
Comments
#29335 landed and it checks a few items on this issue. We can now define a default layout (widths) in theme.json and use it consistently in themes or add a specific layout for some areas of the site/content. |
"Allow modifying the default values in Global Styles -> Spacing." has an issue made for it at #30761 |
I have an update on the visuals. This one features the basic alignments, plus wide and full-wide. The center icon has been updated, and the previous icon for centering has been repurposed for indicating "None". There's help text for "None" and "Wide", to show the values for the content and wide area layout values. The next one is shown for themes that do not support wide or fullwide alignments. It has the same basic qualities, but shows additional help text at the bottom, to explain the missing buttons: |
Closing this out as most tasks have been completed and it's a few years old at this point.
As a follow up to this, please follow along here: #44357
For breakpoints and more recent conversation/thinking there, please refer to this issue: #34641 |
Gathering some of the current efforts and idea around improving how block alignments are handled and the kind of interactions they unlock.
System
The first and most important aspect is a foundation that allows to express alignments declaratively and incorporate the existence of nested contexts as a first-class set. The original alignments predate the existence of nested blocks, so they were not taken into account.
This work would improve upon a few fundamental issues that have been affecting the handling of alignments and greatly simplify theme integration, which right now requires a heavy amount of CSS to properly handle.
The other highly relevant aspect is the integration with
theme.json
declarations and the global styles UI representation.Another important aspect would be to allow block to have a default alignment set through those same mechanisms so that “videos” always are inserted as “wide” rather than “content”, for example.
theme.json
.theme.json
#34317It'd be important to also incorporate this information and help clarify contextually some of the tools in the interface, as outlined in:
Finally, a consideration that needs handling is how these alignments map or evolve for different breakpoints. Good default are important here.
Concerning interactivity
The snap to grid idea has been generally coupled with the development of a grid system, but that doesn't have to be the case. We can still have snap-to-alignment-breakpoints for blocks that support it within a container.
One more area to explore is the interaction with drag and drop. For example, dragging an image to the canvas, depending on where you are dropping can default to content, wide, or full.
The text was updated successfully, but these errors were encountered: