Skip to content

Commit cb1407e

Browse files
committed
Don't add square brackets to source links, leave it up to styling
1 parent 8d7fccb commit cb1407e

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

docs/styles.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Recommended styles
2+
3+
```css
4+
/* Indentation of sub-items */
5+
div.doc-contents:not(.first) {
6+
padding-left: 15px;
7+
border-left: 4px solid rgba(230, 230, 230);
8+
}
9+
10+
/* Don't capitalize names */
11+
h5.doc-heading {
12+
text-transform: none !important;
13+
}
14+
15+
/* [View source] links */
16+
a.doc-source-link::before {
17+
content: "[";
18+
color: var(--md-typeset-color);
19+
}
20+
a.doc-source-link::after {
21+
content: "]";
22+
color: var(--md-typeset-color);
23+
}
24+
```

mkdocstrings/templates/crystal/material/method.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
</div>
1818

1919
{% if config.show_source_links and obj.location and obj.location.url %}
20-
[<a href="{{ obj.location.url }}">View source</a>]
20+
<a class="doc-source-link" href="{{ obj.location.url }}">View source</a>
2121
{% endif %}
2222
</div>

0 commit comments

Comments
 (0)