You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bump to v1.2.49 — Syntax colors stay readable in light mode
Headings, bold and inline code were painted #f87171 — tailwind red-400 —
regardless of theme. That colour is built for a dark background; against the
white light-mode page it lands at about 2.6:1, well under the 4.5:1 that
normal-size text needs, and a coloured heading came out fainter than the plain
black one beside it. Turning the "syntax colors in visual editor" setting on
made the document harder to read, which is the opposite of the point.
The two themes need genuinely different reds, not one red at two opacities, so
the colour moves behind a --syntax-accent token defined per theme in main.css:
red-700 (#b91c1c, ~6.5:1 on white) in light mode, and red-400 unchanged in
dark. The tinted inline-code background and its border get the same treatment.
Applied to the raw CodeMirror editor as well as the visual one — the setting
promises the visual editor will "match the raw editor", and the raw editor was
drawing the identical washed-out red on the identical white background. That
means the token has to work from inside a CodeMirror theme: it does, since
those compile to ordinary CSS rules and a custom property inherits from <html>,
so the colour re-resolves on its own when the theme flips.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>