From 739bf9613cb6d7d09a3737e9bab5e509c76ab51b Mon Sep 17 00:00:00 2001 From: rockdrigo Date: Mon, 9 Nov 2026 19:30:25 -0600 Subject: [PATCH] fix(indicadores): opportunity cards fill the height of their grid row How: the grid rows were already equal (grid-auto-rows: 1fr), but the card kept its content height inside the stretched panel: mat-card's height: 100% had no definite parent height to resolve against. The KPI panel and the KPI card host are now flex columns, and the card and mat-card grow (flex: 1 1 auto) to fill them, so every card is as tall as its row. Implications: applies to every domain's cards. A panel showing "Reintentar consulta" keeps the button under its card, and the card takes the remaining height. --- src/app/features/indicadores/indicador-kpi-card.ts | 4 ++-- src/app/features/indicadores/indicador-kpi-panel.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/features/indicadores/indicador-kpi-card.ts b/src/app/features/indicadores/indicador-kpi-card.ts index ce831e1..2869c85 100644 --- a/src/app/features/indicadores/indicador-kpi-card.ts +++ b/src/app/features/indicadores/indicador-kpi-card.ts @@ -34,8 +34,8 @@ import { KpiIntervalo } from './indicadores-kpi'; `, styles: ` - :host { display: block; min-width: 0; } - mat-card { box-sizing: border-box; height: 100%; padding: var(--issste-space-6); + :host { display: flex; flex-direction: column; min-width: 0; } + mat-card { box-sizing: border-box; flex: 1 1 auto; padding: var(--issste-space-6); background: var(--issste-surface); color: var(--issste-text); border: 1px solid var(--issste-border); border-radius: var(--issste-radius); box-shadow: none; } h3 { margin: 0; font-family: var(--issste-font-heading); font-size: 1rem; font-weight: 500; line-height: 1.3; } diff --git a/src/app/features/indicadores/indicador-kpi-panel.ts b/src/app/features/indicadores/indicador-kpi-panel.ts index aab63f7..c0aa35f 100644 --- a/src/app/features/indicadores/indicador-kpi-panel.ts +++ b/src/app/features/indicadores/indicador-kpi-panel.ts @@ -23,7 +23,8 @@ interface KpiDisplay extends KpiResult { period?: string; earlier?: boolean; ver @if (result().state === 'Error de consulta') { }`, - styles: ':host { display: block; min-width: 0; }', + // The card fills the panel, so cards in one grid row are as tall as the row. + styles: ':host { display: flex; flex-direction: column; min-width: 0; } app-indicador-kpi-card { flex: 1 1 auto; }', }) export class IndicadorKpiPanel implements OnChanges { @Input({ required: true }) dominio!: Dominio;