nea / MarkdownViewerPlusPlus

A Notepad++ Plugin to view a Markdown file rendered on-the-fly
MIT License
1.17k stars 143 forks source link

Dark mode request #156

Open o-r-i-z-u-r-u opened 1 year ago

o-r-i-z-u-r-u commented 1 year ago

I think dark mode would be a really useful addition - I have difficulty viewing dark text on a white background.

Broadly speaking, what steps are needed to add a simple inverter toggle in the options?

DevinWeidinger commented 1 year ago

100%

KarlRW commented 1 year ago

One hacky option is to add something like this to the top of your md files:

<style type="text/css">
  body {
    background-color: #333333;
    color: #f4f4f4;
  }
</style>
Pyblo commented 9 months ago

One hacky option is to add something like this to the top of your md files:

<style type="text/css">
  body {
    background-color: #333333;
    color: #f4f4f4;
  }
</style>

I tried using this in plugin's settings->Custom CSS... It worked halfway, since the main preview container doesn't use the app's dark theme: image

I tried both css tags: body & html It would be good i the main plugin window would use the app theme but we could still do the custom css settings for the inside html preview.

Aquarii commented 8 months ago

some more detailed styling:

body {
  font-family: Helvetica, arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  padding-top: 10px;
  padding-bottom: 10px;
  background-color: #262626;
  padding: 30px;
  color: #CCC;
}

h1, h2, h3, h4, h5, h6 {
  margin: 20px 0 10px;
  padding: 0;
  font-weight: bold;
  -webkit-font-smoothing: antialiased;
  cursor: text;
  position: relative;
}

h1 {
  font-size: 28px;
  color: white;
}

h2 {
  font-size: 24px;
  border-bottom: 1px solid #cccccc;
  color: white;
}

h3 {
  font-size: 18px;
}

h4 {
  font-size: 16px;
}

h5 {
  font-size: 14px;
}

h6 {
  color: #888888;
  font-size: 14px;
}

p, blockquote, ul, ol, dl, li, table, pre {
  margin: 15px 0;
}
Aquarii commented 8 months ago

but what about the outer [light] margin? 😁