Skip to content

Commit b946c36

Browse files
committed
docs: Add visual indication on external links in code reference
1 parent 0b48bdd commit b946c36

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/css/mkdocstrings.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,20 @@ div.doc-contents:not(.first) {
44
border-left: 4px solid rgba(230, 230, 230);
55
margin-bottom: 80px;
66
}
7+
8+
/* Mark external links as such */
9+
a.autorefs-external:hover::after {
10+
/* https://primer.style/octicons/arrow-up-right-24 */
11+
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="rgb(0, 0, 0)" d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
12+
content: ' ';
13+
14+
display: inline-block;
15+
position: absolute;
16+
margin-left: 0.2em;
17+
margin-top: 0.4em;
18+
19+
height: 1em;
20+
width: 1em;
21+
border-radius: 100%;
22+
background-color: var(--md-accent-fg-color);
23+
}

0 commit comments

Comments
 (0)