Fix wrongly wrapping code blocks, breaking line numbers (#7507)
This commit is contained in:
parent
81257933ef
commit
f8871969fd
1 changed files with 11 additions and 6 deletions
|
@ -483,9 +483,18 @@ $left-gutter: 64px;
|
||||||
background-color: $codeblock-background-color;
|
background-color: $codeblock-background-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre code > * {
|
// this selector wrongly applies to code blocks too but we will unset it in the next one
|
||||||
|
code {
|
||||||
|
white-space: pre-wrap; // don't collapse spaces in inline code blocks
|
||||||
|
}
|
||||||
|
|
||||||
|
pre code {
|
||||||
|
white-space: pre; // we want code blocks to be scrollable and not wrap
|
||||||
|
|
||||||
|
> * {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
// have to use overlay rather than auto otherwise Linux and Windows
|
// have to use overlay rather than auto otherwise Linux and Windows
|
||||||
|
@ -498,10 +507,6 @@ $left-gutter: 64px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
|
||||||
white-space: pre-wrap; // don't collapse spaces in inline code blocks
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_EventTile_lineNumbers {
|
.mx_EventTile_lineNumbers {
|
||||||
|
|
Loading…
Reference in a new issue