-
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
Try: Editor Grid #4314
Try: Editor Grid #4314
Conversation
Per today's bug scrub, note that this resolves #1483. |
How are you envisioning the theme providing instructions to the editor here? Just overriding styles in editor-styles.css or something in functions.php? |
@mor10 likely enqueuing and overriding the editor layout element through https://wordpress.org/gutenberg/handbook/blocks/applying-styles-with-stylesheets/#enqueueing-editor-and-front-end-assets That would give the best flexibility for responsive styles that would be hard and convoluted to provide otherwise. |
Was wondering, for Post Types (plugin based) that mostly control the size of the output unless the theme is very vocal about it's width. Should be allowed for that to be configured on a Post Type level? |
This pull request appears to have languished and will not be easily reconciled with master. Please feel free to reopen and rebase against the current master, or open a new pull request. |
In progress (Highly Experimental)
This PR seeks to explore setting up a grid as the layout manager for the editor content. It absorbs the responsibility of handling
wide
andfull
widths. A theme should be able to overwrite the grid and every block would fall into place. This should greatly simplify calculations for presence of sidebar (collapsed or not). The biggest challenge is accommodating floats without changing the editor markup.This follows early explorations by @mor10.
Extra Alignment Options
Another thing this enables is registering extra alignment options (pulled content, side-by-side cards, etc) that a user can easily toggle with one click.
See this rough video for some of these explorations: https://cloudup.com/cxerBaTpMI9
Themes
A theme should be able to overwrite the grid template definition and, if using the same named areas, all content and alignment possibilities should follow through.
Concerns
The grid paradigm is fundamentally incompatible with floating and wrapping direct descendant nodes. That means if we want to support both, we need to add a container wrapper to the elements that want to interact in a float context.