Skip to content

fix: render people headshots at consistent 220x220 with float clear#55

Merged
sanity merged 1 commit into
mainfrom
fix-headshot-consistency
May 27, 2026
Merged

fix: render people headshots at consistent 220x220 with float clear#55
sanity merged 1 commit into
mainfrom
fix-headshot-consistency

Conversation

@sanity

@sanity sanity commented May 27, 2026

Copy link
Copy Markdown
Contributor

Two issues on `/about/people/` after #54:

  1. Inconsistent sizes — the rule only set `width`, so Steven's 800×1011 source rendered 220×278 (portrait) while Ian's 800×800 source rendered 220×220 (square).
  2. No float clear — on the listing page Ian's right-floated image floated up beside Steven's bio because no element cleared the prior float.

Fix: pin a 220×220 square frame on `.person-headshot` and use `object-fit: cover; object-position: center 20%` so both faces stay in frame. Add `clear: right` so each new headshot starts below the previous. Mobile rule keeps the same 220×220 centered above the bio.

Verified at 375 / 600 / 768 / 1024 / 1280 / 1600 px on a local Hugo build.

[AI-assisted - Claude]

Two issues on /about/people/ after #54:

1. Sizes were inconsistent because the rule set width but not height —
   Steven's 800x1011 portrait source rendered 220x278, Ian's 800x800
   square rendered 220x220.

2. On the listing page Ian's float-right image landed beside Steven's
   bio because nothing cleared the previous float.

Fix: pin a 220x220 square frame on the .person-headshot class and use
object-fit: cover with object-position: center 20% so both faces stay
in frame regardless of source aspect ratio. Add clear: right so each
new headshot starts below the previous one. Mobile rule keeps the same
220x220 square and centers it above the bio.

[AI-assisted - Claude]
@sanity sanity merged commit 1d8cf26 into main May 27, 2026
3 checks passed
@sanity sanity deleted the fix-headshot-consistency branch May 27, 2026 17:06
sanity added a commit that referenced this pull request May 27, 2026
After #55 each bio's float-right image bled past the next h2 because
the listing template emitted h2 and content as bare siblings — Steven's
tall photo extended past his own paragraph and Ian's image with
clear:right floated past the entire content area, ending up next to
the footer instead of beside Ian's bio.

Wrap each child page in <section class="child-entry"> in list.html
(the actual template used for section pages — single.html was a red
herring) and set display: flow-root so floats are contained per bio.
Shrink the headshot to 160x160 (180x180 on mobile) so it fits next to
short summary text.

[AI-assisted - Claude]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant