:host { display: block; height: 100%; } .post-card { display: grid; grid-template-rows: auto 1fr; height: 100%; overflow: hidden; border-radius: var(--pi-theme-card-radius, 1.5rem); box-shadow: var(--pi-theme-card-shadow, none); } // Beside the text rather than above it, and only when there is an image: // without one the text would sit in the image's column with the rest empty. :host(.post-card--row) .post-card--media { @media (min-width: 768px) { grid-template-rows: none; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); } } // The `` belongs to `app-api-image`, so a scoped rule cannot reach it. .post-card__media ::ng-deep img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; } .post-card__body { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.5rem 1.75rem; } .post-card__date { font-size: 0.8125rem; color: color-mix(in srgb, currentColor 68%, transparent); } .post-card__title { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.25; :host(.post-card--row) & { font-size: 1.375rem; } a { color: inherit; text-decoration: none; &:hover { text-decoration: underline; } } } .post-card__excerpt { margin: 0; line-height: 1.6; color: color-mix(in srgb, currentColor 68%, transparent); } .post-card__more { margin-top: auto; padding-top: 0.5rem; color: var(--pi-color-primary); font-weight: 600; text-decoration: none; }