Fix: youtube cards rendered at 0 width when constrained
YouTube cards only have absolutely-positioned children (.yt__play, .yt__title), so their intrinsic width is 0. With max-width:78% + justify-self:center but no `width`, the cards collapsed to nothing — explaining the empty Videos section. Portfolio worked because its caption has text content giving the card an intrinsic width. Add width:100% to the constrained rule so max-width has a definite basis to cap against. Both portfolio and youtube cards now render at 78% of their grid track on 700px+.
This commit is contained in:
@@ -286,6 +286,7 @@ main > .section:first-child { margin-top: var(--space-3xl); }
|
||||
@media (min-width: 700px) {
|
||||
.grid > .card--portfolio,
|
||||
.grid > .card--youtube {
|
||||
width: 100%;
|
||||
max-width: 78%;
|
||||
justify-self: center;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user