Skip to content

Commit 2c98a1b

Browse files
committed
Lock product screenshot aspect ratio on the marketing site
Keep img height:auto with the PNG’s 1400×847 aspect-ratio and object-fit contain so HTML width/height attrs cannot stretch the shot when the layout width shrinks.
1 parent 203ae19 commit 2c98a1b

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

site/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ <h1>
9595
alt="PinkCode showing parallel tasks, filtered live timeline, usage meter, and workspace files"
9696
width="1400"
9797
height="847"
98+
decoding="async"
9899
loading="eager"
99100
/>
100101
</section>

site/styles.css

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ a {
6565
img {
6666
display: block;
6767
max-width: 100%;
68+
/* Required with HTML width/height attrs — otherwise max-width shrinks
69+
width while height stays fixed and the bitmap looks stretched. */
70+
height: auto;
6871
}
6972

7073
code {
@@ -410,14 +413,20 @@ h1 {
410413
position: relative;
411414
margin: 0 auto;
412415
max-width: 100%;
416+
/* Filter on the wrapper so the <img> box keeps a clean aspect ratio. */
417+
filter: drop-shadow(0 28px 50px rgba(87, 82, 121, 0.18))
418+
drop-shadow(0 8px 18px rgba(180, 99, 122, 0.1));
413419
}
414420

415421
.product-shot {
422+
display: block;
416423
width: 100%;
424+
max-width: 100%;
417425
height: auto;
418-
/* Soft lift only — no second fake titlebar / traffic lights */
419-
filter: drop-shadow(0 28px 50px rgba(87, 82, 121, 0.18))
420-
drop-shadow(0 8px 18px rgba(180, 99, 122, 0.1));
426+
/* Lock ratio to the PNG (1400×847) — never stretch to a foreign box. */
427+
aspect-ratio: 1400 / 847;
428+
object-fit: contain;
429+
object-position: center;
421430
}
422431

423432
/* ── Signal strip ─────────────────────────────────────────────── */
@@ -1038,8 +1047,10 @@ footer > div:last-child {
10381047
}
10391048

10401049
.product-shot {
1041-
/* Keep full window visible; slight scale not needed with real chrome */
10421050
width: 100%;
1051+
height: auto;
1052+
aspect-ratio: 1400 / 847;
1053+
object-fit: contain;
10431054
}
10441055

10451056
.signal-strip {

0 commit comments

Comments
 (0)