CSS / Plugin for scrollbar for code blocks?

Hello

it would be great if there could be support for horizontal scrollbars for code blocks.

I just don’t know if this is so easily possible via CSS only because of the line structure.

Also the tabs are visible.

I don’t know if the job is done by just adding a div container around the lines and adding

overflow-y: scroll;

to it.

Is it possible in general to do this and keeping the intended line and indentation awareness. How deep does this awareness go? The lines and indentation html code is probably created when parsing the double triple backticks. So adding a horizontal scrollbar would mean to mess with the AST probably.

Any idea how javascript could rewrite the DOM to incorporate a scrollbar into the lines?

Yours sincerely,
powerSpotz

Might want to post a request here: Issues · stargrey/obsidian-better-codeblock · GitHub

1 Like