Skip to content

Commit 51a3833

Browse files
committed
Fix hash on headings not being visible
1 parent c391cb2 commit 51a3833

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/css/custom.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,16 @@ h6 {
370370
font-size: 1rem;
371371
}
372372

373+
/*
374+
* Docusaurus renders the heading link's "#" with .hash-link::before.
375+
* Its cascade layer polyfill places a specificity :not() after ::before,
376+
* producing an invalid selector that browsers ignore.
377+
* So we specify our own style with valid selector to make the hash visible.
378+
*/
379+
.hash-link::before {
380+
content: '#';
381+
}
382+
373383
header {
374384
font-family: var(--ifm-heading-font-family);
375385
}

0 commit comments

Comments
 (0)