Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark mode request #156

Open
o-r-i-z-u-r-u opened this issue Jan 19, 2023 · 5 comments
Open

Dark mode request #156

o-r-i-z-u-r-u opened this issue Jan 19, 2023 · 5 comments

Comments

@o-r-i-z-u-r-u
Copy link

o-r-i-z-u-r-u commented Jan 19, 2023

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
Copy link

100%

@KarlRW
Copy link

KarlRW commented Jun 1, 2023

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
Copy link

Pyblo commented Oct 10, 2023

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
Copy link

Aquarii commented Oct 26, 2023

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
Copy link

Aquarii commented Oct 26, 2023

but what about the outer [light] margin? 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants