IntelliJ IDEA - Simplest White Markdown Theme

If you are using IntelliJ IDEA as your IDE for writing Markdown files, you might have noticed that the Markdown preview theme is dark by default when you switch to the dark theme of the IDE. This can be a bit annoying if you prefer a light background for your Markdown files, or if you want to match the appearance of GitHub, which uses a white background for Markdown rendering.

Well, it’s dark by default with dark theme:

Fortunately, there is an easy way to change the Markdown preview theme in IntelliJ IDEA. Here are the steps:

  1. Go to File > Settings > Languages & Frameworks > Markdown.
  2. Under the “Custom CSS” paste snippet provided below.
  3. Click Apply and OK to save your changes.

The snippet:

body {
  filter: invert(1);
  background: #fff;
  font-family: 'Segoe UI';
  font-size: 16px;

img {
  filter: invert(1); 

Now you should see a light background for your Markdown preview in IntelliJ IDEA. You can also adjust other settings such as font size, zoom level, and scroll sync under the same Preview tab. Enjoy writing Markdown files with your preferred theme!

To contact me, send an email anytime or leave a comment below.