crashmoney / obsidian-typewriter

Typewriter is an Obsidian theme designed for a focused writing experience.
GNU General Public License v3.0
93 stars 18 forks source link

[BUG] Fold/collapse icons overlapping the text #40

Closed JeFawk closed 6 months ago

JeFawk commented 9 months ago

Describe the bug

First I would like to thank you for this free theme, it's great!

image

To Reproduce

Steps to reproduce the behavior:

  1. Type something
  2. Press enter and tab to create an indented text
  3. Notice the top text has a collapse icon
  4. Notice the overlap

Information

Add other context about the problem here. (Please make sure you've updated the theme before opening an issue.)

Suggestions/Workarounds

Add any suggestions/workarounds on how to resolve the issue here.

JeFawk commented 9 months ago

If you select the text block that has the fold (select as in put the cursor on it) for some reason it shows correctly

image

JeFawk commented 9 months ago

Also the cursor is offset. image

image

This offset is just graphical as there is no space there, if i type something it puts a letter right next to the C, even though it would look like it would be letter C ( from empty space)

JeFawk commented 9 months ago

This will fix it

div.cm-fold-indicator
{
  margin-right: 0;
}
.markdown-source-view.mod-cm6 .cm-fold-indicator .collapse-indicator
{
  padding-right: 4px;
  right: 0;
}
crashmoney commented 6 months ago

Hey, thanks for the issue and fix provided! This looks like a bug that's cropped up in newer versions of Obsidian.

I'll merge this into main once I get some spare time.

crashmoney commented 6 months ago

Strangely enough, I can't reproduce this issue on my machine. I've tried both indented normal text and bullets. It doesn't change the look at all, so I'll go on ahead and push this through main for anyone else experiencing the same bug 😄