bennyxguo / Obsidian-Obsidianite

🎨 Obsidian.md custom theme, it's dark and simple but yet still stays sparkles!
MIT License
279 stars 48 forks source link

Code block not working in new live preview mode. #44

Closed ParkerFoo closed 1 year ago

ParkerFoo commented 2 years ago

Hi there, thank you for making this theme.

Code block does not seem to work in live preview mode. The code block will not show up in live preview mode.

Kindly refer the screenshot below: image

plutonium-239 commented 2 years ago

facing the same problem, it is because of the theme

eMe-404 commented 2 years ago

really like this theme but still encountering the same issue with preview mode, is there any update for this?

JustinB555 commented 2 years ago

Just wanted to add to this.

I did some digging into the Obsidianite.css file using the dev tools (ctrl+shift+i) and found where the visual problem was. Now, I'm NOT saying that this is the permanent fix (as I haven't fully read or tested if modifying this one part breaks anything else); but changing either the position, width, height, or disabling the background color seemed to fix it. I changed the position from absolute to relative. Now I can read my code while using the live preview feature.

I will warn again that this was a quick fix and not fully tested for other issues.

Obsidianite Code Block Quick Fix

JustinB555 commented 2 years ago

I will add to my previous note:

Obsidian seems to really like to hold onto old .css data. I'm not 100% certain how I did it, but hard resetting it seemed to get it to take the updated .css file.

I don't know how I blundered into getting it to work, but it is now. I'll keep updating if anything changes.

plutonium-239 commented 2 years ago

Just changing the Obsidianite.css in your (vault folder) > .obsidian > themes folder works, no need to do anything else.

bennyxguo commented 2 years ago

Hey all, I will provide full support for live preview mode this weekend. If not latest next weekend! Thanks for all your supports!

HoWol76 commented 2 years ago

This seems to still be an issue with the non-legacy editor. Switching to legacy mode also solves the issue. -- for a given value of "solves"