As described here, there's a slight difference in spacing when using the shortcode block vs the normal block. This will vary based on the theme you're using, as this spacing isn't something we are adding. But in testing some of the core themes, what's happening here is the shortcode output does not have a wrapping container around things and there's some styling that gets applied to all direct children of the main content area.
This PR fixes things by adding in a wrapping container if a custom container isn't being used (when used as a normal widget in a widget area, there is already a wrapper so we don't want to double wrap). This removes this extra spacing. We also are adding some top margin on the sub-header to match the bottom margin that already existed there.
Partially closes #37
How to test the Change
Install, activate and configure the plugin
Create a new page and add a Mailchimp Block and a Shortcode Block with the Mailchimp shortcode
View things on the front-end and note that there should be a container around both blocks and the spacing between the header and sub-header should match
If desired, use a widget enabled theme and add the Mailchimp widget into a widget area. Ensure things display correctly there as well
Changelog Entry
Fixed - Ensure the custom block and shortcode both have consistent spacing
Description of the Change
As described here, there's a slight difference in spacing when using the shortcode block vs the normal block. This will vary based on the theme you're using, as this spacing isn't something we are adding. But in testing some of the core themes, what's happening here is the shortcode output does not have a wrapping container around things and there's some styling that gets applied to all direct children of the main content area.
This PR fixes things by adding in a wrapping container if a custom container isn't being used (when used as a normal widget in a widget area, there is already a wrapper so we don't want to double wrap). This removes this extra spacing. We also are adding some top margin on the sub-header to match the bottom margin that already existed there.
Partially closes #37
How to test the Change
Changelog Entry
Credits
Props @dkotter, @qasumitbagthariya
Checklist: