fix: add is-layout-constrained and is-layout-flow CSS classes for block themes#1521
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds block theme-specific CSS layout classes to campaign containers to fix vertical spacing issues in block themes. The changes ensure proper spacing between inner blocks and remove extra margins from first and last elements.
Changes:
- Adds a new
is_block_theme()helper method to check if the active theme is a block theme - Adds
is-layout-constrainedclass to inline campaigns when using block themes - Adds
is-layout-flowclass to overlay campaign content when using block themes
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hey @thomasguillot! I would appreciate your eyes on this one just to make sure the vertical spacing and how the blocks act in the overlay prompts make sense. Both follow the classic theme, but if we don't want that for some reason, now's the time to tweak it 🙂 |
|
Frankly we need to revisit this whole sidebar. It's a bit of a mess now that we have so many different settings. We should have Settings/Styles tabs for example. |
|
Everything tested well 👍 |
I think we really need to revisit this with the block theme in mind. If block theme active:
Basically, we should more or less treat the Prompt as a Group block. (but only for block theme –– I don't want to break the classic theme) |
|
Started to move things around here: #1522 |
|
Thanks @chickenn00dle! 🥳 |
|
Hey @laurelfulford, good job getting this PR merged! 🎉 Now, the Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label. If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label. Thank you! ❤️ |
# [3.10.0-alpha.1](v3.9.2...v3.10.0-alpha.1) (2026-03-05) ### Bug Fixes * add is-layout-constrained and is-layout-flow CSS classes for block themes ([#1521](#1521)) ([bafa61f](bafa61f)) * give more specific overlays priority by tweaking DOM order ([f0a64ef](f0a64ef)) * give more specific overlays priority by tweaking DOM order ([b8abd19](b8abd19)) * iframe editor compatibility ([#1520](#1520)) ([222f33c](222f33c)) * leave inline (non-overlay) popups in default non-sort ([a9c6f64](a9c6f64)) * run do_shortcode on manual, custom placements for the block theme ([#1526](#1526)) ([adbca1c](adbca1c)) ### Features * add AI agent guidelines ([#1530](#1530)) ([d0c4eb4](d0c4eb4))
|
🎉 This PR is included in version 3.10.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [3.10.0](v3.9.2...v3.10.0) (2026-03-16) ### Bug Fixes * add is-layout-constrained and is-layout-flow CSS classes for block themes ([#1521](#1521)) ([bafa61f](bafa61f)) * give more specific overlays priority by tweaking DOM order ([f0a64ef](f0a64ef)) * give more specific overlays priority by tweaking DOM order ([b8abd19](b8abd19)) * iframe editor compatibility ([#1520](#1520)) ([222f33c](222f33c)) * leave inline (non-overlay) popups in default non-sort ([a9c6f64](a9c6f64)) * run do_shortcode on manual, custom placements for the block theme ([#1526](#1526)) ([adbca1c](adbca1c)) ### Features * add AI agent guidelines ([#1530](#1530)) ([d0c4eb4](d0c4eb4))
|
🎉 This PR is included in version 3.10.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |

All Submissions:
Changes proposed in this Pull Request:
This PR adds a couple standard block layout classes to the Campaign containers:
is-layout-constrainedclass, which will fixes an issue with vertical spacing within the block - it means the inner blocks will pick up the right vertical spacing, and remove the top margin for the first element, and bottom element from the last element.is-layout-flowclass - this also fixes the vertical spacing, but doesn't include styles that constrain the width of the inner blocks (so the blocks will fill the inner space). Otherwise withis-layout-constrained, the inner blocks don't get wider than 632pxNote: this doesn't address how inline campaigns always display at the narrower content width, even in wider templates. We need some way to set them wide; I'm not sure what that is yet (maybe a block theme-specific control?)
Closes NPPD-1192
Closes NPPD-1193
How to test the changes in this Pull Request:
632px.(Note: there will be a lack of padding in this layout, but that's also present in the classic theme. Flex blocks like row also seem to be missing styles for alignment. I'll dig into those in a separate PR 😅 ).
Other information: