fix: peek column images now use a fixed 3:2 crop, matching the portfolio-index preview

plans and photos have wildly different natural aspect ratios (a 46x31in A0 detail plan next to a 3:2 photo), so the peek box was jumping size on every hover. now uses the same aspect-ratio:3/2 + object-fit:cover treatment as the portfolio-index preview it already mirrors in position/width — stays a fixed size regardless of what is hovered.
This commit is contained in:
kgva CMS
2026-08-11 23:09:17 +00:00
parent 932d7a7653
commit 55926a84f2
+5 -2
View File
@@ -275,11 +275,14 @@ body:not(.home) .menu { display: none; }
pointer-events: none; pointer-events: none;
} }
.proj-peek.is-visible { opacity: 1; visibility: visible; } .proj-peek.is-visible { opacity: 1; visibility: visible; }
/* same fixed shape as the portfolio-index preview (.tui__preview img above)
— a plan and a photo have wildly different natural ratios, so without
this the peek box would jump size on every hover */
.proj-peek img { .proj-peek img {
width: 100%; width: 100%;
aspect-ratio: 3 / 2;
object-fit: cover;
height: auto; height: auto;
max-height: 70vh;
object-fit: contain;
display: block; display: block;
margin: 0; margin: 0;
} }