Markdown tables unreadable in dark mode
Reported by Walter Dörwald | July 6th, 2021 @ 04:10 PM
When using dark mode, Markdown tables are unreadable in the preview as they use white text on a very light grey background.
Comments and changes to this ticket
-
Walter Dörwald September 21st, 2023 @ 12:36 PM
I've updated to the beta version (1.4 release 5937). Now the preview looks better, as it consistently uses light mode even if the OS is switched to dark mode.
However the email recipient still sees white text on a white background for tables and code blocks. I guess it is hard or even impossible to generate HTML that honors the light/dark theme for the OS, since for the generated HTML all CSS rules must be moved into
style
attributes of the HTML elements. However astyle
attribute doesn't support media queries. So we might have to stick to one theme for the email. However the problem with the HTML as it is currently generated is the following. The HTML generated for code blocks looks like this:<pre style="margin-left: 15px; margin-right: 15px; padding: 5px; background-color: #F7F7F7; border-radius: 5px 5px 5px 5px; overflow-x: auto; max-width: 90vw;"> <code style="margin: 0 0; border-radius: 3px; background-color: #F7F7F7; padding: 0px;"> <?ul4 la_table_headrow(app, content=None, id=None, cssclass=None, cssstyle=None, hide={/})?> <?whitespace strip?>
I.e. it specifies a background color, but no text color, so the email client chooses a text color that best matches the OS color theme, which in dark mode is white, which gives us white text on a nearly white background.
Of course the background color for
pre
andcode
could simply be removed so that the email client can choose an appropriate background color too, but this will fall as soon as the code block uses syntax highlighting. So the better option might be to set the text color too. -
benny August 27th, 2024 @ 03:51 PM
Does anyone still have this issue? I'm unable to reproduce it (the white text).
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Mac OS X email client.