Fix size of cards inside stack cards (#21190)

* Fix size of cards inside stack cards

* Apply style everywhere

* Fix stack

* Fix grid stack

* Set block only for square
This commit is contained in:
Paul Bottein 2024-06-27 19:31:55 +02:00 committed by GitHub
parent fd64d17d88
commit da2865d8bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

View File

@ -43,6 +43,9 @@ export class HuiCard extends ReactiveElement {
private _listeners: MediaQueriesListener[] = [];
protected createRenderRoot() {
const style = document.createElement("style");
style.textContent = `hui-card { display: contents }`;
this.append(style);
return this;
}

View File

@ -92,6 +92,7 @@ class HuiGridCard extends HuiStackCard<GridCardConfig> {
}
:host([square]) #root > *:not([hidden]) {
display: block;
grid-row: 1 / 1;
grid-column: 1 / 1;
}

View File

@ -30,7 +30,7 @@ export class HuiHorizontalStackCard extends HuiStackCard {
height: 100%;
gap: var(--horizontal-stack-card-gap, var(--stack-card-gap, 8px));
}
#root > * {
#root > hui-card > * {
flex: 1 1 0;
min-width: 0;
}