diff --git a/assets/css/src/components-public/_public.scss b/assets/css/src/components-public/_public.scss index 984c56a2ca..5da429cc5b 100644 --- a/assets/css/src/components-public/_public.scss +++ b/assets/css/src/components-public/_public.scss @@ -389,6 +389,16 @@ div.mailpoet_form_slide_in.active { justify-content: center; margin-bottom: $form-block-margin; width: 100%; + + @include breakpoint-max-width($form-break-small-width - 1) { + &:not(.mailpoet_has_divider) { + display: none; + } + + &.mailpoet_has_divider { + max-height: 10px; + } + } } .mailpoet_message { diff --git a/lib/Form/Block/Divider.php b/lib/Form/Block/Divider.php index 47c2b4bf70..33b5ee27e5 100644 --- a/lib/Form/Block/Divider.php +++ b/lib/Form/Block/Divider.php @@ -13,9 +13,16 @@ class Divider { ]; public function render($block): string { - $classes = isset($block['params']['class_name']) ? $block['params']['class_name'] : ''; + $classes = ['mailpoet_spacer']; + if (isset($block['params']['type']) && $block['params']['type'] === 'divider') { + $classes[] = 'mailpoet_has_divider'; + } + if (!empty($block['params']['class_name'])) { + $classes[] = $block['params']['class_name']; + } + $classAttr = join(' ', $classes); $height = $block['params']['height'] ?? self::DEFAULT_ATTRIBUTES['height']; - return "