Skip to content

fix(viewer): stop legend gradient leaking through translucent border#4

Merged
MattNotarangelo merged 1 commit into
mainfrom
fix/legend-bar-gradient
Jun 11, 2026
Merged

fix(viewer): stop legend gradient leaking through translucent border#4
MattNotarangelo merged 1 commit into
mainfrom
fix/legend-bar-gradient

Conversation

@MattNotarangelo

Copy link
Copy Markdown
Owner

Background

  • The colour legend bar (elevation / distance / gradient / survey-date modes) always showed a tiny sliver of the wrong colour at each end: red above the blue top, blue below the red bottom.
  • Cause: the bar's CSS gradient is sized to the padding box but painted out to the border box, so it tiles in the 1px strip under the translucent border — showing the opposite end of the ramp through it.

What Has Changed

  • Added background-origin: border-box to .legend-bar so the gradient spans the full border box and has no repeat region under the border.
  • Verified with a side-by-side browser repro (old vs new CSS): the artifact reproduces with the old CSS and is gone with the fix. Affects all gradient legend modes since they share this element.

Screenshots/Video

  • {Leave for author}

Checklist

  • Self-review completed
  • Tests added or updated
  • Tested locally

🤖 Generated with Claude Code

The legend bar's gradient was sized to the padding box but painted to
the border box, so it tiled under the 1px translucent border — showing
the opposite end's colour as a sliver at the top and bottom of the bar.
Size the gradient to the border box instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MattNotarangelo MattNotarangelo merged commit 2458932 into main Jun 11, 2026
1 check passed
@MattNotarangelo MattNotarangelo deleted the fix/legend-bar-gradient branch June 11, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant