Skip to content

Commit 95a7e4c

Browse files
committed
Mobile polish: home banner fits, callouts left, research images left, smaller tab
- .home-banner mobile: switch to aspect-ratio: 1022/348 with background-size: 100% 200% so the entire top carousel pane fits the viewport width at every phone size. The 'RNA fold & function from scratch' tab no longer gets clipped on iPhone mini (375px). Container height tracks the pane's aspect ratio. - .home-callouts: text-align center -> left on mobile so 'what we do' and 'we strive...' hug the left edge in iPhone view. - .research-row mobile: drop the centering on word-art sprites ('3D puzzles', 'RNA structures...', 'Cloud biochemistry') -- they now sit flush left. - .page-hero-tab mobile: height 60% -> 45% so the tab is smaller and no longer horizontally cramped on portrait iPhone mini. Aspect ratio stays preserved (width auto).
1 parent a2b22d4 commit 95a7e4c

1 file changed

Lines changed: 19 additions & 18 deletions

File tree

assets/css/style.scss

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,11 @@ hr { border: 0; border-top: 1px dotted $text-faint; margin: 2rem 0; }
200200
}
201201
.page-hero-tab {
202202
/* 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. */
203+
from the <img>'s intrinsic 349:111 aspect ratio. Reduced from
204+
60% -> 45% so the tab isn't horizontally cramped at portrait
205+
iPhone-mini widths (~375px). */
208206
width: auto;
209-
height: 60%;
207+
height: 45%;
210208
bottom: 15%;
211209
right: -2%;
212210
}
@@ -353,10 +351,10 @@ hr { border: 0; border-top: 1px dotted $text-faint; margin: 2rem 0; }
353351
.home-research-arrow { display: none; }
354352
.home-callouts {
355353
grid-template-columns: 1fr;
356-
text-align: center;
354+
text-align: left;
357355
}
358356
.home-callout-left,
359-
.home-callout-right { text-align: center; }
357+
.home-callout-right { text-align: left; }
360358

361359
/* Collapse the multi-line line breaks so the callouts flow as a single
362360
line across the page on phone/tablet widths. */
@@ -767,7 +765,9 @@ details.show-more {
767765
@media (max-width: $bp-tablet) {
768766
.research-row {
769767
grid-template-columns: 1fr;
770-
> i { margin: 0 auto; }
768+
/* Left-align the word-art sprites (3D puzzles, RNA structures…,
769+
Cloud biochemistry) at narrow widths instead of centering. */
770+
> i { margin: 0; }
771771
> a { grid-column: 1; }
772772
}
773773
}
@@ -905,15 +905,16 @@ details.show-more {
905905
edge of logo_home.png anchored to the right of the viewport — matches
906906
the .page-hero approach used on interior pages. */
907907
.home-banner {
908-
aspect-ratio: auto;
909-
height: 200px;
910-
/* logo_home.png is two carousel panes stacked (1022x696 = 1022x348 +
911-
1022x348). Scale the image so its full height = 2x container,
912-
making each pane exactly the container height; then anchor at the
913-
top-RIGHT so only the FIRST pane (RNA fold & function) is visible
914-
and the 'from scratch' tab on the right is what shows. */
915-
background-size: auto 200%;
916-
background-position: 100% 0;
908+
/* Show only the first carousel pane (1022x348) and let it span the
909+
full viewport width so nothing in the artwork — including the
910+
'RNA fold & function from scratch' tab on the right — gets clipped
911+
at narrow phone widths. The container's height tracks the pane's
912+
aspect ratio so it stays proportional, and background-size 100% 200%
913+
puts the top pane in the visible window. */
914+
aspect-ratio: 1022 / 348;
915+
height: auto;
916+
background-size: 100% 200%;
917+
background-position: 0 0;
917918
}
918919
/* Drop the desktop 5% breakout — at narrow viewports it caused horizontal
919920
overflow / scroll. */

0 commit comments

Comments
 (0)