Skip to content

Commit 8a7f698

Browse files
committed
Mobile page-hero-tab: drive size from height (aspect always preserved)
The previous mobile rule (width: 80% + max-height: 60%) hit the max-height cap at viewport widths around 785px+, clipping height while leaving width fixed — distorting the 349:111 aspect ratio. Switch to height: 60%; width: auto so the <img>'s intrinsic aspect ratio drives the rendered shape and width auto-derives. Placement (right: -2%, bottom: 15%) unchanged.
1 parent b0ac5fb commit 8a7f698

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

assets/css/style.scss

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,14 @@ hr { border: 0; border-top: 1px dotted $text-faint; margin: 2rem 0; }
199199
background-position: 0% 50% !important;
200200
}
201201
.page-hero-tab {
202-
/* Mobile: just width + height: auto. The <img>'s intrinsic 349:111
203-
aspect ratio handles the rest. */
204-
width: 80%;
205-
height: auto;
206-
max-height: 60%;
202+
/* Mobile: drive sizing from HEIGHT only and let width auto-derive
203+
from the <img>'s intrinsic 349:111 aspect ratio. (Width-driven
204+
sizing combined with max-height clipped the height at viewport
205+
widths where the natural tab was taller than 60% of the 200px
206+
container, distorting the aspect ratio during resize.) Right
207+
anchor stays at -2% so placement is unchanged. */
208+
width: auto;
209+
height: 60%;
207210
bottom: 15%;
208211
right: -2%;
209212
}

0 commit comments

Comments
 (0)