Skip to content

Commit eb23829

Browse files
🏗️🔧:stop the shared styles bending the front page
Three things the deploy preview showed. _custom.scss makes every h1 a flex row and draws a rule after it. That is right for a page heading and wrong for a sentence: the masthead title became a row of siblings with a taupe line stuck on the end. The footer carries `margin-top: -60px !important`, which the rest of the site absorbs in the bottom padding on `main > .container`. This page has no such container, so the footer sat over its last section. And `main` here missed the `flex-shrink-0` that page.liquid gives it, which the body's flex column wants. Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is> Assisted-by: Claude-Code:claude-opus-5
1 parent b6b9b9b commit eb23829

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

_assets/styles/_home.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@
2626
}
2727

2828
// Scoped so the home page's own resets cannot reach the rest of the site.
29+
// The footer carries `margin-top: -60px !important`, which the rest of the
30+
// site absorbs with the bottom padding on `main > .container`. This page has
31+
// no such container, so it needs the room itself or the footer sits on top of
32+
// the last section.
2933
.home main {
3034
padding-top: var(--nav-h);
35+
padding-bottom: 104px;
3136
}
3237

3338
.home h1,
@@ -84,7 +89,11 @@
8489
margin-bottom: 1.25rem;
8590
}
8691

92+
// _custom.scss makes every h1 a flex row and draws a rule after it, which is
93+
// right for a page heading and wrong for a sentence. This one is a sentence,
94+
// and as a flex container its words would lay out as siblings in a row.
8795
.masthead-title {
96+
display: block;
8897
max-width: 22ch;
8998
font-size: clamp(1.75rem, 3.6vw, 3rem);
9099
font-weight: 700;
@@ -93,6 +102,10 @@
93102
text-wrap: balance;
94103
}
95104

105+
.masthead-title::after {
106+
content: none;
107+
}
108+
96109
/* The four verbs are the project's own statement of what it is for. */
97110
.masthead-title em {
98111
font-style: normal;

collections/_pages/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
eleventyImport:
88
collections: ['post']
99
---
10-
<main>
10+
<main class="flex-shrink-0">
1111
<!-- ================= masthead: what it is + how to take part ======== -->
1212
<section class="masthead">
1313
<div class="wrap masthead-grid">

0 commit comments

Comments
 (0)