#3790·leantime

Wiki document editor text is unreadable in dark mode

Author: lakisan1Created Sep 17, 2026Updated Sep 17, 2026

What is your set up?

Self Hosted Docker

Version

3.9.8

Describe the issue

In dark mode the body of a Wiki article (/wiki/show/{id}) has no contrast: the editor background is transparent so the dark page background shows through, while the text stays dark grey (#333). The text is invisible until you select it.

Cause (all present on master):

  • .tiptap-editor .ProseMirror sets color: var(--main-text-color, #333), but --main-text-color is defined in no theme file (theme/{default,minimal}/css/{dark,light}.css), so it always falls back to #333.
  • .wiki-document-wrapper .tiptap-editor { background: transparent !important; } (app/assets/css/components/wiki.css) overrides the editor's own background: var(--main-background, #fff) fallback, so the editor shows the dark page background.
  • The dark-mode overrides shipped in tiptap-editor.css are gated on [data-theme="dark"] / .dark, but dark mode is applied by swapping the theme stylesheet; that attribute/class is never set on <html>. Those rules never apply (81 dead [data-theme="dark"] blocks).

In tickets/comments the editor keeps its white #fff fallback background, which is why only the Wiki page is affected.

Relevant: #3262 - same missing data-theme root cause.

Reproduction steps

  1. Set a dark color mode (Settings -> Theme).
  2. Open any Wiki article, e.g. /wiki/show/16.
  3. Click the document body to edit.
  4. Text is dark grey on a dark background - unreadable. Selecting it (mouse drag) reveals the text.

Error Logs (LEANTIMEFOLDER/storage/logs)

No response