Skip to content

Commit 7adc4b0

Browse files
committed
feat: Add hashtag to headings
1 parent 666ae45 commit 7adc4b0

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

assets/css/v2/style.css

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,56 @@ h2 {
10071007
margin: 1rem 0 .75rem 0;
10081008
}
10091009

1010+
h2:has(a),
1011+
h3:has(a),
1012+
h4:has(a),
1013+
h5:has(a),
1014+
h6:has(a) {
1015+
width: calc(100% + 1rem);
1016+
margin-left: -1rem;
1017+
padding-left: 1rem;
1018+
position: relative;
1019+
}
1020+
1021+
h2:has(a):hover {
1022+
.headerlink::before {
1023+
display: block;
1024+
}
1025+
}
1026+
1027+
h3:has(a):hover {
1028+
.headerlink::before {
1029+
display: block;
1030+
}
1031+
}
1032+
1033+
h4:has(a):hover {
1034+
.headerlink::before {
1035+
display: block;
1036+
}
1037+
}
1038+
1039+
h5:has(a):hover {
1040+
.headerlink::before {
1041+
display: block;
1042+
}
1043+
}
1044+
1045+
h6:has(a):hover {
1046+
.headerlink::before {
1047+
display: block;
1048+
}
1049+
}
1050+
1051+
.headerlink::before {
1052+
position: absolute;
1053+
content: "#";
1054+
margin-left: -1.5rem;
1055+
opacity: 20%;
1056+
display: none;
1057+
top: 0;
1058+
}
1059+
10101060
/* MARK: Tables
10111061
*/
10121062
table {

0 commit comments

Comments
 (0)