SlRvb / Obsidian--ITS-Theme

Theme designed with readability and customizability in mind. Change it easily to your liking with the Style Settings plugin installed.
https://publish.obsidian.md/slrvb-docs/ITS+Theme/ITS+Theme
GNU General Public License v2.0
562 stars 114 forks source link

How to change the background color of embeds #23

Closed zcysxy closed 3 years ago

zcysxy commented 3 years ago

Hi! Seems like I cannot change the background color of embeds in ITS like I can in other themes, I skimmed through the code and didn't figure out why. Are there any special classes assigned to embeds?

SlRvb commented 3 years ago

The current style of embeds uses the note's color, but if you toggle Original Embeds on in the Style Settings and change the color of Embed/Blockquote, I think that should do what you want.

zcysxy commented 3 years ago

Yeah I succeed with Original Embeds turned on! However I was trying to change the color in a certain note using cssclass frontmatter. Is it possible without turning on Original Embeds globally?

SlRvb commented 3 years ago

Ooh, if you want to use a cssclass, this should do it:

.embed .markdown-embed {
    background-color: #1c2535;
}
zcysxy commented 3 years ago

Sorry but selector .embed .markdown-embed doesn't work for me. I finally succeeded with selector .markdown-preview-view .markdown-embed, .internal-embed 🍻 .

FYI I achieved some kind of glass effect by tweaking embed background color 😆

image