Skip to content

Commit 4678e22

Browse files
committed
Typography: Wrap headers in .content class
Fix h1s on list pages not lining up with images
1 parent 0290682 commit 4678e22

File tree

2 files changed

+60
-58
lines changed

2 files changed

+60
-58
lines changed

assets/css/v2/style.css

Lines changed: 59 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,7 @@ main {
962962

963963
.list-page {
964964
--flow-gap: 0.5rem;
965+
--margin-content-h1: 0;
965966

966967
h2 {
967968
font-size: 1.5rem;
@@ -1390,80 +1391,81 @@ a:hover {
13901391

13911392
/* MARK: Typography
13921393
*/
1394+
.content {
1395+
h1 {
1396+
margin: var(--margin-content-h1);
1397+
font-size: var(--font-step-3);
1398+
}
13931399

1394-
h1 {
1395-
margin: var(--margin-content-h1);
1396-
font-size: var(--font-step-3);
1397-
}
1398-
1399-
h2 {
1400-
margin: var(--margin-content-h2);
1401-
font-size: var(--font-step-2);
1402-
}
1400+
h2 {
1401+
margin: var(--margin-content-h2);
1402+
font-size: var(--font-step-2);
1403+
}
14031404

1404-
h3 {
1405-
margin: var(--margin-content-h3);
1406-
font-size: var(--font-step-1);
1407-
}
1405+
h3 {
1406+
margin: var(--margin-content-h3);
1407+
font-size: var(--font-step-1);
1408+
}
14081409

1409-
h4 {
1410-
margin: var(--margin-content-h4);
1411-
}
1410+
h4 {
1411+
margin: var(--margin-content-h4);
1412+
}
14121413

1413-
p {
1414-
font-size: var(--font-step-0);
1415-
}
1414+
p {
1415+
font-size: var(--font-step-0);
1416+
}
14161417

1417-
h2:target,
1418-
h3:target,
1419-
h4:target,
1420-
h5:target,
1421-
h6:target {
1422-
color: oklch(var(--color-brand));
1418+
h2:target,
1419+
h3:target,
1420+
h4:target,
1421+
h5:target,
1422+
h6:target {
1423+
color: oklch(var(--color-brand));
14231424

1424-
.headerlink::before {
1425-
display: block !important;
1425+
.headerlink::before {
1426+
display: block !important;
1427+
}
14261428
}
1427-
}
14281429

1429-
h2:has(a),
1430-
h3:has(a),
1431-
h4:has(a),
1432-
h5:has(a),
1433-
h6:has(a) {
1434-
width: calc(100% + 1rem);
1435-
margin-inline-start: -1rem;
1436-
padding-inline-start: 1rem;
1437-
position: relative;
1438-
}
1430+
h2:has(a),
1431+
h3:has(a),
1432+
h4:has(a),
1433+
h5:has(a),
1434+
h6:has(a) {
1435+
width: calc(100% + 1rem);
1436+
margin-inline-start: -1rem;
1437+
padding-inline-start: 1rem;
1438+
position: relative;
1439+
}
14391440

1440-
h2:has(a):hover {
1441-
.headerlink::before {
1442-
display: block;
1441+
h2:has(a):hover {
1442+
.headerlink::before {
1443+
display: block;
1444+
}
14431445
}
1444-
}
14451446

1446-
h3:has(a):hover {
1447-
.headerlink::before {
1448-
display: block;
1447+
h3:has(a):hover {
1448+
.headerlink::before {
1449+
display: block;
1450+
}
14491451
}
1450-
}
14511452

1452-
h4:has(a):hover {
1453-
.headerlink::before {
1454-
display: block;
1453+
h4:has(a):hover {
1454+
.headerlink::before {
1455+
display: block;
1456+
}
14551457
}
1456-
}
14571458

1458-
h5:has(a):hover {
1459-
.headerlink::before {
1460-
display: block;
1459+
h5:has(a):hover {
1460+
.headerlink::before {
1461+
display: block;
1462+
}
14611463
}
1462-
}
14631464

1464-
h6:has(a):hover {
1465-
.headerlink::before {
1466-
display: block;
1465+
h6:has(a):hover {
1466+
.headerlink::before {
1467+
display: block;
1468+
}
14671469
}
14681470
}
14691471

layouts/_default/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ define "main" }}
22

3-
<main class="content " role="main">
3+
<main class="content" role="main">
44
<div data-cms-edit="content" class="text-content list-page">
55
<div class="breadcrumb-layout">
66
{{ if not .IsHome }}

0 commit comments

Comments
 (0)