diff --git a/static/css/components/card.css b/static/css/components/card.css index e1d77d50..ed424827 100644 --- a/static/css/components/card.css +++ b/static/css/components/card.css @@ -23,6 +23,7 @@ cursor: pointer; /* Added from recipe-card */ display: flex; /* Added from recipe-card */ flex-direction: column; /* Added from recipe-card */ + overflow: hidden; /* Add overflow hidden to contain children */ } .lora-card:hover { @@ -50,9 +51,11 @@ .card-preview { position: relative; width: 100%; - height: 100%; + height: 100%; /* This should work with aspect-ratio on parent */ border-radius: var(--border-radius-base); overflow: hidden; + flex-shrink: 0; /* Prevent shrinking */ + min-height: 0; /* Fix for potential flexbox sizing issue in Firefox */ } .card-preview img,