Feature/highlightjs (#242)

* Add highlighting for code blocks

Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
mrdrogdrog 2020-06-22 22:39:14 +02:00 committed by GitHub
parent b3899cd1a5
commit e03da3bd76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 170 additions and 2 deletions

View file

@ -0,0 +1,33 @@
.markdown-body pre code {
&.hljs {
display: flex;
flex-direction: row;
}
.linenumbers {
text-align: right;
position: relative;
cursor: default;
z-index: 4;
padding: 0 8px 0 0;
min-width: 20px;
box-sizing: content-box;
color: #afafaf;
border-right: 3px solid #6ce26c;
display: flex;
flex-direction: column;
float: left;
overflow: hidden;
user-select: none;
& > span:before {
content: attr(data-line-number);
}
}
.code {
float: left;
margin: 0 0 0 16px;
}
}