Skip to content

Make tooltip text readable - #337

Merged
HDauven merged 2 commits into
mainfrom
fix/tooltip-text-contrast
Nov 20, 2026
Merged

HDauven merged 2 commits into
mainfrom
fix/tooltip-text-contrast

Conversation

@HDauven

@HDauven HDauven commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Tooltips on the info fill showed an empty dark box: the text took --calm-text, which is also the info fill's colour, so the text was drawn in the box's own colour (1:1). Success, warning and error tooltips had the same problem in the dark theme.

The text on each fill now contrasts with it in both themes:

Tooltip Theme Before After
info light 1.00:1 16.88:1
info dark 1.00:1 16.15:1
success light 4.41:1 4.41:1
success dark 2.22:1 7.28:1
warning light 3.10:1 5.44:1
warning dark 1.59:1 10.14:1
error light 6.56:1 6.02:1
error dark 2.86:1 6.43:1

Success in the light theme is unchanged: dark text is already the better of the two on that green.

CSS only: --on-info-color, --on-success-color, --on-warning-color and --on-error-color in src/style/duskit-bridge.css.

Checked by rendering every tooltip type with the before and after styles in both themes.

The info fill and its text were both the text colour, so info tooltips showed an empty box. Text now takes the pill's colour on the info and warning fills and stays dark on the success fill, in both themes.
@HDauven
HDauven requested review from GeorgianDusk and removed request for GeorgianDusk November 20, 2026 14:52
White on the dark theme's light red read at 2.86:1; the pill's text colour reads at 6.43:1 there and 6.02:1 on the light theme's red.
@HDauven
HDauven merged commit a0260ae into main Nov 20, 2026
1 check passed
@HDauven
HDauven deleted the fix/tooltip-text-contrast branch November 20, 2026 15:21
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