mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
Reformat highlighted-code.scss and fix display bug in cheatsheet
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
cd79aeddac
commit
7ca23d8ade
1 changed files with 42 additions and 40 deletions
|
@ -11,53 +11,55 @@
|
||||||
@import '../../../../../../node_modules/highlight.js/styles/github-dark';
|
@import '../../../../../../node_modules/highlight.js/styles/github-dark';
|
||||||
}
|
}
|
||||||
|
|
||||||
pre code.hljs {
|
pre, & {
|
||||||
overflow-x: auto;
|
code.hljs {
|
||||||
background-color: rgba(27, 31, 35, .05);
|
overflow-x: auto;
|
||||||
|
background-color: rgba(27, 31, 35, .05);
|
||||||
|
|
||||||
body.dark & {
|
body.dark & {
|
||||||
background-color: rgb(27, 31, 35);
|
background-color: rgb(27, 31, 35);
|
||||||
}
|
|
||||||
|
|
||||||
body.dark &, & {
|
|
||||||
padding: 16px;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: auto minmax(0, 1fr);
|
|
||||||
|
|
||||||
.codeline {
|
|
||||||
grid-column: 2;
|
|
||||||
white-space: pre;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.linenumber {
|
body.dark &, & {
|
||||||
grid-column: 1;
|
padding: 16px;
|
||||||
position: relative;
|
display: grid;
|
||||||
cursor: default;
|
grid-template-columns: auto minmax(0, 1fr);
|
||||||
z-index: 4;
|
|
||||||
padding: 0 8px 0 0;
|
|
||||||
min-width: 20px;
|
|
||||||
box-sizing: content-box;
|
|
||||||
color: #afafaf;
|
|
||||||
border-right: 3px solid #6ce26c;
|
|
||||||
flex-direction: column;
|
|
||||||
overflow: hidden;
|
|
||||||
user-select: none;
|
|
||||||
align-items: flex-end;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.showGutter {
|
.codeline {
|
||||||
.linenumber {
|
grid-column: 2;
|
||||||
display: flex;
|
white-space: pre;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
&.showGutter .codeline {
|
.linenumber {
|
||||||
margin: 0 0 0 16px;
|
grid-column: 1;
|
||||||
}
|
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;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
user-select: none;
|
||||||
|
align-items: flex-end;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
&.wrapLines .codeline {
|
&.showGutter {
|
||||||
white-space: pre-wrap;
|
.linenumber {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.showGutter .codeline {
|
||||||
|
margin: 0 0 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.wrapLines .codeline {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue