diff --git a/asset/css/list/list-item.less b/asset/css/list/list-item.less index ca8224b1..56a43a39 100644 --- a/asset/css/list/list-item.less +++ b/asset/css/list/list-item.less @@ -38,9 +38,7 @@ } footer { - &:not(:empty) { - padding-top: .5em; - } + padding-top: .5em; } } diff --git a/src/Common/BaseListItem.php b/src/Common/BaseListItem.php index 9f62dff0..cf143ee3 100644 --- a/src/Common/BaseListItem.php +++ b/src/Common/BaseListItem.php @@ -85,11 +85,14 @@ protected function createMain(): BaseHtmlElement return $main; } - protected function createFooter(): BaseHtmlElement + protected function createFooter(): ?BaseHtmlElement { $footer = new HtmlElement('footer'); $this->assembleFooter($footer); + if ($footer->isEmpty()) { + return null; + } return $footer; }