Skip to content

Commit 5fe0cee

Browse files
authored
🩹 Add missing classes for full_height and align_content (#319)
1 parent 5dc5cd7 commit 5fe0cee

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Block.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,20 @@ public function getClasses(): string
471471
{
472472
$supports = $this->getHtmlAttributes();
473473

474+
$class = $supports['class'] ?? '';
475+
476+
if ($alignContent = $this->block->alignContent ?? $this->block->align_content ?? null) {
477+
$class = "{$class} is-position-{$alignContent}";
478+
}
479+
480+
if ($this->block->fullHeight ?? $this->block->full_height ?? null) {
481+
$class = "{$class} full-height";
482+
}
483+
474484
return str_replace(
475485
acf_slugify($this->namespace),
476486
$this->slug,
477-
$supports['class'] ?? ''
487+
trim($class)
478488
);
479489
}
480490

0 commit comments

Comments
 (0)