Skip to content

Commit aafecee

Browse files
committed
style(site): annotation headings in part-page file-blocks match TOC title scale
The h2/h3 inside .annotation-card / .annotation-md (the prose column alongside each code chunk on part pages) was falling through to the global h1/h2 rules (22px bold / 26px bold). A meander annotation that happens to include an h2 like "Known Limitation: instanceof checks…" rendered as a hero headline inside what's supposed to be quiet margin prose. Normalize h1-h4 inside both .annotation-card and .annotation-md to 18px / 600 — same scale as .doc-body headings and .wt-contents-title. Hierarchy comes from margin (16 / 24 / 20 / 16) alone; size stays flat so the rhythm matches the rest of the site.
1 parent b02a3c6 commit aafecee

1 file changed

Lines changed: 34 additions & 3 deletions

File tree

overrides.css

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,14 +1623,45 @@ body.col-resizing * {
16231623
padding: 0;
16241624
}
16251625

1626-
.annotation-card h3 {
1627-
margin: 0 0 10px;
1626+
/* Every annotation heading (h1-h4) sits at the same 18px / 600
1627+
* scale as doc-page titles + the home TOC. Hierarchy comes from
1628+
* margin alone; size + weight stay flat so the prose rhythm
1629+
* matches what readers see everywhere else on the site. */
1630+
.annotation-card h1,
1631+
.annotation-card h2,
1632+
.annotation-card h3,
1633+
.annotation-card h4,
1634+
.annotation-md h1,
1635+
.annotation-md h2,
1636+
.annotation-md h3,
1637+
.annotation-md h4 {
16281638
font-size: 18px;
1629-
font-weight: 700;
1639+
font-weight: 600;
16301640
letter-spacing: -0.01em;
1641+
line-height: 1.3;
16311642
color: var(--ink);
16321643
}
16331644

1645+
.annotation-card h1,
1646+
.annotation-md h1 {
1647+
margin: 0 0 16px;
1648+
}
1649+
1650+
.annotation-card h2,
1651+
.annotation-md h2 {
1652+
margin: 24px 0 12px;
1653+
}
1654+
1655+
.annotation-card h3,
1656+
.annotation-md h3 {
1657+
margin: 20px 0 10px;
1658+
}
1659+
1660+
.annotation-card h4,
1661+
.annotation-md h4 {
1662+
margin: 16px 0 8px;
1663+
}
1664+
16341665
.annotation-md {
16351666
color: var(--body);
16361667
font-size: 15px;

0 commit comments

Comments
 (0)