How to change background color based on cssclasses for the whole area?

hi, I have a file which i want to have a specific background color for

here, you can see that i applied background-color to file. big “but”: it applies color to the editable area, not to side parts of the note. it looks…weird and not the way i want it to look

i tried to type in --background-primary and change this variable based on cssclasses, but it does not work. what can i do?

Without know the snippet(s) you are using now, it’s hard to tell, but it looks the color change is only affecting the .cm-sizer text area? (if that screenshot is from Live Preview)

The simplest would be something like this:

.view-content .dark-slate { 
    background-color: darkslategray;

Font colors and such may also need to be adjusted for that note to be legible, but it’s a start.

1 Like

good thing you told me about other snippets
yeah, i had this (cause i wanted scrollbar to be closer to text)

.markdown-source-view, .markdown-preview-view {
max-width: 1000px;

hence this issue. thank you

That was easy! :slightly_smiling_face:

Yeah, for next time, it’s a good idea to share the theme you are using (if you’re using a community one), anything you’ve changed in Style Settings, and any extra snippets you’ve added yourself. It makes it easier for folks get an idea of what may be the issue.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.