Fix #5594: Align pre element with baseline grid using nudge system#5689
Fix #5594: Align pre element with baseline grid using nudge system#5689Nayab-Gauhar wants to merge 1 commit intocanonical:mainfrom
Conversation
…system - Updated padding to use $spv-nudge for top padding and compensate at bottom - Adjusted margin-bottom to account for nudge value - This ensures the pre element aligns properly with the baseline grid
|
Nayab-Gauhar is not a collaborator of the repo |
There was a problem hiding this comment.
Pull Request Overview
This PR adjusts the spacing for code blocks by introducing nudge values to fine-tune the margins and padding. The changes modify the visual spacing around code elements to achieve more precise vertical alignment.
- Reduced bottom margin by subtracting a nudge value
- Modified padding to use asymmetric vertical values with nudge adjustments
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Deployed demo.
Here's an example pen that can has content immediately following a pre block that might be helpful in QA'ing this.
It appears the content after the pre is sitting a bit lower than the baseline. I'm not sure if that's owing to the padding (nudge) or margin bottom (spacing after) being off.
@lyubomir-popov or @dgtlntv , could you have a look and let us know what the desired spacing should be?
|
@jmuzina It looks like thats due to the margin of the |
Summary
This PR fixes issue #5594 by aligning the
<pre>element with the baseline grid using the nudge system.Changes
paddingto use$spv-nudgefor top padding and($spv--small - $spv-nudge)for bottom paddingmargin-bottomto$spv--x-large - $spv-nudgeto compensate for the nudge valueWhat this fixes
The
<pre>element was not properly aligned with the baseline grid because it wasn't using the nudge system that other text elements use. This fix applies the standard nudge pattern:QA
<pre>elements in the documentationChecklist
Bug 🐛label