Skip to content

Commit 44e8fb5

Browse files
committed
Add a container around the entire widget output. This prevents styling inconsistencies between the shortcode and block output. Add a top margin to match the bottom margin of the sub header
1 parent 59f6369 commit 44e8fb5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mailchimp_widget.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function mailchimp_sf_signup_form( $args = array() ) {
2323

2424
// See if we have valid Merge Vars
2525
if ( ! is_array( $mv ) ) {
26+
echo '<div class="mc_container">';
2627
echo wp_kses_post( $before_widget );
2728
?>
2829
<div class="mc_error_msg">
@@ -40,9 +41,12 @@ function mailchimp_sf_signup_form( $args = array() ) {
4041
</div>
4142
<?php
4243
echo wp_kses_post( $after_widget );
44+
echo '</div>';
4345
return;
4446
}
4547

48+
echo '<div class="mc_container">';
49+
4650
if ( ! empty( $before_widget ) ) {
4751
echo wp_kses_post( $before_widget );
4852
}
@@ -72,7 +76,7 @@ function mailchimp_sf_signup_form( $args = array() ) {
7276
}
7377
#mc_subheader {
7478
line-height: 1.25em;
75-
margin-bottom: 18px;
79+
margin: 18px 0;
7680
}
7781
.mc_merge_var {
7882
margin-bottom: 1.0em;
@@ -275,6 +279,8 @@ function mailchimp_sf_signup_form( $args = array() ) {
275279
if ( ! empty( $after_widget ) ) {
276280
echo wp_kses_post( $after_widget );
277281
}
282+
283+
echo '</div>';
278284
}
279285

280286
/**

0 commit comments

Comments
 (0)