Contain the floated thumbnail so listing spacing actually applies

The gap between listing items was collapsing to 11-33px and varying per
item, despite a 50px margin. The thumbnail floats left and nothing
contained it, so whenever the excerpt was shorter than the 150px image
-- which is most of them now the column is the full 930px rather than
the theme's 650px -- the image overflowed the item and the margin below
it was absorbed.

.post/.hentry now use display: flow-root, so the item wraps its own
float and the margin is measured below the image. Measured against the
live old site: it has no overflow (-6px) and a steady 42px gap; this was
overflowing by 39-61px. Both sites now sit at a consistent 60px.

That also makes the theme's trailing <br /> and clear div redundant --
they existed only to escape the float -- so the listing markup drops
them and the wrapping Fragment with them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 20:03:24 -04:00
co-authored by Claude Opus 5
parent c51a958cbf
commit 3c28d98c32
3 changed files with 5 additions and 9 deletions
-4
View File
@@ -8,7 +8,6 @@ const posts = (await getCollection('posts')).sort((a, b) => b.data.date.getTime(
<BaseLayout title="Blog | VICIdial.com">
{posts.map((post) => (
<Fragment key={post.id}>
<div class="post hentry" id={`post-${post.id}`}>
<a href={`/blog/${post.data.slug}`}>
<h2 class="post-title">{post.data.title}</h2>
@@ -16,8 +15,5 @@ const posts = (await getCollection('posts')).sort((a, b) => b.data.date.getTime(
</a>
<p>{post.data.excerpt}<a href={`/blog/${post.data.slug}`} class="read-more">Read the Rest...</a></p>
</div>
<br />
<div class="clear"> </div>
</Fragment>
))}
</BaseLayout>
-4
View File
@@ -16,7 +16,6 @@ const posts = (await getCollection('posts')).sort((a, b) => b.data.date.getTime(
<FeaturedBox />
{posts.map((post) => (
<Fragment key={post.id}>
<div class="post hentry" id={`post-${post.id}`}>
<a href={`/blog/${post.data.slug}`}>
<h2 class="post-title">{post.data.title}</h2>
@@ -27,9 +26,6 @@ const posts = (await getCollection('posts')).sort((a, b) => b.data.date.getTime(
</a>
<p>{post.data.excerpt}<a href={`/blog/${post.data.slug}`} class="read-more">Read the Rest...</a></p>
</div>
<br />
<div class="clear"> </div>
</Fragment>
))}
<div class="content-ver-sep"> </div>
+5 -1
View File
@@ -1144,8 +1144,12 @@ h3.arc-src {
.post,
.hentry,
.no-results {
/* flow-root contains the floated thumbnail. Without it the image overflows the item
and eats the margin below, so the gap collapses whenever the excerpt is shorter
than the image -- which it is at full width, unlike the theme's 650px column. */
display: flow-root;
/* Theme default was 20px; widened to give listing items clearer separation. */
margin-bottom: 50px;
margin-bottom: 60px;
}