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:
@@ -275,11 +275,14 @@ body:not(.home) .menu { display: none; }
|
||||
pointer-events: none;
|
||||
}
|
||||
.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 {
|
||||
width: 100%;
|
||||
aspect-ratio: 3 / 2;
|
||||
object-fit: cover;
|
||||
height: auto;
|
||||
max-height: 70vh;
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user