Code blocks are perfect to teach programming (my activity) but light/dark background color should be a choice in the options of the code block context menu. I understand that dark modes are in high demand nowadays and that bright shiny code upon deep blue looks so cool, but it is not compatible with anyone’s needs and nervous systems :
- Visually, in terms of contrast, it can be annoying to have an arrow/connector starting from a piece of code on dark background and going outside to a figure/explanation/diagram that’s on the default light background. It requires careful choice of connector’s color to keep good contrast on both background, and I personally find the change of background too much for comfort of gazing back and forth code/explanations (see next point).
- Some people find dark modes easier on the eyes, this is not my case, after years working code in dark mode I simply can’t take it anymore, bright lines of code impress my retina and leave trails whenever I move my gaze. I don’t know how many people suffer this conditions but this makes reading clear text on dark background extremely uncomfortable, even impossible for long texts. I installed a plugin in my browser for such situations that inverts all colors, it works with miro in web page : the code block does become light mode but then the rest of the boards goes dark ! If a global (board-wide) dark-mode were implemented then maybe that could be a solution for me (provided the code blocks wasn’t inverted in such a global dark mode !)
Of course the syntax highlighting should be adapted to the background light/dark as to keep good contrast.