Code block colour in Markdown editor

Screenshot 2024-07-22 at 00.27.50

Why are you using text-color ?

FTR: text-color is not a property. Nowhere. Did perhaps ChatGPT tell you to use that?

You should always check on Mozilla Developer Network if you have doubts (or just want to see how something works).

As @bluefrog pointed out: If you want to change the background color (which is gray in your example), you must use the background-color property. Foreground color is defined in the color property. Thus

pre, code {
  background-color: #eee;
  color: #000;
}

sets the background color to a very light gray and the text color to black.

Screenshot 2024-07-22 at 11.05.13

CSS does nothing in the editor, only in the preview.
If that’s bothering you, an external MD editor might be a solution.

Yes, I didn’t mean to suggest the CSS was anything to do with it; I was just trying to clarify that it was the editor pane rather than the rendered pane that was the issue. But thanks for confirming there isn’t a workaround in DT itself.

I’m slightly surprised this doesn’t seem to have come up in the forum before. It’s a strange choice and makes code editing in MD needlessly difficult. Maybe everyone else’s eyes are better than mine. At any rate I’d suggest as a feature request that the grey be reconsidered – but many thanks to both for responding!