Skip to content

sidebar-version margin-top uses magic value that may break with header style changes #397

@tbrandenburg

Description

@tbrandenburg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomplexity/lowLow complexity - straightforward implementationconfidence/highHigh confidence - well understood, low risk of issuesopenNew or unrefined work. Collaborative grooming allowed.priority/lowLow priority - can be deferred if neededseverity/lowLow severity - cosmetic or documentation issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions