I have a CSS snippet to change the background color of notes but it doesn’t work when the note is in the sidebar. I’m having trouble finding the right CSS to target.
Things I have tried
These only work when the note is not in the sidebar:
.color {
background-color: #BCF2FD;
}
/* or the two below */
.tint .cm-scroller {
background-color: #BCF2FD;
}
.tint + .markdown-reading-view > .markdown-preview-view {
background-color: #BCF2FD;
}
You have the right info. Your first and second should work in the sidebar. The third wouldn’t work in even the center area.
Since it’s not working for you, things to check:
If you’re testing with multiple notes, then double check that the sidebar note has the cssclasses value for the snippet you’re actively testing, color or tint.
But if the same note when dragged from the center to a sidebar suddenly stops having a background, then try your snippet in a sandbox vault: Sandbox vault - Obsidian Help.