You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support .code-overflow-wrap class on code blocks #228
By default, code cells in blog posts get a horizontal-scroll treatment when their content exceeds the column width. For short single-line entries (e.g. a one-line shell command, a YAML key) this produces an awkward narrow scrollable strip when the content would actually fit if simply wrapped.
Quarto's HTML format supports the code-overflow-wrap option (and a corresponding .code-overflow-wrap class) that flips a code block to white-space: pre-wrap so it wraps instead of scrolling. We don't currently honour that class on this site.
Proposal
Add a CSS rule so that any code block (or its container) carrying the code-overflow-wrap class wraps:
That lets authors opt in per block via Quarto's existing syntax ({.code-overflow-wrap} on a fence, or code-overflow: wrap in the cell options) without changing the default behaviour for code that's genuinely meant to scroll (e.g. wide shell output).
Posts that would benefit
These ported Quarto posts have at least one code cell where wrap would read better than scroll:
Activity