Flush Inline embeds

looks awesome! And hopefully if we get a way to distinguish between the embeds it will be even more useful. I put a feature request here: CSS classes for each embed type (page, heading, block)

4 Likes

@1stprinciples: I don’t know if this is of interest:

/* eliminate scrollbars in transclusions */

.markdown-preview-view .markdown-embed-content, 
.markdown-preview-view .markdown-embed-content>.markdown-preview-view {
  max-height: unset;
}
5 Likes

So glad to have found this - thanks!

Do you have any solutions for also hiding the scrollbars in hover previews?

2 Likes

@joeshirley: no, sorry, I don’t.

1 Like

Ah well. Thanks for letting me know. If I figure out a solution I’ll add it here.

1 Like

@joeshirley: yes, please do because others may find it useful.

Yesterday I published my list of CSS snippets that you might find useful. It is nothing revolutionary, but you might pick up a thing or 2.

Posting a question in Discord to see if anyone has suggestions. BTW, this works great in Publish as well.

hello,
Can I use this with a CSS snippet? Or should I change the css within my theme file please?
thanks for the help.

Is there a way to eliminate the title of block reference units? I guess I have read it somewhere (as a feature/css snippet request?), but I can’t figure out where. Help would be very much appreciated!

@welstand: block references don’t have a title.

Right! So maybe it’s the title of the note in which the block reference is. I have to check it!

Are you sure you mean block reference and not header reference?

@Klaas you were right! I’m sorry! I was referencing a section rather than a block. My bad!

Godsend this, thank you works a treat!!!

Hi! Do you still need a solution for this?

If yes, I’ve found that you can hide ALL scrollbars (including in hover previews) using a plugin called Hider.

It also allows to hide other stuff but you can choose what to hide (although, if you toggle “hide scrollbars” it will hide ALL of them throughout the whole app - I personally like it this way but it may be a con for some people).

Hope this helps!

Hey, thanks for the awesome css snippet, the overly large block references were a bit distracting!
I was also wondering if I can assign a different background color to the embed. That could give it a slightly better cue where the block starts and ends. Currently, it is a bit hard to notice where the block reference is by only looking at the link symbol.

For all that read this late (the original post is a long time ago):

3 Likes

Thanks very much, your posts were very helpful! (Also showing the link icon only on hover is neat). For everyone else wondering how it’s done, just add the following to the CSS snippet:

/* change background color, to exactly see what’s embedded */
.markdown-preview-view .markdown-embed,
.markdown-preview-view .file-embed {
  background-color: var(--background-secondary) !important;
}

Sorry for being late to the show (the last post was in April, tho), but why open up a new thread, if this one was right on topic :wink:

1 Like

I’ve been trying this out, and of the flush inline options it seems to be the best. However, I’ve having an issue with newlines inside embeds being removed, as well as those between embeds. I’m not great with CSS, but I know the issue is under /* remove <br> between internal embeds */. Any ideas?

With that portion commented out:

With normal css:
image

Source for embed:
image

Edit: the same issues seems to apply to the preview on hovering.

1 Like

Hi I’m having a few problems, I don’t think this is really working for me. There is still a lot of space on the bottom of the block reference:
Screenshot 2021-09-14 at 11.23.35
Screenshot 2021-09-14 at 11.23.42

This is the referenced Note
Screenshot 2021-09-14 at 11.23.58

Any ideas?

1 Like