insanum / obsidian_gruvbox

A gruvbox theme for Obsidian
MIT License
162 stars 38 forks source link

Nested lists with word wrap don't indent subsequent lines properly in editor mode #11

Closed Esras closed 3 years ago

Esras commented 3 years ago

When generating a nested list in edit mode with word wrapped turned on, lines that are nested beyond the first level have an incorrect indentation:

Screenshot from 2021-01-30 17-39-57

Playing around with the CSS, the place that seems to cause this is the font-family: var(--font-monospace) setting. Removing that (and thus using whatever font is inherited, which in this case is not monospaced) indents properly, but using a non-monospaced font is undesirable.

Note that it is indented incorrectly on even the first layer of indents, it's just close enough to fool at a glance. Relevant CSS tags seem to be HyperMD-list-line-# and cm-list-#.

arthurmarquesv commented 3 years ago

I'm having this problem to. It's annoying because it breaks my list's relationship lines:

image

Although the indentation is corrected in preview mode, the lines are still broken there, probably because of the problem in edit mode:

image

Ampa commented 3 years ago

Came to report the same issue.

Any chance of a fix?

insanum commented 3 years ago

Probably a padding/margin issue. Is this issue only seen in gruvbox? What about the default theme (or others)?

Esras commented 3 years ago

I opened https://forum.obsidian.md/t/indentation-in-lists-with-wrapping-at-wrong-depth/17666 about it, but it got pushed to the bug graveyard because a reload after the change to monospaced fonts in the default theme seems to recalculate the indent and fix itself.

Ampa commented 3 years ago

The issue was present in Vileplume (my other favorite theme). I raised the issue with the designer, and they managed to fix the issue.

https://github.com/hungsu/vileplume-obsidian/issues/4

sanhuesoft commented 3 years ago

Same issue around here. It's so annoying.

insanum commented 3 years ago

Fixed. This was a pain. :-)