Horizontal Scroll for Codeblocks not appearing (even in reading mode)

Steps to reproduce

Pasting a long line of code/text into a code block, and then trying to view it in reading mode.

Expected result

I expect in reading mode at least to display a horizontal scroll bar and eliminate word wrap for the code block.

Actual result

Instead, the Reading Mode displays the same as the live preview mode with word wrap.

Environment

  • Operating system: Windows 11
  • Debug info:
    SYSTEM INFO:
    Obsidian version: v1.1.9
    Installer version: v1.0.0
    Operating system: Windows 10 Enterprise 10.0.22000
    Login status: logged in
    Catalyst license: none
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: light
    Community theme: none
    Snippets enabled: 0
    Restricted mode: on

RECOMMENDATIONS:
none


Additional information

image

Did you search the forum?

There’s a feature request, with possible workarounds in the comments:

Far down in the comments is an explanation of why it is the way it is:

Another thread has a CSS snippet that might still work (maybe the same as something in the other thread; I didn’t check):

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.