Skip to content

fix: restore the breadcrumb chevron and light the mermaid participant labels - #13

Open
wardbryan3 wants to merge 1 commit into
mainfrom
fix/breadcrumb-chevron-and-mermaid-dark
Open

wardbryan3 wants to merge 1 commit into
mainfrom
fix/breadcrumb-chevron-and-mermaid-dark

Conversation

@wardbryan3

Copy link
Copy Markdown
Contributor

Summary

Two visual defects found by walking the live docs site at 375, 768 and 1440 in both themes. Both are fixed here rather than in the docs site, so every spoke picks them up.

The breadcrumb separator was a solid square, not a chevron. Every page, both themes, every width. Infima draws the separator as a chevron background-image tinted by --ifm-breadcrumb-separator-filter. This theme recoloured it with the background shorthand, which also resets background-image, leaving a bare 7.5px block of --ink-300. The trail read as a row of tags rather than a hierarchy. The chevron now travels in a mask, so background-color still sets the colour and the filter is no longer needed.

Sequence-diagram participant names were invisible in dark mode. Mermaid's dark theme applies .actor { fill: #1f2020 }, which hits the label <text> as well as its box. The rule meant to correct that, text.actor > tspan, never matches: these labels carry their text directly in the <text> element with no tspan. Measured on the live site:

Before After
Label against its box 1.50:1 10:1
Label against the page 1.05:1 n/a

The participant boxes rendered as empty rectangles. The existing rect.actor lift to #3a3d44 was not the cause and is unchanged; it only moved the label from invisible to barely visible.

The mermaid dark-mode rules move here from the docs site's own src/css/custom.css. They were always theme-level styling, and keeping them in one repo means the spokes get them too. The docs site's copy is removed in a follow-up once this release is published, so there is no window without them.

Scope

Only sequence diagrams were affected by the label bug. Flowcharts, graphs and state diagrams measured 10.71:1 and are unchanged. Light mode was correct throughout and is untouched: the new rules are all scoped to [data-theme='dark'].

Verified

  • Both fixes applied to the live site in the browser and measured: chevron restored with the theme's own --ink-300, label contrast 1.50:1 to 10:1, var(--ink-900) confirmed to resolve inside the injected SVG.
  • All four new rules parse in a real browser stylesheet, including the mask shorthand.
  • yarn build (tsc) clean, yarn test 14 passing.

Version bumped to 0.5.2.

🤖 Generated with Claude Code

… labels

Two visual defects found by walking the live docs site at 375, 768 and 1440
in both themes.

The breadcrumb separator rendered as a solid square on every page, in both
themes, at every width. Infima draws it as a chevron background-image; the
theme recoloured it with the `background` shorthand, which also resets
background-image, so only a 7.5px block of colour was left and the trail read
as a row of tags rather than a hierarchy. The chevron now travels in a mask,
so background-color still sets the colour and the Infima filter is dropped.

Sequence diagrams rendered their participant names in near-black. Mermaid's
dark theme applies `.actor { fill: #1f2020 }` to the label <text> as well as
the box, and the rule meant to correct that, `text.actor > tspan`, never
matches, because these labels carry their text directly in the <text> element
with no tspan. The measured result was 1.50:1 against the box and 1.05:1
against the page, so participants read as empty rectangles. Setting the label
to --ink-900 gives 10:1.

The mermaid dark-mode rules move here from the docs site's own stylesheet, so
that every site on the theme gets them and visual fixes live in one repo.
Flowcharts, graphs and state diagrams were already correct at 10.71:1 and are
unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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