Repository navigation
fix(template): keep sidenotes clear of a following wide figure - #42
Merged
Zach Dunn (zachdunn) merged 1 commit intoOct 16, 2026
Conversation
…e element follows A sidenote sits in the right margin from its paragraph's last line down, so before a wide figure it ran into the figure's margin, where anatomy figures now draw their margin notes. When the paragraph is followed by a .wide element, anchor the note's bottom to the paragraph's bottom instead. Copied into the example posts and the components page.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one): 2
🚫 Excluded labels (none allowed): 1
Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
1 file · View all on uploads.sh → Maintained by uploads.sh · add media: |
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.

Stacked on #41.
At wide viewports a
.sidenotesits in the right margin, running down from its paragraph's last line. When a wide figure comes right after that paragraph, the note ran into the figure's side margin. #41 puts the anatomy figures' margin notes there, so the overlap now shows (Fig. 2 of the walkthrough post: the "Include mini-map" note over the figure's right-hand notes).The fix, in the template's wide-viewport media query:
When a
.wideelement follows the paragraph, the note's bottom is anchored to the paragraph's bottom, so it ends level with the last line instead of starting there. Sidenotes before anything else behave as before. The rule holds in both styles and doesn't change phone widths, where the note stays a block under its paragraph.The CSS is copied into the four example posts (on top of #41's versions) and
assets/components.html.The
â†before the note in the screenshot comes from serving the post fragment locally without a charset. The published page renders←.Checked
npm test: 121 of 121 pass.Known limit: a very short paragraph with a long sidenote before a wide figure pushes the note up past the paragraph's top. None of the examples has this.