-
Notifications
You must be signed in to change notification settings - Fork 3
sidebar-version margin-top uses magic value that may break with header style changes #397
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingcomplexity/lowLow complexity - straightforward implementationLow complexity - straightforward implementationconfidence/highHigh confidence - well understood, low risk of issuesHigh confidence - well understood, low risk of issuesopenNew or unrefined work. Collaborative grooming allowed.New or unrefined work. Collaborative grooming allowed.priority/lowLow priority - can be deferred if neededLow priority - can be deferred if neededseverity/lowLow severity - cosmetic or documentation issuesLow severity - cosmetic or documentation issues
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcomplexity/lowLow complexity - straightforward implementationLow complexity - straightforward implementationconfidence/highHigh confidence - well understood, low risk of issuesHigh confidence - well understood, low risk of issuesopenNew or unrefined work. Collaborative grooming allowed.New or unrefined work. Collaborative grooming allowed.priority/lowLow priority - can be deferred if neededLow priority - can be deferred if neededseverity/lowLow severity - cosmetic or documentation issuesLow severity - cosmetic or documentation issues
Background
The `.sidebar-version` CSS rule added in #300 uses a negative margin to tighten the gap with the MADE header above it:
```css
.sidebar-version {
font-size: 0.7rem;
text-align: center;
color: var(--muted);
margin-top: -1rem;
}
```
Problem
The `margin-top: -1rem` value is implicit — it depends on the current bottom-padding/margin of `.sidebar-header`. If the header styles are ever changed (font size, padding, spacing), the version label could visually overlap the header or leave an unexpected gap.
Proposed Solution
Remove the negative margin from `.sidebar-version` and instead control the spacing explicitly on `.sidebar-header`:
```css
.sidebar-header {
/* existing styles /
padding-bottom: 0.25rem; / reduce bottom spacing explicitly */
}
.sidebar-version {
font-size: 0.7rem;
text-align: center;
color: var(--muted);
margin-top: 0;
margin-bottom: 0.5rem;
}
```
This makes the spacing relationship explicit and resilient to future header changes.
Related
Side issue identified during self-review of #300.