Fix: sidebar-version margin-top uses magic value (#397)#398
Fix: sidebar-version margin-top uses magic value (#397)#398tbrandenburg merged 2 commits intomainfrom
Conversation
…header style changes (#397) The .sidebar-version CSS rule uses margin-top: -1rem which is a magic value that creates an implicit coupling with .sidebar-header spacing. Changes: - Added padding-bottom: 0.25rem to .sidebar-header for explicit spacing control - Removed negative margin from .sidebar-version and added margin-bottom: 0.5rem Fixes #397
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔍 Automated Code ReviewSummaryThe fix removes the magic Findings✅ Strengths
|
Summary
The
.sidebar-versionCSS rule usesmargin-top: -1remwhich is a magic value that creates an implicit coupling with.sidebar-headerspacing. If header styles change, the version label could overlap or leave unexpected gaps.Root Cause
Spacing between header and version was controlled by a negative margin on the child (
.sidebar-version) rather than explicit padding on the parent (.sidebar-header).Changes
packages/frontend/src/styles/sidebar.csspadding-bottom: 0.25remto.sidebar-headerfor explicit spacing controlpackages/frontend/src/styles/sidebar.css.sidebar-version, addedmargin-bottom: 0.5remTesting
npm run lint)var(--muted)and consistent spacing values)Validation
Issue
Fixes #397
📋 Implementation Details
Implementation followed artifact:
Investigation artifact from issue #397
Deviations from plan:
None - implemented exactly as specified in the artifact.
Automated implementation from investigation artifact