Skip to content

Commit 2fade66

Browse files
brunoborgesCopilot
andcommitted
Add visual styling for section headers on detail pages
Add .section-label CSS rule with bold text, accent-colored bottom border, and consistent spacing. Convert 'How it works' and 'Related patterns' from unstyled h2 to .section-label for consistency with 'Code Comparison', 'Why the modern way wins', and 'JDK Support' headers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 688dea3 commit 2fade66

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

site/styles.css

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,18 @@ nav {
736736
color: var(--accent);
737737
}
738738

739+
/* ---------- Section Labels (Detail Page) ---------- */
740+
.section-label {
741+
font-size: 1.1rem;
742+
font-weight: 700;
743+
letter-spacing: -0.01em;
744+
color: var(--text);
745+
margin-bottom: 16px;
746+
padding-bottom: 8px;
747+
border-bottom: 2px solid var(--accent);
748+
display: inline-block;
749+
}
750+
739751
/* ---------- Code Comparison (Detail Page) ---------- */
740752
.compare-section {
741753
margin: 40px 0;
@@ -1016,12 +1028,6 @@ nav {
10161028
margin: 40px 0;
10171029
}
10181030

1019-
.explanation h2 {
1020-
font-size: 1.3rem;
1021-
font-weight: 700;
1022-
margin-bottom: 12px;
1023-
}
1024-
10251031
.explanation p {
10261032
font-size: 0.92rem;
10271033
color: var(--text-muted);

templates/slug-template.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ <h1>{{title}}</h1>
173173
</section>
174174

175175
<section class="explanation">
176-
<h2>How it works</h2>
176+
<div class="section-label">How it works</div>
177177
<p>{{explanation}}</p>
178178
</section>
179179

180180
<section class="related">
181-
<h2>Related patterns</h2>
181+
<div class="section-label">Related patterns</div>
182182
<div class="related-grid">
183183
{{relatedCards}}
184184
</div>

0 commit comments

Comments
 (0)