.item { height: 100%; display: grid; grid-template-rows: minmax(auto, 65%) auto; text-decoration: none; color: currentColor; } .imgContainer { justify-self: stretch; position: relative; // for icon when image is unavailable display: grid; place-items: center; } .img { height: 100%; object-fit: cover; } .imgNA { fill: var(--clr-fill-muted); height: 40%; } .textContainer { display: grid; gap: var(--spacer-1); padding: var(--spacer-1); text-align: center; justify-items: center; align-content: start; } .children { max-height: 7em; // firefox doesn't support lh yet. max-height: 7lh; overflow: auto; } .name { font-size: 1.2em; } .rating { display: flex; align-items: center; gap: var(--spacer-0); line-height: 1; flex-wrap: wrap; justify-content: center; } .ratingIcon { --dim: 1em; height: var(--dim); width: var(--dim); fill: var(--clr-fill); }