fix: toggle full width#164
Open
roniaxe wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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