SYSTEM INFO:
Obsidian version: v1.5.3
Installer version: v1.4.13
Operating system: Darwin Kernel Version 22.6.0: Wed Jul 5 22:22:52 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T8103 22.6.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 0
Plugins enabled: 0
RECOMMENDATIONS:
none
Additional information
It seems that this bug can be fixed by making a few changes to app.css, as I described here:
While Live Preview tries to present the same view rendering as Reading View, some inconsistencies will probably always remain. Spacing in particular can differ, since in editing mode it sometimes has meaning that needs to be preserved and sometimes is just hard to manage. I don’t know if the case you’re pointing out is intentional, a side effect (known or unknown), or a bug.
You are right, but at least, I guess callouts are supposed to be displayed the same as in reading view when the cursor is not overlapping with them (as CodeMirror’s replace widgets with their DOM rendered using MarkdownRenderer or MarkdownPreviewView).
In fact, this seems to be fixed just by changing app.css a little bit.
Replace .markdown-preview-view with .markdown-rendered in the following rule:
The checkboxes should be almost flush with the title of the callout, just like they are outside of a callout.
Actual result
The checkboxes are indented more than they should be, e.g., they are indented more within the callout than they are outside the callout.
Environment
SYSTEM INFO:
Obsidian version: v1.7.7
Installer version: v1.7.7
Operating system: Darwin Kernel Version 23.5.0: Wed May 1 20:19:05 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8112 23.5.0
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
RECOMMENDATIONS:
none
Wanted to mention that this also happens when embedding files. Here I embedded test1 inside test2 and the checkboxes from test1 are similarly indented. Reproduced on sandbox vault.
Platform Windows 10 > Obsidian 1.4.16 > clean sandbox vault. Searched the forums and couldnt find the same issue - seems unlikely I would be the only one so wondering if its due to something on my end?
Steps to reproduce
In Preview mode, Create a note with another note embedded containing a list with list items and check box items.
↑ Expected result with below code disabled. Reading mode renders the same correct result as this. Just noticed now that the text is very slightly misaligned even on the preferred result-still much better.
Disabling the following code in the inspector fixed the issue. .markdown-source-view.mod-cm6 .task-list-item-checkbox {margin-inline-start: 2px;}
I implemented the following code as a stopgap in my main themed vault snippet, though. ul > li.task-list-item .task-list-item-checkbox { margin-inline-start: calc(var(--checkbox-size) * -1.5) !important; }
Semi-related: I noticed while testing in the default vault that check boxes in a non embedded notes in preview mode are also incorrectly aligned. I haven’t tried finding a fix as Minimal theme doesn’t have this issue. As you can see the alignment of text (which is the expected result) is off compared to the above Expected result alignment.
Environment
– PS: might be useful to include zoom level in your System Info outputs which I have seen cause unexpected changes to the UI
SYSTEM INFO:
Obsidian version: v1.4.16
Installer version: v1.4.13
Operating system: Windows 10 Pro 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: 0
Restricted mode: on
RECOMMENDATIONS:
none
Apologies @CawlinTeffid, Yes – these are callouts, I forgot to mention as encountered initially while embedding a note in one but then realised they were displaying in any embedded note, not just callouts ~ while in preview mode.
@WhiteNoise Any note with the provided instructions implemented.
Thanks @bardbess for the second proof (now I know its not just me).