I feel like the only propper fix can come from the devs themselves, support for codeblock related things is pretty bad atm.
Possibly with the least modification:
.markdown-rendered pre {
position: initial;
overflow-x: auto;
}
.markdown-rendered div {
position: relative;
}
.markdown-rendered code {
width: max-content;
}
Note: only works on preview mode
I could not get it to work with editing mode. There is not enough CSS element hierarchy available to have a scrollable parent with non-wrapped child.
2 Likes