Skip to content

Commit a7b75b8

Browse files
rrrutledgeclaude
andcommitted
Fix speaker-bio gap and bullet-marker bugs from the grid layout
The grid-based speaker-bio--aligned layout stretched every auto-placed text row to match the spanning photo's height, leaving a blank gap between the name line and the bio paragraph on short-bio entries. Switch to flexbox, which sizes the row to the tallest item without stretching individual rows - matching the pattern already used for the keynote speakers' speaker-bio--match-height variant. This requires wrapping each entry's text in a speaker-bio-text div, since flexbox (unlike grid) needs exactly one flex item per side. Also fixes a second bug this surfaced: bullet markers in a bio's list (e.g. Dave Nielsen's) were rendering outside the flex item's own box, stranding them beside the photo instead of next to their list item text. Rendering markers inside the list item's content box keeps them anchored regardless of the surrounding flex layout. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015uCc1a1nAJ7wJSLPRLjthQ
1 parent 3ae89ff commit a7b75b8

2 files changed

Lines changed: 150 additions & 62 deletions

File tree

‎assets/scss/_custom.scss‎

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -276,46 +276,56 @@ ol.breadcrumb {
276276
// Opt-in variant: keeps bio text (including lists) indented beside the photo
277277
// for the entire height of the entry, instead of the float-based layout's
278278
// default behavior — once text runs past the photo's bottom edge, a plain
279-
// float lets the remainder revert to full container width. Uses grid instead
280-
// of a fixed min-height so the row auto-sizes to whichever is taller, the
281-
// photo or the text — a fixed min-height under-reserved space for photos
282-
// taller than it (non-square crops), letting them overlap the next entry.
283-
// Scoped to its own modifier class so it doesn't change the float-based
284-
// layout other speaker-bio entries on the site still use.
279+
// float lets the remainder revert to full container width. Uses flexbox so
280+
// the row auto-sizes to whichever is taller, the photo or the text — a fixed
281+
// min-height under-reserved space for photos taller than it (non-square
282+
// crops), letting them overlap the next entry, and a grid layout stretched
283+
// each auto-placed text row to reach the spanning photo's full height,
284+
// leaving a gap between short lines. Scoped to its own modifier class so it
285+
// doesn't change the float-based layout other speaker-bio entries on the
286+
// site still use.
285287
.speaker-bio--aligned {
286-
display: grid;
287-
grid-template-columns: 240px 1fr;
288-
column-gap: 40px;
288+
display: flex;
289+
align-items: flex-start;
290+
gap: 40px;
289291
margin-bottom: 32px;
290292
}
291293

292-
.speaker-bio--aligned > img.speaker-photo {
293-
grid-column: 1;
294-
grid-row: 1 / -1;
295-
float: none;
296-
margin: 0;
294+
.speaker-bio--aligned .speaker-bio-text {
295+
flex: 1;
296+
min-width: 0;
297297
}
298298

299-
.speaker-bio--aligned > *:not(img) {
300-
grid-column: 2;
299+
.speaker-bio--aligned img.speaker-photo {
300+
flex: 0 0 240px;
301+
width: 240px;
302+
max-width: 240px;
303+
float: none;
304+
margin: 0;
301305
}
302306

303307
@media (max-width: 576px) {
304308
.speaker-bio--aligned {
305-
grid-template-columns: 1fr;
309+
flex-direction: column;
306310
}
307311

308-
.speaker-bio--aligned > img.speaker-photo {
309-
grid-column: 1;
310-
grid-row: auto;
312+
.speaker-bio--aligned img.speaker-photo {
311313
width: 100%;
312314
max-width: 240px;
313315
margin: 0 auto 20px;
314316
}
317+
}
315318

316-
.speaker-bio--aligned > *:not(img) {
317-
grid-column: 1;
318-
}
319+
// A bio's bullet list sits inside a flex item (.speaker-bio-text). With the
320+
// default outside marker position, browsers can lay the bullet out relative
321+
// to the flex row instead of the list item, stranding it beside the photo
322+
// far from its own text. Rendering the marker inside the item's own content
323+
// box keeps it anchored to its text regardless of the surrounding flex
324+
// layout.
325+
.speaker-bio-text ul {
326+
list-style-position: inside;
327+
padding-left: 0;
328+
margin: 1em 0;
319329
}
320330

321331
.content img {

0 commit comments

Comments
 (0)