Skip to content

fix(ui): Typography Text is not theme-aware, causing black-on-black text #444

Closed

Description

@thinkclay

Split from #440. Reported symptom: buttons render black-on-black on community post detail pages.

Cause

packages/ui/src/components/Typography/Text.tsx is not theme-aware at all — it never calls useThemeContext, and resolveColor(undefined) returns colors.text.light.primary (#16110d) unconditionally:

const resolveColor = (color?: string): string => {
  if (!color || color === 'inherit') return colors.text.light.primary
  ...
}

Because it always emits an explicit color, a nested <Text> cannot inherit from its parent. Button correctly sets color: colors.white on its own wrapper Text, but UpvoteButton and BookmarkButton nest a bare <Text> inside it, which re-emits #16110d over the gray[900] filled background.

Scope

Two layers:

  1. Call sites (packages/scf-core/features/communities/components/{UpvoteButton,BookmarkButton}.tsx) — nest raw <Text> inside <Button> instead of using the label path. Cheap fix, resolves the reported symptom.
  2. Systemic — every <Text> without an explicit color renders light-theme near-black regardless of active theme. ~1,860 of ~3,880 <Text> usages in scf-core/features carry a manual colors.text[t] override to work around it. That workaround density is the actual bug.

Note Input.styles.ts gets this right (colors.text[resolvedTheme].primary), so the fix pattern already exists in the package.

Acceptance

  • Text resolves colors from the active theme
  • color="inherit" genuinely inherits rather than hardcoding
  • Upvote and bookmark buttons legible in both themes, filled and outline
  • No regression in light mode

Lives in the packages/ui submodule — needs its own PR plus a pointer bump in UNI-Construct.

Activity

  1. added
    bug
    on Jul 30, 2026
  2. added a commit that references this issue on Jul 30, 2026
    203a125
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

    bugtype: frontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions