Display embeded notes with a different background color

Hi,

When a note is displayed inside another note, there is not a lot of visual differenciation between the main note or the embeded one.
It could be nice to render the embeded note with a different background color.

For example, as I use the default theme, my background color is either white during the day, or black later in the day. The embeded note could appear greyed depending on the mode. Or with a customizable color (but colours are already taken by callouts, codes, …).

Anyway the idea is to clearly distinguish the fact that im a reading a note inside another one. That would be mostly useful for long notes, using a lot of vertical space inside the main one.

I hope my thoughts are clear.

There’s a quick way to accomplish that with a CSS snippet (how to use snippets). Obsidian comes with a variable called --embed-background that lets set a color of your choice.

A quick example:

body {
	--embed-background: var(--background-secondary);
}

That uses another built-in variable called --background-secondary, which is convenient because it automatically changes for the dark and light themes, and it’ll be compatible with community themes that use the variable.

But you can put in whatever colors you like. For example:

.theme-light {
	--embed-background: honeydew;
}

.theme-dark {
	--embed-background: #6A5ACD;
}

Thank you, that might do the trick. With such a simple code.