Right. No prob. Yes, in my line of work I share my screen quite often, including recorded sessions, so some sensitive information is better be a bit more protected from unintentional exposure.
BTW, talking about unintentional exposure: I use this slightly modified version of the same snippet, which delays un-blurring, so one wouldn’t uncover the “secret line” immediately on mouse hover when, let’s say, just scrolling or passing by with one’s cursor:
Playing with those two additional numbers you can set up the overall delay (5s in this example) of the effect (0s in this case), or set the time it takes for the text to fully come into focus. Hope this further improvement can be helpful.
Does this still work (clean-embeds-all), or am I wanting something different?
I followed the video to use clean-embeds.all.css (https://forum.obsidian.md/t/meta-post-common-css-hacks/1978/411) and am confident that it is updating Obsidian (I tried another version that prevents the indenting of text and I can see it move when I enable/disable the CSS snippet.
I am wanting to embed using ![[File Name#Heading Name]] and have the contents within that heading displayed - without the heading… but the heading still appears.
SIRvb has me a bit scared - info overload, but I’ll try to work through it.
Kraxen 72’s looks great - but didn’t work for me “out of the box”… I’m wondering if what I’m expecting just isn’t what others are solving. I was expecting the CSS to include the word “Heading”, but it doesn’t - so maybe no one else is trying to hide the heading?
Apologies, kraxen72’s snippet doesn’t appear to take care of the headings. I thought it did. It’s still nice though. I used it for a long time.
To remove all headings in embeds universally without adding any alt/attribute text ( ![[File Name#Heading Name|no-h1]], etc.) like in SlRvb’s snippet, you could try this:
[This is an edit, I asked this improperly earlier, sorry].
Could anyone point me to possible css snippets to increase/restore the spacing in between a heading and the first paragraph within an embed note (without changing the heading spacing)? The theme I’m using (obsidian gruvbox) will omit any line break just below a heding within an embed.
I’ve tried @ariehen suggestions above, also the older clean-embeds(-all).css snippet.
First, a big thank you for sharing such useful information, and documenting it so professionally!
Unfortunately (and I admit, I’m very new to Obsidian), I can’t get it to work. At all. So it must be me. I’ve got the file, it’s “identified” in Obsidian, enabled, Obsidian was restarted, and still I still have (for example) the left purple line that shows content as embedded. Do I miss something to really have embedded content show as if it would be content from the same file?
The CSS in the screenshot there is for hiding the link icon in Reading view. Give this a try to remove the left embed border for both Editing and Reading views:
Without having the source Markdown to work with it’s a bit of guesswork, but going off your screenshot, but it looks like a (a) table with an (b) ![[embedded note]] containing a (c) list.
You could try some combination of these (adjusting the values as desired) to see if the spacing looks any better for you.
/* all embeds - padding (top-right-bottom-left) */
.markdown-embed {
padding: 0 0 0 10px;
}
/* rendered list indentation */
.markdown-rendered ul, .markdown-rendered ol {
padding-inline-start: 1.2em;
}
/* rendered list indentation in tables only */
.markdown-rendered th :is(ul, ol) {
padding-inline-start: 1.2em;
}
First post in this glorious forum. Big thank you to @Moonbase59 for creating the awesome CSS-Hack, which isn’t as much a hack than a full feature! (Original Post Here)
And also thank you to @awholelottasomething that asked the question I was asking in my head.
And lastly to you @zerkshop who made the effort to explain!
Now to the problem I saw
When following your instructions, I had some issues when trying to work with my notes. I couldn’t create any new lines underneath what I’ve already written. No matter how many times I pressed “return” or “shift+return”. Hmm… Thats weird I thought and I realized it was only apparent when I had “clean-embeds” on.
The reason was these lines, and I specificly want to point towards the “.markdown-preview-section” parts. Removing this here would introduce the “weird” behaviour.
/* remove <br> between internal embeds */
.clean-embeds .markdown-preview-section div > br {
display: none;
}
/* remove vertical space added by markdown-preview-sizer */
.clean-embeds div.markdown-preview-sizer.markdown-preview-section {
min-height: unset !important;
padding-bottom: 0 !important;
}
Removing the ".markdown-preview-view " to “” (empty string) here would introduce a lot of weird states where we cant have a new line or
But I’ve re-added it there so now that behaviour is only in the preview view, where we do not need to edit our files!
Hi, for some reason I can’t get this to work. I tried both the code for all embeds and the code for cssclass, but neither seemed to work. Is it me or maybe something has changed this code was posted?