Skip to content

Commit 5acb664

Browse files
committed
fix: keep link icon to heading anchors
1 parent 47dc81b commit 5acb664

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

app/components/Readme.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,17 @@ function handleClick(event: MouseEvent) {
150150
@apply inline i-lucide:external-link rtl-flip ms-1 opacity-50;
151151
}
152152
153+
.readme :deep(:is(h1, h2, h3, h4, h5, h6) a[href^='#']::after) {
154+
/* I don't know what kind of sorcery this is, but it ensures this icon can't wrap to a new line on its own. */
155+
content: '__';
156+
@apply inline i-lucide:link rtl-flip ms-1 opacity-0;
157+
font-size: 0.75em;
158+
}
159+
160+
.readme :deep(:is(h1, h2, h3, h4, h5, h6) a[href^='#']:hover::after) {
161+
@apply opacity-100;
162+
}
163+
153164
.readme :deep(code) {
154165
@apply font-mono;
155166
font-size: 0.875em;

0 commit comments

Comments
 (0)