Skip to content

fix: toggle full width#164

Open
roniaxe wants to merge 1 commit into
alecdotdev:masterfrom
roniaxe:fix_toggle_full_width_not_working
Open

fix: toggle full width#164
roniaxe wants to merge 1 commit into
alecdotdev:masterfrom
roniaxe:fix_toggle_full_width_not_working

Conversation

@roniaxe
Copy link
Copy Markdown

@roniaxe roniaxe commented May 24, 2026

In commit a5fda8e ("Fix markdown preview wrapping and open-with registration"), the default .markdown-body rule was rewritten to fix horizontal-overflow issues (wide tables, long code lines, unbounded 50% - 390px side padding on ultrawides). Tables were switched to width: 100%, code to pre-wrap, and the default container picked up max-width: 100% plus a flat clamp(24px, 5vw, 50px) padding.

The collateral damage: .markdown-body.full-width was updated to the same padding: 50px clamp(24px, 5vw, 50px) and already had max-width: 100%. The two rules became byte-for-byte equivalent, so toggling the .full-width class produced zero visual change - the toolbar button flipped its active state, but the article was already rendering full-width in both states.

The fix

Re-introduce a real difference between the two rules without bringing back the unbounded-padding behavior David eliminated:

Default .markdown-body: max-width: 880px + margin: 0 auto → centered ~780px reading column (matches v2.6.4's visible width).
.markdown-body.full-width: max-width: 100% + margin: 0 → fills the pane.
Wrapping rules from a5fda8e are untouched and still apply within whichever container width is active.

Closes also #141

@roniaxe roniaxe changed the title fix: adjust markdown body styles for full-width toggle functionality fix: toggle full width May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant