daledesilva / obsidian_ink

Other
265 stars 6 forks source link

Embeds are not centered #52

Open tobias0409 opened 1 month ago

tobias0409 commented 1 month ago

Describe the bug The embeds are sometimes not centered. Most of the time reloading Obsidian fixes the error.

Video or screenshots grafik

To Reproduce As far as I can see it: I happens when I enter the code block and when I leave the code block again, it slides to the left. Video link where I show the error: https://jumpshare.com/s/MCsqyEfVxQ4OveM35WFz

Expected behavior

Desktop (please complete the following information):

Additional context Already tried reinstall ink.

daledesilva commented 1 month ago

Thanks. What theme are you using?

Please try a couple of other themes and see if it persists.

tobias0409 commented 1 month ago

I use the Minimal theme. It is the most downloaded theme and therefore sits right next to the default theme. Changing the theme fixed the error. Thank you!

daledesilva commented 1 month ago

Thanks. I'll install the minimal theme and see what's going on

FelipeFcosta commented 4 weeks ago

I also use the Minimal theme and was able to fix it by just changing

https://github.com/daledesilva/obsidian_ink/blob/45db64283b2ee3ee020a4f1500fa5d8a9fafc126/src/utils/embed.ts#L84-L85

to

    style += `; margin-left: auto !important`;
    style += `; margin-right: auto !important`;

It might have some unintended consequences, but it works for me.

daledesilva commented 3 weeks ago

Interesting. I'm sure I would have tried that first and found it wasn't working for some reason.

But if that works, I'll put it back in and do some tests with other themes.

Thanks

tompaulick commented 3 days ago

I can attest this is also a problem on Android

Screenshot_20240702_124243_Obsidian