I am using data view to display a daily list of notes and want to incorporate callouts with the minimal theme because of their folding properties. However, when I use callouts, there’s a large margin indentation on the left side that I find really unappealing.
Things I have tried
I tested the default theme and the indentation disappeared, but I much prefer using the minimal theme. Despite searching through forums, documentation, and style settings, I haven’t found a solution to this issue. I would be immensely grateful for any help, as I plan to use many callouts with nested lists in my vault. Any help would mean a great deal to me…thanks in advance
In a test vault with only Minimal (and Dataview) installed, I don’t see much of a difference in spacing between the default and Minimal themes within the callout itself. But I’ve noticed in the past Dataview blocks can have different spacing depending on theme.
Give this CSS a try. It will affect all callouts. You can target specific ones if you want to. Also, play around with the text-indent values to see what looks good to you (e.g., -0.5em, 0em, 0.5em, 1em).
Ok, I am about to try this. Thanks a lot for the code. Also, since I have you, might you be able to give me some css code that reduces the spacing between headers? I don’t like how large the spacing between headers are currently within the theme I am using but I’d rather not go back to the default theme just to have less spacing between headings. Thank you a bunch
I just gave it a try and I don’t think this approach is going to work. It’s affecting both the dataview query list and the normal lists in callouts. The normal lists don’t have the large indent and the dataview queries do. I also wasn’t even able to reduce the space with that css snippet. The css snippet only seemed to affect the space between the text and the bullet point on the list. It didn’t move the bullet points along with the text.
Again, I’m not seeing the spacing issue (between lists in callouts and Dataview in callouts using Minimal), so it’s hard to pin down.
This one should only target callouts containing Dataview blocks. The padding order goes clockwise (top->right->bottom->left) so you can play around there. Can also be written as --callout-title-padding: 10px 10px 10px 10px; Needs Obsidian installer v1.1.8+
So, something else is changing the spacing. Something in the Minimal Theme Settings or Style Settings plugin? An entirely different plugin? Another CSS snippet? If you’re not familiar with the debug steps, they are here →
This is so bizarre. Trust me, I know how to trouble shoot and I have already done this. To reiterate what I have done: I have created a New vault and only installed dataview and enabled minimal theme. I have not downloaded any other snippets or plugins. I am not using style settings or minimal theme settings plugin within this new vault. I am only using the query I included in my last post within a dataview callout and I am still getting the same large indentation. I have changed every single setting within the snippet you sent me and I have yet to be able to replicate what you showed within your last image. What operating system are you on? I am using windows 11.
Also thanks a lot for the help thus far. I appreciate your patience. I’m about at my wits end and this is driving me crazy.
Understood on the troubleshooting. Just had to check.
Sorry if I wasn’t clear - the screenshot with the vertical line above isn’t using my snippet or any others. Just Dataview with Minimal, no settings changed.
I’m using macOS 13.3.1 (Obsidian v1.2.3) and macOS 12.6.5 (Obsidian 1.1.16). The spacing looks fine and is the same with both Obsidian versions. Just checked in Windows10 (Obsidian 1.1.16) and it looks fine there as well.
Not sure if it helps or not, but here’s the source from my screenshot
> [!NOTE] dataview block in callout
> FROM ""
> WHERE file.cday = this.file.cday
> SORT file.name asc
> [!example] ul in callout
> - one thing
> - another thing
> [!info] ol in callout
> 1. one
> 2. two
> 3. three
One callout trick I learned recently was to select all the content you want in a callout (the dataview block in this case) and ctrl+p > Insert callout (or hotkey). Everything is wrapped in a callout and you only need to adjust the title. That way you don’t have to fiddle with the > lines, spacing, etc. Helps a bit…
Try going into preview/reading mode. I bet it’s because you are in live preview editing mode that you aren’t seeing my issue. The issue doesn’t exist in the live preview editing mode, but that doesn’t do me any good because I read my notes via the reading preview mode
Ahh, reading mode. OK, so for reading mode the Contextual Typography plugin takes care of the excessive indenting in Dataview blocks on their own (thanks for the tip, kepano!). As for Dataview blocks in callouts, it’s a Minimal bug/quirk. The below seems a bit better than the previous snippet - just remember to turn it off if you switch themes or else your list bullets will be MIA