Skip to content

viewer.css: GEM APV "Live" button unreadable in light theme (undefined --bg-dim/--bg-hover); eff cards use undefined --canvas #11

Description

@Chao1009

Where

What happens

--bg-dim, --bg-hover and --canvas are not defined anywhere. They are missing from all three theme blocks and from the legacy alias list in viewer.css, and theme.js does not set them either.

  • .gem-apv-toolbar button therefore always uses the hard-coded dark fallbacks #1a1a2a (normal) and #22223a (hover), whatever the active theme. Its text color is var(--text), which the light theme sets to #1d1d1f. In the light theme the only toolbar button (#gem-apv-pause, "▶ Live") is near-black text on a near-black background. The contrast ratio is about 1.02:1, or 1.09:1 on hover, so the label is effectively invisible. The paused state is not affected because it overrides the background with --accent.
  • .gem-eff-zhist and .gem-eff-card use background:var(--canvas) with no fallback. That declaration is invalid at computed-value time, so the background becomes transparent in every theme. The efficiency cards and z-histogram frame never get the intended --theme-canvas shade. This part is cosmetic only.

Evidence

/* viewer.css @ d21ae9f */
.gem-eff-zhist { ... background:var(--canvas); }            /* L542 */
.gem-eff-card  { ... background:var(--canvas); }            /* L548 */
.gem-apv-toolbar button { ...
    background:var(--bg-dim,#1a1a2a); color:var(--text); ... }  /* L589 */
.gem-apv-toolbar button:hover { background:var(--bg-hover,#22223a); }  /* L591 */

git grep -e '--bg-dim' -e '--bg-hover' -e 'var(--canvas' d21ae9f -- resources/ only finds these uses and no definitions.

To reproduce: click the header theme button (#btn-theme) until the theme is "light", then open the GEM APV tab. The "▶ Live" button reads as a dark block with no visible label.

Suggested fix

Use the theme tokens that already exist, since each theme defines them:

.gem-eff-zhist, .gem-eff-card { background:var(--theme-canvas); }
.gem-apv-toolbar button       { background:var(--theme-button); }
.gem-apv-toolbar button:hover { background:var(--theme-button-hover); }

Alternatively, add --canvas: var(--theme-canvas); to the legacy alias block. After the change, check the cards and histogram in all three themes, because their shade will change slightly.

Status

Still present on dedup-refactor. There the undefined vars were replaced by the values they fell back to: hard-coded #1a1a2a/#22223a, and the background line removed from .gem-eff-zhist/.gem-eff-card. Rendering is unchanged, so the light-theme button is still unreadable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions