better-roam-research
better-roam-research copied to clipboard
Any plans to improve code-block in dark mode?
It would be nice to have code blocks also represent dark mode theme, with a dark background. Any plan on implementing this?
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.

If anyone comes up with some better overrides, please do share. Thanks!
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;
}