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

Any plans to improve code-block in dark mode? #65

Open
intel352 opened this issue May 6, 2022 · 3 comments
Open

Any plans to improve code-block in dark mode? #65

intel352 opened this issue May 6, 2022 · 3 comments

Comments

@intel352
Copy link

intel352 commented May 6, 2022

It would be nice to have code blocks also represent dark mode theme, with a dark background. Any plan on implementing this?

@intel352
Copy link
Author

I'm not a visual designer, prefer to leave that up to people that have an actual eye for it, but I've identified some styles that need to be overridden for code block styling in dark mode.

I updated the CSS block to the below:

@import url("https://linuz90.github.io/better-roam-research/main.css");
.cmt-punctuation {
  color: #67d8ef;
}
.cmt-propertyName {
  color: #ac80f7;
}
#text, .cmt-operator {
  color: #A9A9A9;
}
.cmt-labelName, .cmt-atom {
  color: #167;
}
body, .roam-body, .roam-app, .rm-pages-title-text {
  color: #09a9e3 !important;
}
span.bp3-button-text {
  color: #020024;
}
.rm-code-block {
  background-color: #213238;
}
.c2 .cm-gutters {
  background-color: #e5e5e5;
  color: #999;
}

It looks like shit still (screenshot attached), but it's at least legible, which can't be said for code block in the current dark-mode theme.
Screen Shot 2022-06-29 at 11 59 01 AM

@intel352
Copy link
Author

If anyone comes up with some better overrides, please do share. Thanks!

@blairharper
Copy link

blairharper commented Sep 4, 2022

Thanks @intel352 , this has been bothering me too - using your solution now until I have the time/energy to tweak the colours... with one slight modification. Replacing the selector:

body, .roam-body, .roam-app, .rm-pages-title-text

with:

cm-line

Means it only overrides the text colour within code blocks and not all text everywhere. Complete example:

@import url("https://linuz90.github.io/better-roam-research/main.css");
.cmt-punctuation {
  color: #67d8ef;
}
.cmt-propertyName {
  color: #ac80f7;
}
#text, .cmt-operator {
  color: #A9A9A9;
}
.cmt-labelName, .cmt-atom {
  color: #167;
}
.cm-line {
  color: #09a9e3 !important;
}
span.bp3-button-text {
  color: #020024;
}
.rm-code-block {
  background-color: #213238;
}
.c2 .cm-gutters {
  background-color: #e5e5e5;
  color: #999;
}

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

2 participants