Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
70 lines (66 loc) · 2.79 KB
/
Copy pathstyle.css
File metadata and controls
70 lines (66 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* Based on:
* https://github.com/mkdocstrings/mkdocstrings/blob/master/docs/css/style.css
*/
/* Increase logo size */
.md-header__button.md-logo {
padding-bottom: 0.2rem;
padding-right: 0;
}
.md-header__button.md-logo img {
height: 1.5rem;
}
/* Mark external links as such (also in nav) */
a.external:hover::after, a.md-nav__link[href^="https:"]:hover::after {
/* https://primer.style/octicons/link-external-16 */
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="rgb(233, 235, 252)" d="M10.604 1h4.146a.25.25 0 01.25.25v4.146a.25.25 0 01-.427.177L13.03 4.03 9.28 7.78a.75.75 0 01-1.06-1.06l3.75-3.75-1.543-1.543A.25.25 0 0110.604 1zM3.75 2A1.75 1.75 0 002 3.75v8.5c0 .966.784 1.75 1.75 1.75h8.5A1.75 1.75 0 0014 12.25v-3.5a.75.75 0 00-1.5 0v3.5a.25.25 0 01-.25.25h-8.5a.25.25 0 01-.25-.25v-8.5a.25.25 0 01.25-.25h3.5a.75.75 0 000-1.5h-3.5z"></path></svg>');
height: 0.8em;
width: 0.8em;
margin-left: 0.2em;
content: ' ';
display: inline-block;
}
/* More space at the bottom of the page */
.md-main__inner {
margin-bottom: 1.5rem;
}
/* Code annotations with numbers.
*
* Normally annotations are shown with a (+) button that expands the
* annotation. To be able to explain code step by step, it is good to have
* annotations with numbers, to be able to follow the notes in a particular
* order.
*
* To do this, we need some custom CSS rules. Before this customization was
* officially supported and documented, but now they are not officially
* supported anymore, so it could eventually break (it already did once).
*
* If that happens we either need to look into how to fix the CSS ourselves or
* remove the feature. To do the customization, this is what we should be able
* to count on:
*
* "you can be sure that the data-md-annotation-id attribute will always be
* present in the source, which means you can always number them in any way you
* like."
*
* Code annotation are described here:
* https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#code-annotations
*
* Here are the original docs on how to enable numbered annotations:
* https://web.archive.org/web/20230724161216/https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#annotations-with-numbers
*
* This is the PR fixing the numbered annotations when they broke:
* https://github.com/frequenz-floss/frequenz-sdk-python/pull/684
*
* And this is the reported regression when it was decided to drop support for
* numbered annotations officially:
* https://github.com/squidfunk/mkdocs-material/issues/6042
*/
.md-typeset .md-annotation__index > ::before {
content: attr(data-md-annotation-id);
}
.md-typeset :focus-within > .md-annotation__index > ::before {
transform: none;
}
.md-typeset .md-annotation__index {
width: 4ch;
}