diff --git a/application/src/Form/BlockLayoutDataForm.php b/application/src/Form/BlockLayoutDataForm.php index ee70d6f79..1f3ea46d8 100644 --- a/application/src/Form/BlockLayoutDataForm.php +++ b/application/src/Form/BlockLayoutDataForm.php @@ -91,6 +91,18 @@ public function init() 'label' => 'Background', ], ]); + $this->add([ + 'name' => 'min_height', + 'type' => 'number', + 'options' => [ + 'label' => 'Minimum height', // @translate + ], + 'attributes' => [ + 'id' => 'block-layout-data-min-height', + 'data-key' => 'min_height', + 'min' => '0', + ], + ]); /** * Modules can add elements to this fieldset using the form.add_elements diff --git a/application/src/View/Helper/BlockLayout.php b/application/src/View/Helper/BlockLayout.php index d929d21fb..31851737c 100644 --- a/application/src/View/Helper/BlockLayout.php +++ b/application/src/View/Helper/BlockLayout.php @@ -217,6 +217,10 @@ public function render(SitePageBlockRepresentation $block) // No background size } } + $minHeight = $block->layoutDataValue('min_height'); + if ($minHeight) { + $inlineStyles[] = sprintf('min-height: %spx', (int) $minHeight); + } $view = $this->getView(); $blockLayout = $this->manager->get($block->layout());