Skip to content

Commit 4bd4005

Browse files
authored
Headings: Align header anchors to relative top (#362)
1 parent 5fd74b7 commit 4bd4005

File tree

1 file changed

+9
-32
lines changed

1 file changed

+9
-32
lines changed

assets/css/v2/style.css

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,11 +1500,18 @@ a:hover {
15001500
h3:target,
15011501
h4:target,
15021502
h5:target,
1503-
h6:target {
1503+
h6:target,
1504+
h2:has(a):hover,
1505+
h3:has(a):hover,
1506+
h4:has(a):hover,
1507+
h5:has(a):hover,
1508+
h6:has(a):hover {
15041509
color: oklch(var(--color-brand));
15051510

15061511
.headerlink::before {
1507-
display: block !important;
1512+
display: flex;
1513+
align-items: flex-start;
1514+
height: 100%
15081515
}
15091516
}
15101517

@@ -1519,36 +1526,6 @@ a:hover {
15191526
position: relative;
15201527
}
15211528

1522-
h2:has(a):hover {
1523-
.headerlink::before {
1524-
display: block;
1525-
}
1526-
}
1527-
1528-
h3:has(a):hover {
1529-
.headerlink::before {
1530-
display: block;
1531-
}
1532-
}
1533-
1534-
h4:has(a):hover {
1535-
.headerlink::before {
1536-
display: block;
1537-
}
1538-
}
1539-
1540-
h5:has(a):hover {
1541-
.headerlink::before {
1542-
display: block;
1543-
}
1544-
}
1545-
1546-
h6:has(a):hover {
1547-
.headerlink::before {
1548-
display: block;
1549-
}
1550-
}
1551-
15521529
.content__reading-time {
15531530
font-size: var(--font-step--1);
15541531
color: oklch(var(--color-footer-text));

0 commit comments

Comments
 (0)