Skip to content

Commit d3be8e2

Browse files
committed
Make code annotations numbered
This allows to have a read order for annotations. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 75f0777 commit d3be8e2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/css/style.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,13 @@ a.external:hover::after, a.md-nav__link[href^="https:"]:hover::after {
2626
.md-main__inner {
2727
margin-bottom: 1.5rem;
2828
}
29+
30+
/* Code annotations with numbers
31+
* https://squidfunk.github.io/mkdocs-material/reference/code-blocks/#annotations-with-numbers
32+
*/
33+
.md-typeset .md-annotation__index > ::before {
34+
content: attr(data-md-annotation-id);
35+
}
36+
.md-typeset :focus-within > .md-annotation__index > ::before {
37+
transform: none;
38+
}

0 commit comments

Comments
 (0)