Code blocks can be really long… For example when it contains a full rebuild log or other long text… It’s not too easy to scroll through on code block section in a post or scroll to the end of code block especially on smaller screen size. The easiest way is scroll a bigger before code block or find the 10px on sides.
Would be a good option to add an overlay to the huge code blocks which prevent to scroll until a user interaction. When user click it the overlay disappears and the scroll activates.
This is the first version, I meant something like this, but I am stucked with define the element height. The overlay would only show on scrollable codeblock. I tried it with element.scrollHeight > n etc… but it seems it always gets the height is 0. I have to find another way to define if the code block is scrollable…