-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Patterns in Classic Themes: full-width alignment doesn't display in the editor for patterns created in Block Themes #62516
Comments
I'm noticing that the classic themes have a layout type of (Quick primer: In block themes it seems that only constrained layouts support alignment, and default layouts don't support them. In classic themes I'm not sure how it's supposed to work, but it looks like they only have a I tested in WordPress 6.4 and it was also an issue back then, so it seems like it has always been a bug, and not something specific to 6.6. I guess the fix only worked for block themes. It'd probably be quite easy to fix if I knew how to detect that the |
Ok so, it appears this is coming from the Appearance Tools settings. Classic themes do not have this option active by default. In this sense, this is expected. |
I made some progress. This is almost easily solvable, but not quite. It's possible to add the correct alignment classes to the pattern block, but there's an extra step. In classic themes, blocks have an extra <div class="wp-block" data-align="full">
<div class="block-editor-block-list__block wp-block-group" id="block-57d4791e-0755-4274-8148-201f0f3c669b" role="document" aria-label="Block: Group" data-block="57d4791e-0755-4274-8148-201f0f3c669b" data-type="core/group" data-title="Group" data-is-drop-zone="true"><div class="wp-block-group__inner-container block-editor-block-list__layout is-layout-constrained wp-block-group-is-layout-constrained">
</div>
</div> This part isn't easy to achieve. I'll have a think about it, but if it's a big task it might sadly not be worth the effort. |
Removing this from the 6.6 board given the conversation above about how it's not a new issue. |
Description
Possibly related to #62326
When a pattern created in a Block Theme with a full-width block is inserted in a page or post after switching to a Classic Theme, the full-width block in the pattern will display in content width in the editor. It maintains the correct alignment on the front end, though.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: