I was trying to adjust the spacing between the top and bottom of the of callout text. When I type the text my css behaves as expected (spacing reduced only at top and bottom), but when I try to embed a file it reduces the spacing between ALL paragraphs.
Steps to reproduce
First, create file in a sandbox vault with the contents:
>[!info]
>![[Plugins make Obsidian special for you]]
Then add the custom css to the snippets folder of a sandbox vault
Custom CSS
.callout p:last-of-type {
margin-bottom: 0.05in !important; /* between last paragraph and bounding box */
}
Did you follow the troubleshooting guide? [Y/N]
Yes!
Expected result
The distance between the last paragraph and the bounding box of the callout should shrink.
Actual result
The distance ALL of the paragraphs shrink.
Environment
SYSTEM INFO:
Obsidian version: v1.4.16
Installer version: v1.4.13
Operating system: Windows 10 Home 10.0.19045
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 1
Restricted mode: on
RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Additional information
Changing “last-of-type” to “first-of-type” and setting “margin-top” works as expected and reduces the distance between the top of the callout and the first paragraph only. Typing words directly inside the callout works as expected and only affect the last/first paragraph.