Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughAdded a CSS rule targeting Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
Reduces the vertical spacing above Markdown H3 headings to improve readability and reduce excessive whitespace in rendered documentation content.
Changes:
- Adds a custom CSS rule targeting
.markdown h3to decrease top margin.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .markdown h3 { | ||
| margin-top: calc(var(--ifm-heading-margin-top) - 50px); | ||
| } |
There was a problem hiding this comment.
The 50px adjustment is an unexplained magic number. To make this easier to tune/maintain (and to keep spacing resilient if Infima’s default heading margins change), consider extracting this into a named CSS custom property (e.g., --ofga-markdown-h3-margin-top-adjustment) or adding a short comment explaining how the value was chosen.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/css/custom.css (1)
44-46: Consider using a CSS variable for the reduction value.The hardcoded
50pxvalue reduces maintainability. If you need to adjust this spacing later or want to make it theme-dependent, defining it as a CSS variable would be more flexible.♻️ Proposed refactor using a CSS variable
:root { --ifm-color-primary: `#2e8555`; --ifm-color-primary-dark: `#29784c`; --ifm-color-primary-darker: `#277148`; --ifm-color-primary-darkest: `#205d3b`; --ifm-color-primary-light: `#33925d`; --ifm-color-primary-lighter: `#359962`; --ifm-color-primary-lightest: `#3cad6e`; --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); --ifm-pre-padding: 2rem; --ifm-navbar-height: 6.5rem; + --custom-h3-margin-reduction: 50px; }Then update the rule:
.markdown h3 { - margin-top: calc(var(--ifm-heading-margin-top) - 50px); + margin-top: calc(var(--ifm-heading-margin-top) - var(--custom-h3-margin-reduction)); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/css/custom.css` around lines 44 - 46, Replace the hardcoded "50px" in the ".markdown h3" rule with a new CSS variable (e.g. --markdown-heading-offset) so the reduction is configurable; define that variable at a global scope like :root (or the theme/root selector you use) with a default value (e.g. 50px) and update the rule to use calc(var(--ifm-heading-margin-top) - var(--markdown-heading-offset)) so future tweaks or theme overrides can adjust spacing without changing the selector itself.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/css/custom.css`:
- Around line 44-46: The .markdown h3 rule currently sets margin-top using
calc(var(--ifm-heading-margin-top) - 50px) which can go negative; update the
.markdown h3 selector to clamp the computed value using max() so the margin-top
is the greater of 0px and the current calc expression (i.e., use max(0px,
calc(var(--ifm-heading-margin-top) - 50px))) to prevent negative margins and
layout overlap.
---
Nitpick comments:
In `@src/css/custom.css`:
- Around line 44-46: Replace the hardcoded "50px" in the ".markdown h3" rule
with a new CSS variable (e.g. --markdown-heading-offset) so the reduction is
configurable; define that variable at a global scope like :root (or the
theme/root selector you use) with a default value (e.g. 50px) and update the
rule to use calc(var(--ifm-heading-margin-top) - var(--markdown-heading-offset))
so future tweaks or theme overrides can adjust spacing without changing the
selector itself.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Description
What problem is being solved?
The margin above H3 ('###') was too big:
Before

After

How is it being solved?
What changes are made to solve it?
References
Review Checklist
mainSummary by CodeRabbit