mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-01 23:58:58 -04:00
Feature/highlightjs (#242)
* Add highlighting for code blocks Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
parent
b3899cd1a5
commit
e03da3bd76
10 changed files with 170 additions and 2 deletions
33
src/components/common/highlighted-code/highlighted-code.scss
Normal file
33
src/components/common/highlighted-code/highlighted-code.scss
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue