Have a snippet that works in read mode, work in Live Preview

I have found a snippet that changes how my embeded notes look, to get rid of the title, and the vertical bar on the left. this is the snippet…

/* Naked Embeds */
.markdown-embed-title { display:none; }
.markdown-preview-view .markdown-embed { border:none; padding:0; margin:0; }
.markdown-preview-view .markdown-embed-content { max-height: unset;}
.markdown-preview-view .markdown-embed-content>:first-child { margin-top: 0; }
.markdown-preview-view .markdown-embed-content>:last-child { margin-bottom: 0; }

It all works fine in ‘read’ mode (which never use), but in Live Preview, on the no title bit works. Is there something I can add to the snippet, to get it to work in Live Preview (to get rid of the vertical line denoting an embeded note?

There’s a theme variable you could use for the left embed border that covers both the editor and Reading view, but it looks changed between Obsidian v.1.5.12 and Obsidian v.1.6.


Give this a try for now (in addition to your CSS above):

Obsidian v.1.5.12 →

.markdown-embed {
    border-left: none; /* default -> var(--embed-border-left); */
    padding: 0 0 0 0; /* default -> 0 0 0 var(--size-4-6); */
}

Obsidian v1.6+ →

.markdown-embed {
    border-inline-start: none; /* default -> var(--embed-border-start, var(--embed-border-left)); */
    padding: 0 0 0 0; /* default -> 0 0 0 var(--size-4-6); */
}