Block quote within embed styling

Steps to reproduce

Create 2 files:
> hello

Expected result

The quoted “hello” should have the same top margin within the quote block when shown in and when embedded in

Actual result

In, it has top margin 0px and in it has top margin 6px


  • Operating system:
  • Obsidian version: 0.9.6 MacOS

Additional information

I believe it is caused by the following default css:

.markdown-preview-view .markdown-embed-content 
p:first-child {
  margin-top: 6px;

When using custom css, this styling makes embed styling difficult to get right

I don’t get it. Isn’t this margin being added to all types of text, not just quoted text?

@WhiteNoise: I agree with @pokey’s observation. I tried to get the text to center vertically in a blockquote, but in transcluded blockquotes that does not work. I used this code:

/* Vertical centering of text in blockquote */
blockquote {
  display: flex;
  flex-direction: column;
  justify-content: center;

Furthermore, I also found that a transcluded blockquote (in “” in Pokey’s example) is indented from the left, so it does not vertically align with the “native” blockquotes. It is particularly noticeable in the PDF-exported version of that note.

Everything (not just the blockquote) within a transcluded text is slightly indented from the left.

@WhiteNoise: is there a way to correct/prevent that?

I don’t see a bug here. Maybe it’s something you don’t “like” but it’s not a bug.

.markdown-embed .markdown-preview-view {
    padding: 0px 0px 0px 0px;

@WhiteNoise: I applied the padding as per your suggestion. In the 1st screenshot the 1st blockquote is “native”, and is shown to be be slightly indented to the right relative to the 2 transcluded blockquotes below it.

The 2nd screenshot is a version of an export to PDF. Now the 2 transcluded blockquotes are indented relative to the “native” one.

Maybe it is not a bug but only a question of CSS, unfortunately your suggestion did not do the trick. In any case I don’t understand why you put this issue in the bug graveyard.

You probably have to do a similar modification for the css part that used in the printing process.

There is no bug here. The paddings are intentional. If you don’t like them, try to change them using CSS.
Ask in the CSS section or discord is some user is willing to help you with that.

@WhiteNoise: OK, fair enough. Would it be possible to transfer this to the CSS section?

I think it’s better you start you own thread because you and OP have two different problems.

@WhiteNoise: OK, will do.

Completely off-topic question here: How did you get transcluded blocks in PDF export?

@utk-ch: my answer will probably amaze you because of its simplicity. I did not do anything. I opened a note with transclusions and clicked “Export to PDF” in the options menu, and, as the saying goes, Bob’s your uncle. Done.

I double checked to see if we are talking about Obsidian only.
Don’t see an “Export to PDF” option. :cry:

Edit: Okay. I saw the changelog. It’s present in Insider build. Silly me.