mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 21:36:36 +00:00
Fix Markdown cards in Grid not taking full height (#23121)
The implementation of show_empty property in #21379 introduced regression which causes Markdown cards rendered within a Grid card to not take full height of its space. This is because a visible card is now forced to have "display: block", while without that it's rendered as "display: inline". As the CSSStyleDeclaration.style mandates string type, it's not possible to delete or null the value. Setting it to an empty string seems to do the trick as well and the linter is happy too. Fixes #23119
This commit is contained in:
parent
8e6f4886e8
commit
6126280f2d
@ -111,7 +111,7 @@ export class HuiMarkdownCard extends LitElement implements LovelaceCard {
|
||||
this._config.show_empty === false &&
|
||||
this._templateResult.result.length === 0;
|
||||
if (shouldBeHidden !== this.hidden) {
|
||||
this.style.display = shouldBeHidden ? "none" : "block";
|
||||
this.style.display = shouldBeHidden ? "none" : "";
|
||||
this.toggleAttribute("hidden", shouldBeHidden);
|
||||
fireEvent(this, "card-visibility-changed", { value: !shouldBeHidden });
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user