-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Is there a way to have less space around the admonition text? #200
Comments
Sure... Admonition content has a 10px margin on the top and bottom. You can override that with a CSS snippet: .admonition-content {
margin-top: 10px;
margin-bottom: 10px;
} |
Thanks, but that doesn't change anything. I'm in Live Preview mode, and I saw in the source that there's a different block for that mode, or maybe I misunderstood that. |
That snippet isn't specific enough, you're right. This should work (it does on the help vault for me): .admonition-content-holder > .admonition-content {
margin-top: 5px;
margin-bottom: 5px;
} Sorry about that! |
Originally posted by @valentine195 in #204 (comment) Sorry! I just saw this one had been closed, so I wasn't sure if you would see my other comment. Now it works, thank you!! |
That is probably driven by the paragraph element that the content is rendered as. You could do something like: .admonition-content > *:first-child {
margin-top: 0px;
}
.admonition-content > *:last-child {
margin-bottom: 0px;
} |
Unfortunately now it's back to having almost no change at all... |
Are you using a theme? |
I am, I'm using Shimmering Focus (https://github.com/chrisgrieser/shimmering-focus/) but when I just switched to the default theme, there was no real difference either. Does that help? |
Hmm, it looks fine for me with the default theme… you may need to inspect the element in the developer tools to see what CSS is being applied. You can open them with Ctrl+Shift+I (Cmd+Option+I on Mac), then select the element picker (top left icon, looks like a pointer). |
Ok, which part would you like to see? I mean which elements exactly? |
The admonition content holder. |
That is, but for the element above that (the one with class="admonition-content-holder") |
Yeah so that one doesn’t have any margins (the orange), which is correct. Can you look at the text content? It’ll likely be a |
Did you get this working? Does the snippet work in the help vault? |
It does work, yes, just not quite as much as I'd like, but this is fine, thank you :) |
Really cool plugin, especially combined with the Live Preview mode now :)
However, I feel like there is too much space between the title and the text, and then again the text and the end of the admonition block.
Is there a way to remove these blank lines or at least shrink them somehow?
Thanks!
The text was updated successfully, but these errors were encountered: