Make the Editor.js link input readable in dark mode (#52) #58

Merged
miko merged 1 commit from feature/52-link-ui-dark-mode into development 2026-11-03 14:54:48 +01:00
Owner

Closes #52

Editor.js hard-codes a light background (#F8F8F8) on the inline link tool's URL field (.ce-inline-tool-input), so in dark mode the text was white on near-white. The field now uses the theme's surface, border, text and placeholder tokens (ADR-0010). The class is doubled, as on the .ce-popover override, because Editor.js adds its styles after ours. The rule covers every Editor.js instance: guide and category descriptions and step content.

Test

New e2e test in e2e/richText.spec.ts. It opens the link tool in dark mode and asserts a WCAG contrast of at least 4.5, using contrastRatio from src/theme/colour.ts. It fails without the fix (1.05) and passes with it.

🤖 Generated with Claude Code

Closes #52 Editor.js hard-codes a light background (`#F8F8F8`) on the inline link tool's URL field (`.ce-inline-tool-input`), so in dark mode the text was white on near-white. The field now uses the theme's surface, border, text and placeholder tokens (ADR-0010). The class is doubled, as on the `.ce-popover` override, because Editor.js adds its styles after ours. The rule covers every Editor.js instance: guide and category descriptions and step content. ## Test New e2e test in `e2e/richText.spec.ts`. It opens the link tool in dark mode and asserts a WCAG contrast of at least 4.5, using `contrastRatio` from `src/theme/colour.ts`. It fails without the fix (1.05) and passes with it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Editor.js hard-codes a light background on the inline link tool's URL
field, so in dark mode its text was white on near-white. The field now
uses the theme's surface, border and text tokens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
miko merged commit 0bb456a4aa into development 2026-11-03 14:54:48 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MassiveDynamic/kataba!58
No description provided.